| 1 | {{define "up-label"}}{{copy "nav.tasks"}}{{end}} |
| 2 | {{define "title"}}{{.Thin.Task.Title}}{{end}} |
| 3 | {{define "content"}} |
| 4 | {{with .Thin.Task}}<div equipo-work equipo-inner equipo-task-page data-task="{{.ID}}" data-stage="{{.Stage}}" data-work-live> |
| 5 | <header equipo-t-head data-work-region id="task-head">{{template "mono-l" .Mono}} |
| 6 | <div> |
| 7 | <div equipo-crumbs><a href="/tasks">{{copy "nav.tasks"}}</a><span aria-hidden="true">›</span>{{template "placement-chip" .}}</div> |
| 8 | <h1>{{.Title}}</h1> |
| 9 | <div equipo-filed>{{template "who" .Creator}}{{template "source" .}}<span equipo-ago{{agoData .Changed "work.changed"}} title="{{.Changed.Format "2006-01-02 15:04"}}">{{printf (copy "work.changed") .Ago}}</span>{{template "task-menu" (dict "ID" .ID "Menu" .Menu "From" "task")}}</div> |
| 10 | </div> |
| 11 | {{template "track-full" .}} |
| 12 | <p equipo-t-summary data-summary{{if or .Moving .Stopping}} role="status" data-placement-pending{{end}}{{if not .Summary}} hidden{{end}}>{{if .Live}}{{template "mark" ""}}{{end}}<span data-stage-line>{{.Summary}}</span></p> |
| 13 | {{template "work-task-hold" .}} |
| 14 | {{if and .CopyCanSkip .Mine}}<form method="post" action="/conversation/tasks/{{.ID}}/continue-without-copy"><input type="hidden" name="from" value="task"><button rst-btn type="submit" data-copy-continue>{{copy "copy.continue"}}</button></form>{{end}} |
| 15 | {{if .CopyHold}}<p equipo-quiet data-copy-budget>{{copy "copy.round_budget"}}</p>{{end}} |
| 16 | {{with .CopyRepeat}}<section equipo-sp-group data-copy-repeat><h2>{{copy "copy.repeated"}}</h2><p>{{copy "copy.repeated_help"}}</p><ul><li>{{printf (copy "copy.attempt") .Before.Attempt (short .Before.Candidate)}}</li><li>{{printf (copy "copy.attempt") .After.Attempt (short .After.Candidate)}}</li></ul></section>{{end}} |
| 17 | {{range .CopyFlags}}<section equipo-sp-group data-copy-flag><div equipo-sp-card equipo-copy-flag><div equipo-sp-group-head><h2>{{copy "copy.flag"}}</h2></div><p>{{.Text}}</p><p equipo-quiet>{{.Flag}}</p> |
| 18 | {{if .ID}}<details><summary>{{copy "copy.edit"}}</summary><form equipo-copy-form method="post" action="/settings/copy/wording"> |
| 19 | <input type="hidden" name="task" value="{{$.Thin.Task.ID}}"><input type="hidden" name="record" value="{{.ID}}"> |
| 20 | <label for="copy-words-{{.ID}}">{{copy "copy.words"}}</label><textarea rst-input id="copy-words-{{.ID}}" name="text" maxlength="400" required>{{.Text}}</textarea> |
| 21 | <label for="copy-reason-{{.ID}}">{{copy "copy.why"}}</label><input rst-input id="copy-reason-{{.ID}}" name="reason" maxlength="400"> |
| 22 | <button rst-btn type="submit">{{copy "copy.edit_save"}}</button></form></details>{{end}}</div></section>{{end}} |
| 23 | {{with .Spend}}<p equipo-quiet data-spend>{{.}}</p>{{end}}{{with .SpendNote}}<p equipo-quiet data-spend-note>{{.}}</p>{{end}} |
| 24 | {{with .Dup}}{{if not $.Thin.Task.Decision}}<p equipo-dup>{{icon "alert-triangle"}}<span>{{copy "work.dup"}} <a href="/tasks/{{.ID}}">{{.Title}}</a>{{if not $.Thin.Task.Mine}} {{printf (copy "work.dup_decides") $.Thin.Task.Creator.Name}}{{end}}</span></p>{{end}}{{end}} |
| 25 | {{with .Folded}}<div equipo-combined data-folded>{{icon "check-circle"}}<span>{{copy "work.combined_line"}} <a href="/tasks/{{.Into.ID}}">{{.Into.Title}}</a>.</span>{{if $.Thin.Task.Mine}}<form method="post" action="/tasks/{{$.Thin.Task.ID}}/uncombine"><input type="hidden" name="from" value="task"><button equipo-link type="submit" data-uncombine>{{copy "chat.card.undo"}}</button></form>{{end}}</div>{{end}} |
| 26 | {{range .Combined}}<div equipo-combined data-combined="{{.ID}}">{{icon "check-circle"}}<span>{{printf (copy "work.combined_here") .Title}} <a href="/tasks/{{.ID}}">{{copy "work.combined_open"}}</a></span>{{if $.Thin.Task.Mine}}<form method="post" action="/tasks/{{.ID}}/uncombine"><input type="hidden" name="from" value="task"><input type="hidden" name="task" value="{{$.Thin.Task.ID}}"><button equipo-link type="submit" data-uncombine>{{copy "chat.card.undo"}}</button></form>{{end}}</div>{{end}} |
| 27 | {{if and .Decision (or (not .Card) (eq .Decision.Need "direction"))}}{{template "decision" (dict "Task" . "Head" false "From" "task")}}{{end}} |
| 28 | </header> |
| 29 | <div equipo-t-cols> |
| 30 | <section equipo-t-main data-work-region id="task-main"><h2>{{copy "work.tl.heading"}}</h2> |
| 31 | <ol equipo-tl>{{range $i, $it := .Timeline}}<li data-kind="{{.Kind}}"{{with .Specialist}} data-specialist="{{.}}"{{end}}{{if .Live}} data-live{{end}}><span equipo-tl-dot>{{if .Live}}{{template "mark" ""}}{{end}}</span><div> |
| 32 | <p equipo-what>{{if .Live}}<span equipo-live-line>{{.What}}{{with .Since}} {{template "elapsed" .}}{{end}}</span>{{else}}<b>{{.What}}</b>{{end}}{{with .Badge}} {{template "badge" .}}{{end}}{{with .Took}} <span equipo-took>{{.}}</span>{{end}}{{with .At}} <time datetime="{{.Format "2006-01-02T15:04:05Z07:00"}}">{{.Format "15:04"}}</time>{{end}}</p> |
| 33 | {{with .Headline}}<p equipo-headline>{{.}}</p>{{end}} |
| 34 | {{if .Lines}}<ol equipo-tl-lines data-step-lines>{{range .Lines}}<li>{{.}}</li>{{end}}</ol>{{end}} |
| 35 | {{with .Research}}{{template "research-findings" .}}{{end}} |
| 36 | {{with .Design}}{{template "design-gallery" .}}{{end}} |
| 37 | {{if .HasDetails}}<details equipo-tl-more id="tl-more-{{$i}}"><summary>{{icon "chevron-down"}}<span>{{copy "work.details"}}</span></summary><div equipo-tl-body> |
| 38 | {{with .Markdown}}<div equipo-markdown equipo-md>{{chatMarkdown .}}</div>{{end}} |
| 39 | {{with .Findings}}<ul equipo-findings>{{range .}}<li>{{with .Headline}}<b>{{.}}</b> {{end}}{{.Text}}{{if .Path}}<small><code>{{.Path}}{{if .Line}}:{{.Line}}{{end}}</code></small>{{end}}</li>{{end}}</ul>{{end}} |
| 40 | {{range .Text}}<p equipo-tl-note>{{.}}</p>{{end}} |
| 41 | </div></details>{{end}} |
| 42 | {{if .RetryStep}}<form method="post" action="{{.RetryPost}}" data-card-form><input type="hidden" name="from" value="task"><input type="hidden" name="step" value="{{.RetryStep}}"><button equipo-link type="submit" data-step-retry>{{copy "work.retry"}}</button></form>{{end}} |
| 43 | {{if .Decision}}{{template "decision" (dict "Task" $.Thin.Task "Head" false "From" "task")}}{{end}} |
| 44 | </div></li>{{end}}</ol> |
| 45 | <details equipo-details id="task-details"><summary>{{icon "chevron-down"}}{{copy "work.details"}}</summary> |
| 46 | <div equipo-d-grid> |
| 47 | {{with .Brief}}<div><h3>{{copy "work.details.brief"}}</h3><div equipo-markdown equipo-md>{{chatMarkdown .}}</div></div>{{end}} |
| 48 | {{if .Findings}}<div><h3>{{copy "work.findings"}}</h3><ul equipo-findings>{{range .Findings}}<li>{{.Text}}{{if .Path}}<small><code>{{if .Repo}}{{.Repo}}:{{end}}{{.Path}}:{{.Line}}</code></small>{{end}}</li>{{end}}</ul></div>{{end}} |
| 49 | {{range .Steps}}{{if or .Summary .LogTail}}<div data-step="{{.ID}}" data-state="{{.State}}" data-specialist="{{.Specialist}}" rst-stack><h3>{{.Line}}</h3>{{with .Result}}<p equipo-quiet data-result>{{.}}</p>{{end}}{{with .Summary}}<div equipo-markdown equipo-md>{{chatMarkdown .}}</div>{{end}}{{if .LogTail}}<pre equipo-work-log>{{.LogTail}}</pre>{{end}}</div>{{end}}{{end}} |
| 50 | {{if .EarlierSteps}}<details data-placement-history><summary>{{copy "placement.history"}}</summary>{{range .EarlierSteps}}<p><code>{{.ID}}</code> {{.Summary}}</p>{{end}}</details>{{end}} |
| 51 | <div><h3>{{copy "work.details.where"}}</h3><dl equipo-kv>{{if .Branch}}{{if not .Merged}}<dt>{{copy "work.details.branch"}}</dt><dd><code>{{.Branch}}</code></dd>{{end}}{{end}}{{with .CandidateSHA}}<dt>{{copy "work.details.commit"}}</dt><dd><code>{{short .}}</code>{{with $.Thin.Task.BaseSHA}} {{copy "work.details.on"}} <code>{{short .}}</code>{{end}}</dd>{{end}}{{with .MergedLine}}<dt>{{copy "work.details.merged"}}</dt><dd>{{.}}</dd>{{end}}{{if .PreviewURL}}<dt>{{copy "work.specialist.preview"}}</dt><dd><a href="{{.PreviewURL}}" rel="noopener" target="_blank" data-preview>{{.PreviewLine}}</a></dd>{{end}}<dt>{{copy "work.details.task"}}</dt><dd><code>{{.ID}}</code></dd>{{if .MergedLine}}<dt></dt><dd><a href="{{.RepoURL}}" rel="noopener" target="_blank" data-open-amadan>{{copy "work.open"}}</a></dd>{{else if .URL}}<dt></dt><dd><a href="{{.URL}}" rel="noopener" target="_blank" data-open-amadan>{{copy "work.open"}}</a></dd>{{end}}</dl></div> |
| 52 | </div> |
| 53 | </details> |
| 54 | </section> |
| 55 | {{$thread := $.Thin.Thread}}<section equipo-thread equipo-t-thread data-chat-stream data-task="{{.ID}}" data-thinking-set="{{$.ThinkingSet}}" data-thinking-words="{{$.ThinkingWords}}" data-cursor="{{$thread.Cursor}}" data-elapsed="{{copy "chat.elapsed"}}" data-thinking="{{copy "chat.activity.thinking"}}" data-ask-format="{{copy "work.ask.target"}}" data-ask-placeholder="{{copy "work.ask.placeholder"}}" data-name-engineering="{{with index $thread.Names "engineering"}}{{.}}{{else}}{{copy "work.specialist.engineering"}}{{end}}" data-name-review="{{with index $thread.Names "review"}}{{.}}{{else}}{{copy "work.specialist.review"}}{{end}}"> |
| 56 | <h2>{{copy "work.thread"}}</h2> |
| 57 | <div data-work-region id="task-spend">{{with .StepSpend}}<ul equipo-spend aria-label="{{copy "work.spend_steps"}}" data-spend-steps>{{range .}}<li data-spend-step="{{.Step}}">{{.Line}}</li>{{end}}</ul>{{end}}</div> |
| 58 | <template equipo-own-template><li equipo-message="own" data-message=""><div equipo-message-meta><strong equipo-visually-hidden>{{$.Address}}</strong><time></time></div><div equipo-bubble><p equipo-message-body></p></div></li></template> |
| 59 | <template equipo-thinking-template><li equipo-message="incoming" equipo-thinking data-turn="" data-started="" aria-busy="true"><div equipo-message-meta><strong>{{icon "message-circle"}}<span data-who></span></strong><time></time></div><div equipo-bubble><div equipo-message-body equipo-markdown data-stream-text></div><p equipo-activity-line><span equipo-activity>{{copy "chat.activity.thinking"}}</span><span equipo-activity-sep aria-hidden="true">·</span><span equipo-elapsed></span></p></div></li></template> |
| 60 | <template equipo-ended-template><li equipo-system-note data-ended=""><p></p></li></template> |
| 61 | <ol equipo-feed> |
| 62 | {{range $thread.Items}}{{if .Note}}<li equipo-message="incoming" data-note="{{.ID}}"><div equipo-message-meta><strong>{{.Author}}</strong><time datetime="{{.At.Format "2006-01-02T15:04:05Z07:00"}}">{{.At.Format "15:04"}}</time></div><div equipo-bubble><p equipo-message-body>{{.Text}}</p></div></li> |
| 63 | {{else}}<li equipo-message="{{if .Own}}own{{else}}incoming{{end}}" data-message="{{.ID}}"><div equipo-message-meta><strong{{if .Own}} equipo-visually-hidden{{end}}>{{.Author}}</strong><time datetime="{{.At.Format "2006-01-02T15:04:05Z07:00"}}">{{.At.Format "15:04"}}</time></div><div equipo-bubble><p equipo-message-body>{{.Text}}</p></div></li> |
| 64 | {{if .Answered}}<li equipo-message="incoming" data-message="a{{.ID}}" data-turn-id="{{.ID}}"><div equipo-message-meta><strong>{{icon "message-circle"}}<span data-who>{{.Who}}</span></strong><time></time></div><div equipo-bubble><div equipo-message-body equipo-markdown>{{chatMarkdown .Answer}}</div></div></li> |
| 65 | {{else if .Waiting}}<li equipo-message="incoming" equipo-thinking data-turn="{{.ID}}" data-started="{{.At.UnixMilli}}" aria-busy="true"><div equipo-message-meta><strong>{{icon "message-circle"}}<span data-who>{{.Who}}</span></strong><time></time></div><div equipo-bubble><div equipo-message-body equipo-markdown data-stream-text></div><p equipo-activity-line><span equipo-activity>{{.Waiting}}</span><span equipo-activity-sep aria-hidden="true">·</span><span equipo-elapsed></span></p></div></li> |
| 66 | {{else}}<li equipo-system-note data-ended="{{.ID}}"><p>{{.Ended}}</p></li> |
| 67 | {{end}}{{end}}{{else}}<li data-empty-state="work.thread_empty">{{copy "work.thread_empty"}}</li>{{end}} |
| 68 | </ol> |
| 69 | <div id="chat-composer"> |
| 70 | {{if $thread.Ask}}{{$first := index $thread.Choices 0}}<form id="composer" equipo-form equipo-composer method="post" action="/tasks/{{.ID}}/ask" data-retry="{{copy "conversation.retry"}}"> |
| 71 | <input type="hidden" name="request_id" value="{{$.RequestID}}"> |
| 72 | <input type="hidden" name="specialist" value="" data-ask-specialist> |
| 73 | <div equipo-pill><div equipo-pill-row> |
| 74 | <textarea id="chat-body" rst-input name="body" required maxlength="4000" rows="1" aria-label="{{printf (copy "work.ask.placeholder") (index $thread.Names $first)}}" placeholder="{{printf (copy "work.ask.placeholder") (index $thread.Names $first)}}"></textarea> |
| 75 | <button type="submit" equipo-send aria-label="{{copy "conversation.send_short"}}" title="{{copy "conversation.send_short"}}">{{icon "arrow-up"}}</button> |
| 76 | </div></div> |
| 77 | <div equipo-composer-tools><p equipo-ask-target data-choices="{{range $i, $c := $thread.Choices}}{{if $i}},{{end}}{{$c}}{{end}}"><span data-ask-line>{{printf (copy "work.ask.target") (index $thread.Names $first)}}</span>{{if gt (len $thread.Choices) 1}}<span aria-hidden="true" data-ask-sep hidden> · </span><button type="button" equipo-link data-ask-change hidden>{{copy "work.ask.change"}}</button>{{end}}</p></div> |
| 78 | </form>{{else}}<form id="composer" equipo-form equipo-composer method="post" action="/tasks/{{.ID}}/notes" data-retry="{{copy "conversation.retry"}}"> |
| 79 | <input type="hidden" name="request_id" value="{{$.RequestID}}"> |
| 80 | <div equipo-pill><div equipo-pill-row> |
| 81 | <textarea id="chat-body" rst-input name="body" required maxlength="4000" rows="1" aria-label="{{copy "work.note_add"}}" placeholder="{{copy "work.note_add"}}"></textarea> |
| 82 | <button type="submit" equipo-send aria-label="{{copy "conversation.send_short"}}" title="{{copy "conversation.send_short"}}">{{icon "arrow-up"}}</button> |
| 83 | </div></div> |
| 84 | </form>{{end}} |
| 85 | </div> |
| 86 | </section></div></div>{{end}} |
| 87 | {{end}} |
| 88 | {{define "research-findings"}}<div equipo-research> |
| 89 | {{with .Summary}}<p equipo-research-summary>{{.}}</p>{{end}} |
| 90 | {{if .Facts}}<dl equipo-facts>{{range .Facts}}<dt>{{.Label}}</dt><dd><span>{{.Value}}</span>{{range .Sources}}{{if .URL}}<a equipo-source href="{{.URL}}" target="_blank" rel="noopener noreferrer" data-source="{{.ID}}">{{.URL}}</a>{{else}}<small equipo-source data-source="{{.ID}}">{{.ID}}</small>{{end}}{{end}}</dd>{{end}}</dl>{{end}} |
| 91 | {{if .Gaps}}<div equipo-gaps><h3>{{copy "work.research.gaps"}}</h3><ul>{{range .Gaps}}<li>{{.}}</li>{{end}}</ul></div>{{end}} |
| 92 | {{if .Images}}<ul equipo-kept>{{range .Images}}<li><figure><img src="{{.Src}}" alt="{{.Description}}" width="{{.Width}}" height="{{.Height}}" loading="lazy" decoding="async"><figcaption><b>{{.RoleWord}}</b> {{.Description}}</figcaption></figure></li>{{end}}</ul>{{end}} |
| 93 | {{if .Fetches}}<details equipo-tl-more data-fetch-log id="research-{{.StepID}}"><summary>{{icon "chevron-down"}}<span>{{printf (copy "work.research.log") (len .Fetches)}}</span></summary><ol equipo-fetch-log>{{range .Fetches}}<li><code>{{.URL}}</code>{{range .Hops}} <span aria-hidden="true">→</span> <code>{{.URL}}</code>{{with .Status}} <span>{{.}}</span>{{end}}{{end}}{{with .Status}} <span>{{.}}</span>{{end}}{{with .Type}} <span>{{.}}</span>{{end}}{{with .Bytes}} <span>{{fileSize .}}</span>{{end}}{{with .Reason}} <span data-reason>{{.}}</span>{{end}}</li>{{end}}</ol></details>{{end}} |
| 94 | </div>{{end}} |
| 95 | |