{{/* The chat behind "Ask Base anything": docked beside Home, and /ask. Every state's block is drawn and the one for .State shows; the panel's script moves between them. */}} {{define "ask-head"}}

Ask Base

{{end}} {{/* Docked on Home: on a wide screen the X closes it (posting open=0, kept for the member); on a phone it closes the full-screen chat. */}}{{define "ask-panel"}}{{end}} {{/* A card, drawn from its fields alone: the question, a link per link, a button per option (its label, posting its value) while it is open, and the line saying how it ended. The panel's script draws the same (ask.js, addCard). */}} {{define "ask-card"}}
  • {{.Question}}

    {{- range .Links}}

    {{if eq .Rel "oficina_connect"}}{{.Label}}{{else}}{{.Label}}{{end}}

    {{end}} {{- if and .Open .Options}}
    {{range .Options}}{{end}}
    {{end}} {{- with .Result}}

    {{.}}

    {{end}}
  • {{end}} {{/* An open connect card, drawn as a button (ask.go, connectOffer): the Oficina mark and "Connect Oficina", going to Base's own connect page in this tab, and a line saying what connecting unlocks. It ends the Assistant's newest reply, or with none stands on its own. The panel's script draws the same (ask.js, offer). */}} {{define "ask-offer"}}Connect Oficina

    Calendar, Docs, Sheets and more

    {{end}} {{/* A job, a pill: its state's mark, the title and its status, and once there is something to see (ready, done) the link to it. The summary opens the job view (without scripts, in place). The cards that belong to the job hang under it while they wait on the person; once ended they are listed in its view. The panel's script draws the same (ask.js, addJob). */}} {{define "ask-job"}}
  • {{.Question}}{{.Result}}{{template "ask-jobview" .}}
    {{- if or (eq .State "ready") (eq .State "done")}}{{with .Go}}{{.Label}}{{end}}{{end}}
      {{range .OpenCards}}{{template "ask-card" .}}{{end}}
  • {{end}} {{/* A job state's mark: working has none (the mark turns, in CSS); the rest are still icons: paused a clock (it carries on by itself), stopped a square (it waits for the person). ask.js has the same paths (marks), and so does the native app (BaseIcon). */}} {{define "ask-mark"}}{{if eq . "asking"}}{{else if eq . "ready"}}{{else if eq . "done"}}{{else if eq . "paused"}}{{else if eq . "stopped"}}{{end}}{{end}} {{/* The job view, opened from the pill: its title, the status, one sentence more, for a paused job that offers it "Carry on now" (assistant.job.carry_on, with assistant.job.carry_on_note under it: copy review 2026-11-24), and for a stopped one held while building was off, once it is on again, the same button with no note (abilities plan AD4) posting the card's revision, the job's cards that have ended (each its question and how it ended: ask-jobcard), when it started, and once there is something to see the link to it. The title links to the job's own page in Equipo (Card.Equipo, "Open in Equipo" as its tooltip, an arrow on hover and focus): the only place the chat links there, never a step the person must take. Without scripts it opens in place under the pill; the panel's script makes it a popover beside the pill, or a sheet on a phone, and shows Close (ask.js, jobView). */}} {{define "ask-jobview"}}

    {{with .Equipo}}{{$.Question}}{{else}}{{.Question}}{{end}}

    {{.Result}}

    {{with .Detail}}

    {{.}}

    {{end}} {{- if and (or (eq .State "paused") (eq .State "stopped")) .CarryOn}}
    {{if eq .State "paused"}}Uses your other plan, at no extra cost.{{end}}

    {{end}}
      {{range .EndedCards}}{{template "ask-jobcard" .}}{{end}}
    {{with .StartedAt}}

    {{startedText .}}

    {{end}} {{- if or (eq .State "ready") (eq .State "done")}}{{with .Go}}{{.Label}}{{end}}{{end}}
    {{end}} {{/* A job's card that has ended, in its view: the question and how it ended, nothing to press. The panel's script draws the same (ask.js, addCard). */}} {{define "ask-jobcard"}}
  • {{.Question}}

    {{.Result}}

  • {{end}} {{/* A person's files, above their words: thumbnails first, each a link to the image itself, then a pill per other file (its mark, name and size), a download. Both come from Base's own /ask/attachments, never Equipo's. Without scripts a thumbnail opens the image; the panel's script opens it in a viewer instead, and draws the same row (ask-attach.js, filesRow). */}} {{define "ask-files"}}
    {{range .}}{{if eq .Kind "image"}}{{.Name}}{{end}}{{end}}{{range .}}{{if ne .Kind "image"}}{{template "ask-file-mark"}}{{.Name}}{{fileSize .Size}}{{end}}{{end}}
    {{end}} {{/* A file's mark: a page with its corner folded. ask-attach.js has the same path (fileMark). */}} {{define "ask-file-mark"}}{{end}} {{/* A lookup under the Assistant's reply: its answer (lookupMarkdown: lists, bold and italics, never a link), then a quiet Sources line (copy ask.sources) with each source's title as a link opening in a new tab, and its host after it. The panel's script draws the same (ask.js, addLookup), and so does the app. */}} {{define "ask-lookup"}}
    {{lookupAnswer .Answer}}

    Sources{{range .Sources}}{{or .Title (sourceHost .URL)}}{{sourceHost .URL}}{{end}}

    {{end}} {{define "ask-body"}}

    Set up Ask Base to start asking.

    You started setting up Ask Base. Approve it to start asking.

    Finish setting up

    Ask Base needs setting up again.

    Ask Base isn't answering. Try again in a minute.

      {{range .Messages}}{{if eq .Role "person"}}
    1. {{with .Attachments}}{{template "ask-files" .}}{{end}}{{with .Text}}{{$.RichPerson .}}{{end}}
    2. {{else}}
    3. {{$.Rich .Text}}{{range .Lookups}}{{template "ask-lookup" .}}{{end}}{{range $.OffersAt .ID}}
      {{template "ask-offer" .}}
      {{end}}
    4. {{end}} {{end}}{{with .Notice}}
    5. {{.}}
    6. {{end}}{{range .Jobs}}{{template "ask-job" .}} {{end}}{{range .LooseCards}}{{template "ask-card" .}} {{end}}{{range .LooseOffers}}
    7. {{template "ask-offer" .}}
    8. {{end}}

    Ask about your work, or ask Base to get something done.

    {{with .Problem}}{{end}} {{/* Without a runner that can answer, the conversation shows and says so; what the person wrote stays in the field. */}}

    {{.Status}}

    {{/* The composer: Send (an arrow) and, while a turn runs, Stop (a square) sit inside the field's end. Stop posts the cancel form beside it. Without scripts Send always shows; the panel's script hides it while the field is empty, and while a turn runs. Password managers are told it is no login (autocomplete off, and 1Password's, LastPass's and Dashlane's own marks); spell-check and the keyboard are untouched. */}}
    {{/* The composer's words for files (copy review 13, pending) are on it as data-w-*, for ask-attach.js, which adds the paperclip, the chips and the viewer only with scripts, and only while the snapshot says can_attach (data-can-attach); data-attach is its module. */}}
    {{end}}