{{define "up-label"}}{{copy "nav.work"}}{{end}} {{define "title"}}{{if .Chat.Job}}{{copy "jobs.title"}}{{else}}{{copy "conversation.title"}}{{end}}{{end}} {{define "card-job"}}{{with .Job}}{{end}}{{end}} {{define "chat-card"}}
  • {{template "roster-byline" .}}{{if .SetAside}}
    {{.AsideTitle}}{{copy "roster.aside"}}{{template "roster-undo" .}}
    {{else}}
    {{if .Interactive}}
    {{template "card-job" .}}
    {{end}} {{with .ContextTask}}

    {{.}}

    {{end}}{{if .Presentation.Coverage.Skipped}}

    {{icon "check"}}{{copy "roster.copy_done"}}

    {{else if and (not .Open) .Note (ne .Kind "direction")}}

    {{icon "check"}}{{.Note}}

    {{else if and .Task (or .Task.CopyHold .Task.CopyCanSkip)}}{{template "roster-copy-hold" .}}
    {{template "report-thread" .ReportThread}}{{else if and .Receipt (eq .Kind "task")}}{{template "work-task-receipt" .}} {{else if eq .Kind "advice"}}{{if ne .State "resolved"}}

    {{icon "lightbulb"}}{{.Line}}

    {{if .Open}}
    {{template "card-job" .}}
    {{else}}{{with .Note}}

    {{.}}

    {{end}}{{end}}{{end}} {{else if eq .Kind "housekeeping"}}

    {{icon "list-checks"}}{{.Line}} {{copy "chat.housekeeping.link"}}

    {{else if .Receipt}}

    {{icon "folder"}}{{.Line}}

    {{if .Open}}{{if or (eq .Kind "home") (eq .Kind "combined")}}
    {{template "card-job" .}}
    {{else}}
    {{.Change}}
    {{template "card-job" .}}
    {{if .Remove}}
    {{end}}{{end}}
    {{end}} {{else if eq .Kind "question"}}
    {{if eq .AuthorIcon "sparkles"}}{{template "roster-mark" .}}{{else}}{{icon .AuthorIcon}}{{end}}
    {{.Author}}
    {{.Line}}
    {{template "roster-thread-turns" .}}
    {{if .Open}}{{if .Options}}
    {{template "card-job" .}}{{template "project-name-confirm" .}}{{range .Options}}{{end}}
    {{else}}
    {{template "card-job" .}}{{template "project-name-confirm" .}}
    {{end}}{{else if not .Presentation.Waiting}}
    {{template "card-job" .}}
    {{end}}
    {{else if eq .Kind "home"}}

    {{icon "folder"}}{{.Line}}

    {{template "card-job" .}}
    {{else if eq .Kind "direction"}}

    {{.Line}}

    {{template "design-gallery" .Gallery}}{{if .Open}}
    {{template "card-job" .}}{{template "project-name-confirm" .}}{{range .Options}}{{if eq . "again"}}{{else if and (eq . "build") $.BuildNote}}{{else}}{{end}}{{end}}
    {{if .BuildNote}}
    {{copy "chat.card.build"}}
    {{template "card-job" .}}
    {{end}}
    {{copy "chat.card.again"}}
    {{icon .AuthorIcon}}
    {{.Author}}
    {{copy "roster.change"}}
    {{template "card-job" .}}
    {{else}}{{with .Note}}

    {{.}}

    {{end}}{{if .Presentation.Thread}}
    {{template "roster-thread-turns" .}}
    {{end}}{{end}} {{else if eq .Kind "specialist"}}

    {{.Line}}

    {{with .Specialist}}{{range .Capabilities}}

    {{.Words}}

    {{end}}

    {{printf (copy "chat.card.specialist_brief") .Brief}}

    {{end}}{{if .Open}}
    {{template "card-job" .}}{{template "project-name-confirm" .}}{{range .Options}}{{end}}
    {{else}}{{with .Note}}

    {{.}}

    {{end}}{{end}} {{else if eq .Kind "research_sources"}}

    {{.Line}}

    {{with .Name}}

    {{printf (copy "chat.card.research_for") .}}

    {{end}}{{with .Research}}

    {{printf (copy "chat.card.research_looks_for") .Question}}

    {{end}}{{if .Open}}
    {{template "card-job" .}}{{template "project-name-confirm" .}}{{range .Options}}{{end}}
    {{else}}{{with .Note}}

    {{.}}

    {{end}}{{end}} {{else if eq .Kind "instance_inventory"}}

    {{.Line}}

    {{with .Inventory}}{{end}}{{if .Open}}
    {{end}}{{else if eq .Kind "research_inventory"}}

    {{.Line}}

    {{with .Inventory}}{{end}}{{if .Open}}
    {{template "card-job" .}}
    {{else}}{{with .Note}}

    {{.}}

    {{end}}{{end}} {{else if eq .Kind "place"}}

    {{.Line}}

    {{if .Open}}
    {{template "card-job" .}}{{range $i, $c := .PlaceChoices}}{{end}}
    {{else}}{{with .Note}}

    {{.}}

    {{end}}{{end}}{{else if eq .Kind "publish"}}

    {{.Line}}

    {{with .Site}}{{if .URL}}

    {{copy "chat.card.site_link"}}

    {{end}}{{end}}{{if .Open}}
    {{template "card-job" .}}{{template "project-name-confirm" .}}{{range .Options}}{{end}}
    {{else}}{{with .Note}}

    {{.}}

    {{end}}{{end}} {{else if eq .Kind "maker_removed"}}

    {{.Line}}

    {{if .Open}}
    {{template "card-job" .}}{{range .Options}}{{end}}
    {{else}}{{with .Note}}

    {{.}}

    {{end}}{{end}}{{else if eq .Kind "merge"}}

    {{.Line}}

    {{with .PreviewURL}}

    {{copy "chat.card.preview_link"}}

    {{end}}{{if .Open}}
    {{template "card-job" .}}{{template "project-name-confirm" .}}{{range .Options}}{{end}}
    {{else}}{{with .Note}}

    {{.}}

    {{end}}{{end}} {{else if or (eq .Kind "merge_ships") (eq .Kind "merge_policy") (eq .Kind "merge_receipt")}}{{if eq .Kind "merge_receipt"}}
    {{chatMarkdown .Line}}
    {{else}}

    {{.Line}}

    {{end}}{{if .Open}}
    {{template "card-job" .}}{{template "project-name-confirm" .}}{{range .Options}}{{end}}
    {{else}}{{with .Note}}

    {{.}}

    {{end}}{{end}} {{else if .Access}}{{template "access-card" .}} {{else if eq .Kind "access"}}

    {{.Line}}

    {{if .Open}}
    {{copy "chat.card.grant"}}

    {{.GrantHow}}

    amadan agent grant {{.Agent}} {{.Namespace}}
    {{template "card-job" .}}
    {{end}} {{end}}
    {{end}}{{if .Presentation.Coverage.Skipped}}
    {{template "work-task-receipt" .}}
    {{end}}{{if not .SetAside}}{{range .ResearchReports}}
    {{icon "search"}}{{copy "work.specialist.research"}}{{copy "roster.reports"}}{{template "roster-project" $}}{{with .At}}{{end}}

    {{copy "roster.research"}}

    {{with $.Presentation.Context.TaskTitle}}{{.}}{{end}}

    {{.Summary}}

      {{range .Facts}}
    1. {{.Label}} {{.Value}}
      {{range .Sources}}{{if .URL}}{{.Domain}}{{else}}{{.ID}}{{end}}{{end}}
    2. {{end}}{{range .Gaps}}
    3. {{.}}
    4. {{end}}
    {{copy "roster.research_log"}} ({{len .Fetches}})
    {{end}}{{end}}
  • {{end}} {{define "roster-copy-hold"}}
    {{copy "roster.copy_waiting"}}

    {{.Line}}

    {{.HoldReason}}

    {{with .Presentation.Coverage}}
    {{if .Known}}{{if .Total}}{{end}}{{printf (copy "roster.copy_count") .Reviewed .Total}}{{else}}{{copy "roster.copy_coverage"}}{{end}}{{with .Since}}{{printf (copy "roster.copy_since") (.Format "15:04")}}{{end}}
    {{end}}
    {{copy "work.decide.ask_coordinator"}}{{if .Task.CopyCanSkip}}
    {{end}}
    {{end}} {{define "roster-thread-turns"}}{{range .Presentation.Thread}}
    {{if not .Own}}{{if eq $.AuthorIcon "sparkles"}}{{template "roster-mark" .}}{{else}}{{icon $.AuthorIcon}}{{end}}{{end}}
    {{if not .Own}}
    {{$.Author}}
    {{end}}
    {{chatMarkdown .Text}}
    {{if .Own}}{{copy "roster.sent"}}{{end}}
    {{end}}{{with .ThreadError}}

    {{.}}

    {{end}}{{if .Presentation.Waiting}}
    {{if .ThreadActivity}}{{.ThreadActivity}}{{else}}{{printf (copy "roster.waiting") .Author}}{{end}}
    {{end}}{{end}} {{define "roster-undo"}}
    {{template "card-job" .}}
    {{end}} {{define "roster-byline"}}
    {{if eq .AuthorIcon "sparkles"}}{{template "roster-mark" .}}{{else}}{{icon .AuthorIcon}}{{end}}{{if eq .AuthorIcon "sparkles"}}{{.Author}} {{.Verb}}{{else}}{{.Author}} {{.Verb}}{{end}}{{template "roster-project" .}}
    {{end}} {{define "roster-project"}}{{if and .TaskID .Presentation.Context.ProjectTitle}}{{if .Task}}{{template "placement-chip" .Task}}{{else}}{{template "placement-chip" (dict "ID" .TaskID "Project" .Presentation.Context.ProjectTitle "Mono" .ProjectMono)}}{{end}}{{else if .Presentation.Context.ProjectTitle}}{{if not .ProjectMono.InTitle}}{{template "mono-s" .ProjectMono}}{{end}}{{.Presentation.Context.ProjectTitle}}{{end}}{{end}} {{/* The empty conversation: a quiet drawing (your message on the right, the coordinator's reply on the left with its mark), one short line and three starters. A starter fills the composer with its opening words and never sends; without script it is a GET that opens the conversation with those words in the composer. */}} {{define "chat-welcome"}}
  • {{template "welcome-art"}}

    {{copy "conversation.empty"}}

    {{if not .Chat.Job}}
    {{template "starter" "bug"}}{{template "starter" "feature"}}{{template "starter" "project"}}
    {{end}}
  • {{end}} {{define "starter"}}{{end}} {{define "welcome-art"}}{{end}} {{define "roster-mark"}}{{end}} {{define "work-task-receipt"}}{{$card := .}}{{with .Task}}
    {{with .Eyebrow}}{{.}}{{end}}{{if .NeedsYou}}{{icon "hand"}}{{copy "nav.needs-you"}}{{end}}

    {{.Title}}

    {{if not $card.Compact}}{{with .Why}}

    {{.}}

    {{end}}{{end}}
    {{if not $card.Compact}}{{template "pause" (dict "Task" . "From" "conversation" "Job" $card.Job)}}{{if and (ne .Stage "cancelled") (not $card.SlimReport)}}{{template "track-full" .}}{{end}}{{with $card.ExplorationSummary}}

    {{.}}

    {{end}}
    {{if .ChecksLine}}
    {{copy "roster.checks"}}
    {{.RosterChecks}}
    {{with .RosterChecksDetail}}{{.}}{{end}}
    {{end}}{{if .ReviewLine}}
    {{copy "roster.review"}}
    {{.RosterReview}}
    {{with .RosterReviewDetail}}{{.}}{{end}}
    {{end}}{{if .Branch}}
    {{copy "roster.branch"}}
    {{.Branch}}
    {{short .CandidateSHA}}
    {{end}}
    {{if .MergeDropped}}

    {{copy "work.tl.merge_dropped"}}

    {{end}}{{end}}
    {{if not $card.Compact}}{{with $card.ReportAction}}{{if .Post}}
    {{if not $card.Job}}{{end}}{{if .CardID}}{{end}}{{template "card-job" $card}}
    {{else}}{{.Label}}{{end}}{{end}}{{end}}{{if not $card.Compact}}{{copy "roster.open_task"}}{{if and .Pushed (not .MergedLine)}}{{copy "work.open"}}{{end}}{{if .MergedLine}}{{.MergedLine}} {{copy "work.open"}}{{end}}{{end}}
    {{template "report-thread" $card.ReportThread}}
    {{end}}{{end}} {{define "message-files"}}{{with .}}
    {{range .}}{{if eq .Kind "image"}}{{.Name}}{{else}}{{icon "file-text"}}{{.Name}}{{fileSize .Size}}{{end}}{{end}}
    {{end}}{{end}} {{define "chat-lines"}}{{$address := .Address}}{{range .Lines}} {{if .CardOnly}}{{range .Cards}}{{template "chat-card" .}}{{end}}{{else}} {{range .Receipts}}{{template "chat-card" .}}{{end}}
  • {{if .Own}}{{$address}}{{else}}{{template "roster-mark" .}}{{copy "conversation.coordinator"}}{{end}}
    {{if .Own}}{{template "message-files" .Files}}{{end}}
    {{if .Own}}

    {{.Text}}

    {{else}}
    {{chatMarkdown .Text}}
    {{end}}
    {{with .Waiting}}

    {{.}}

    {{end}} {{with .Queued}}

    {{.}}

    {{end}} {{with .Switched}}

    {{.}}

    {{end}}
  • {{range .Cards}}{{template "chat-card" .}}{{end}}{{end}}{{end}}{{end}} {{define "chat-day"}}
  • {{.Messages}}
    {{if not .Quiet}}
    {{range .Rows}}{{.Count}} {{.Label}}{{end}}
    {{end}} {{if .Quiet}}

    {{copy "chat.day.quiet"}}

    {{else}}
    {{range .Rows}}{{template "day-row" .}}{{end}}
    {{end}} {{if .Expanded}}{{copy "chat.day.hide"}}{{else}}{{copy "chat.day.show"}}{{end}}{{icon "chevron-down"}}
    {{if .Expanded}}
      {{template "chat-lines" .Feed}}
    {{end}}
  • {{end}} {{define "day-row"}}
    {{.Label}}
    {{range $i, $it := .Items}}{{if and $i (not $.Stack)}}, {{end}}{{if .TaskID}}{{.Text}}{{else}}{{.Text}}{{end}}{{with .Note}}: {{.}}{{end}}{{end}}{{with .More}} {{.}}{{end}}
    {{end}} {{define "content"}}
    {{with .Chat.Job}}

    {{.Label}}

    {{copy "jobs.all"}}{{copy "jobs.back"}}{{else}}

    {{copy "conversation.title"}}

    {{if .Rail.Needs.Known}}{{icon "inbox"}}{{.Rail.Needs.N}}{{end}}{{if .Chat.FromBase}}{{icon "inbox"}}{{end}}{{icon "notebook"}}{{icon "list-checks"}}{{icon "plug"}}{{end}}

    {{copy "chat.offline"}}

      {{range .Chat.Days}}{{template "chat-day" .}}{{end}} {{if .Chat.Days}}
    1. {{copy "chat.day.today"}}
    2. {{end}} {{if .Chat.HasOpen}}
    3. {{copy "chat.day.still_open"}}
    4. {{end}} {{template "chat-lines" (.Chat.Earlier .Address)}} {{template "chat-lines" (.Chat.Today .Address)}} {{if not (or .Chat.Days .Chat.Open .Chat.Messages)}}{{template "chat-welcome" .}}{{end}} {{range .Chat.Waiting}}
    5. {{template "roster-mark" .}}{{copy "conversation.coordinator"}}

      {{if eq .Kind "move_in"}}{{copy "chat.moving_in"}}{{else if eq .Kind "explore"}}{{copy "chat.exploring"}}{{else}}{{copy "chat.activity.thinking"}}{{end}}

      {{with $.Chat.Job}}{{end}}
    6. {{end}} {{with .Chat.NoConnection}}
    7. {{.Line}}

      {{copy "chat.no_connection.add"}}

    8. {{end}} {{with .Chat.Ended}}
    9. {{.Line}}

      {{if .Retry}}
      {{else if .SignIn}}{{copy "chat.connections.sign_in_again_action"}}{{end}}
    10. {{end}}
    {{/* The bottom of the conversation: a card answered without script returns here (chatCardAnswer). */}}
    {{with .Chat.Job}}
    {{else}}
    {{end}}
    {{end}} {{define "report-thread"}}
    {{copy "roster.talk"}}
    {{template "roster-thread-turns" .}}
    {{if not .Presentation.Waiting}}
    {{template "card-job" .}}
    {{end}}
    {{end}} {{define "project-name-confirm"}}{{with .RememberName}}
    {{end}}{{end}}