@sixb/app 0.1.16 → 0.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/README.md +8 -0
  2. package/dist/agent/agent-chat.d.ts.map +1 -1
  3. package/dist/agent/bash/interpret.d.ts +6 -2
  4. package/dist/agent/bash/interpret.d.ts.map +1 -1
  5. package/dist/agent/components/approval-mode-icons.d.ts +5 -0
  6. package/dist/agent/components/approval-mode-icons.d.ts.map +1 -0
  7. package/dist/agent/components/composer-add-menu.d.ts +15 -0
  8. package/dist/agent/components/composer-add-menu.d.ts.map +1 -0
  9. package/dist/agent/components/composer-commands.d.ts +37 -0
  10. package/dist/agent/components/composer-commands.d.ts.map +1 -0
  11. package/dist/agent/components/composer-menu.d.ts +18 -15
  12. package/dist/agent/components/composer-menu.d.ts.map +1 -1
  13. package/dist/agent/components/composer-settings.d.ts +34 -0
  14. package/dist/agent/components/composer-settings.d.ts.map +1 -0
  15. package/dist/agent/components/composer.d.ts +10 -3
  16. package/dist/agent/components/composer.d.ts.map +1 -1
  17. package/dist/agent/components/context-chips.d.ts +5 -0
  18. package/dist/agent/components/context-chips.d.ts.map +1 -1
  19. package/dist/agent/components/conversation-panel.d.ts +3 -1
  20. package/dist/agent/components/conversation-panel.d.ts.map +1 -1
  21. package/dist/agent/components/dictation-bar.d.ts +7 -3
  22. package/dist/agent/components/dictation-bar.d.ts.map +1 -1
  23. package/dist/agent/components/model-picker-row.d.ts +1 -3
  24. package/dist/agent/components/model-picker-row.d.ts.map +1 -1
  25. package/dist/agent/components/reasoning-effort-slider.d.ts.map +1 -1
  26. package/dist/agent/components/shared-thread-notice.d.ts +4 -2
  27. package/dist/agent/components/shared-thread-notice.d.ts.map +1 -1
  28. package/dist/agent/delegation/use-children.d.ts.map +1 -1
  29. package/dist/agent/hooks/use-agent-conversation.d.ts +2 -0
  30. package/dist/agent/hooks/use-agent-conversation.d.ts.map +1 -1
  31. package/dist/agent/hooks/use-thread-lists.d.ts +8 -0
  32. package/dist/agent/hooks/use-thread-lists.d.ts.map +1 -1
  33. package/dist/agent/i18n/en.d.ts +69 -8
  34. package/dist/agent/i18n/en.d.ts.map +1 -1
  35. package/dist/agent/i18n/fr.d.ts.map +1 -1
  36. package/dist/agent/i18n/index.d.ts +126 -12
  37. package/dist/agent/i18n/index.d.ts.map +1 -1
  38. package/dist/agent/model-selection.d.ts +1 -0
  39. package/dist/agent/model-selection.d.ts.map +1 -1
  40. package/dist/agent/run-sounds.d.ts +18 -0
  41. package/dist/agent/run-sounds.d.ts.map +1 -0
  42. package/dist/chunk-6n5pdqp0.js.map +1 -1
  43. package/dist/{chunk-12v6y89k.js → chunk-btky7c9w.js} +11678 -11190
  44. package/dist/{chunk-12v6y89k.js.map → chunk-btky7c9w.js.map} +59 -57
  45. package/dist/{chunk-bpj9mg5c.js → chunk-gq6xek89.js} +1 -1
  46. package/dist/{chunk-bpj9mg5c.js.map → chunk-gq6xek89.js.map} +1 -1
  47. package/dist/{chunk-hzy2g13h.js → chunk-hdbmj6f0.js} +1 -1
  48. package/dist/{chunk-hzy2g13h.js.map → chunk-hdbmj6f0.js.map} +1 -1
  49. package/dist/chunk-md3p7qdt.js.map +1 -1
  50. package/dist/{chunk-2a69ge8h.js → chunk-pkcm8rn8.js} +1 -1
  51. package/dist/{chunk-2a69ge8h.js.map → chunk-pkcm8rn8.js.map} +1 -1
  52. package/dist/chunk-yvhzn4ye.js.map +1 -1
  53. package/dist/codegen.d.ts.map +1 -1
  54. package/dist/createCustomApp.d.ts.map +1 -1
  55. package/dist/frame-origins.d.ts +10 -0
  56. package/dist/frame-origins.d.ts.map +1 -0
  57. package/dist/index.d.ts +2 -1
  58. package/dist/index.d.ts.map +1 -1
  59. package/dist/index.js +6 -6
  60. package/dist/index.js.map +3 -3
  61. package/dist/pages/settings/messages.d.ts +16 -0
  62. package/dist/pages/settings/messages.d.ts.map +1 -1
  63. package/dist/pages/settings/personal.d.ts +2 -2
  64. package/dist/pages/settings/personal.d.ts.map +1 -1
  65. package/dist/pages.js +49 -3
  66. package/dist/pages.js.map +4 -4
  67. package/dist/server.js +97 -22
  68. package/dist/server.js.map +6 -5
  69. package/package.json +3 -3
  70. package/src/agent/agent-chat.tsx +6 -1
  71. package/src/agent/agent.css +145 -14
  72. package/src/agent/bash/interpret.ts +41 -5
  73. package/src/agent/components/approval-mode-icons.ts +9 -0
  74. package/src/agent/components/composer-add-menu.tsx +126 -0
  75. package/src/agent/components/composer-commands.tsx +165 -0
  76. package/src/agent/components/composer-menu.tsx +33 -46
  77. package/src/agent/components/composer-settings.tsx +437 -0
  78. package/src/agent/components/composer.tsx +312 -153
  79. package/src/agent/components/context-chips.tsx +21 -8
  80. package/src/agent/components/conversation-panel.tsx +16 -9
  81. package/src/agent/components/dictation-bar.tsx +28 -23
  82. package/src/agent/components/model-picker-row.tsx +14 -24
  83. package/src/agent/components/reasoning-effort-slider.tsx +14 -10
  84. package/src/agent/components/shared-thread-notice.tsx +7 -2
  85. package/src/agent/components/transcript.tsx +2 -1
  86. package/src/agent/hooks/use-agent-conversation.ts +18 -6
  87. package/src/agent/i18n/en.ts +58 -15
  88. package/src/agent/i18n/fr.ts +77 -13
  89. package/src/agent/model-selection.ts +4 -0
  90. package/src/agent/publish-artifact/publish-artifact-tool-view.tsx +3 -2
  91. package/src/agent/run-sounds.ts +171 -0
  92. package/src/codegen.ts +44 -0
  93. package/src/createCustomApp.ts +53 -26
  94. package/src/frame-origins.ts +61 -0
  95. package/src/index.ts +5 -1
  96. package/src/pages/settings/messages.ts +8 -0
  97. package/src/pages/settings/personal.tsx +60 -3
  98. package/dist/agent/components/approval-mode-chip.d.ts +0 -15
  99. package/dist/agent/components/approval-mode-chip.d.ts.map +0 -1
  100. package/dist/agent/components/auto-model-chip.d.ts +0 -23
  101. package/dist/agent/components/auto-model-chip.d.ts.map +0 -1
  102. package/dist/agent/components/model-controls.d.ts +0 -41
  103. package/dist/agent/components/model-controls.d.ts.map +0 -1
  104. package/src/agent/components/approval-mode-chip.tsx +0 -120
  105. package/src/agent/components/auto-model-chip.tsx +0 -219
  106. package/src/agent/components/model-controls.tsx +0 -238
@@ -8,6 +8,17 @@ import { Box, PanelsTopLeft, X } from "lucide-react"
8
8
  import { useAgentMessages } from "../i18n"
9
9
  import { useAgentContextLabel } from "../object-context-title"
10
10
 
11
+ /** A context or attachment chip: a framed icon, the name, and a remove button in the composer. */
12
+ export const COMPOSER_CHIP_CLASS_NAME =
13
+ "inline-flex h-8 max-w-[min(100%,20rem)] items-center gap-2 rounded-[11px] bg-black/[0.045] pl-[7px] text-[13px] text-foreground dark:bg-white/[0.08]"
14
+
15
+ /** A chip's framed icon. */
16
+ export const COMPOSER_CHIP_THUMB_CLASS_NAME =
17
+ "flex size-5 shrink-0 items-center justify-center rounded-md bg-background text-foreground/75 shadow-[0_0_0_0.5px_rgb(0_0_0/0.12)] dark:bg-white/[0.1] dark:shadow-none"
18
+
19
+ export const COMPOSER_CHIP_REMOVE_CLASS_NAME =
20
+ "flex size-5 shrink-0 items-center justify-center rounded-full text-muted-foreground outline-none transition-colors hover:bg-black/[0.06] hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/40 dark:hover:bg-white/[0.1]"
21
+
11
22
  export interface ContextChipsProps {
12
23
  readonly entries: readonly AgentContextEntryInput[]
13
24
  /** Shows a remove button on each chip. */
@@ -40,21 +51,23 @@ function ContextChip({
40
51
  const messages = useAgentMessages().context
41
52
  const label = useAgentContextLabel(context)
42
53
  return (
43
- <span className="inline-flex max-w-[min(100%,20rem)] items-center gap-1.5 rounded-full bg-muted py-1 pr-1.5 pl-2 text-xs text-foreground">
44
- {context.kind === "object" ? (
45
- <Box className="size-3.5 shrink-0 text-muted-foreground" aria-hidden="true" />
46
- ) : (
47
- <PanelsTopLeft className="size-3.5 shrink-0 text-muted-foreground" aria-hidden="true" />
48
- )}
54
+ <span className={cn(COMPOSER_CHIP_CLASS_NAME, onRemove ? "pr-1.5" : "pr-2.5")}>
55
+ <span className={COMPOSER_CHIP_THUMB_CLASS_NAME}>
56
+ {context.kind === "object" ? (
57
+ <Box className="size-3" strokeWidth={2} aria-hidden="true" />
58
+ ) : (
59
+ <PanelsTopLeft className="size-3" strokeWidth={2} aria-hidden="true" />
60
+ )}
61
+ </span>
49
62
  <span className="min-w-0 flex-1 truncate">{label}</span>
50
63
  {onRemove ? (
51
64
  <button
52
65
  type="button"
53
66
  onClick={onRemove}
54
- className="-mr-0.5 inline-flex size-4 shrink-0 items-center justify-center rounded-full text-muted-foreground hover:bg-background hover:text-foreground"
67
+ className={COMPOSER_CHIP_REMOVE_CLASS_NAME}
55
68
  aria-label={messages.remove(label)}
56
69
  >
57
- <X className="size-3" />
70
+ <X className="size-[11px]" strokeWidth={2.6} />
58
71
  </button>
59
72
  ) : null}
60
73
  </span>
@@ -13,6 +13,8 @@ export interface ConversationPanelProps {
13
13
  readonly sandboxRecovery?: ReactNode
14
14
  /** A line above the composer, such as whose shared conversation this is. */
15
15
  readonly composerNotice?: ReactNode
16
+ /** The reader follows the conversation without writing in it: no composer, the notice alone. */
17
+ readonly readOnly?: boolean
16
18
  readonly agent: Agent | undefined
17
19
  readonly transcript: TranscriptProps
18
20
  readonly composer: ConversationComposerProps
@@ -53,6 +55,7 @@ export function ConversationPanel({
53
55
  headerActions,
54
56
  sandboxRecovery,
55
57
  composerNotice,
58
+ readOnly = false,
56
59
  }: ConversationPanelProps) {
57
60
  const labels = useAgentMessages()
58
61
  // Optimistic activity (a just-sent message or a live run) takes over the pane immediately, so the
@@ -62,15 +65,19 @@ export function ConversationPanel({
62
65
  transcript.messages.some((message) => message.id === null)
63
66
  const showWelcome =
64
67
  !messagesLoading && !messagesError && !hasActivity && transcript.messages.length === 0
65
- const renderComposer = (wideClassName?: string) => (
66
- <Composer
67
- {...composer}
68
- placeholder={composerPlaceholder}
69
- className={compact ? "px-4 pt-2 pb-4" : wideClassName}
70
- ambientContext={ambientContext}
71
- compact={compact}
72
- />
73
- )
68
+ const renderComposer = (wideClassName?: string) =>
69
+ readOnly ? (
70
+ // Where the composer would end, so the notice keeps its place at the foot of the pane.
71
+ <div aria-hidden className={compact ? "pb-4" : "pb-3"} />
72
+ ) : (
73
+ <Composer
74
+ {...composer}
75
+ placeholder={composerPlaceholder}
76
+ className={compact ? "px-4 pt-2 pb-4" : wideClassName}
77
+ ambientContext={ambientContext}
78
+ compact={compact}
79
+ />
80
+ )
74
81
 
75
82
  const threadsButton = onOpenThreads ? (
76
83
  <ThreadsButton
@@ -8,15 +8,19 @@ import { useAgentMessages } from "../i18n"
8
8
  export interface DictationBarProps {
9
9
  /** A dictation under way: starting, listening, or transcribing. */
10
10
  readonly dictation: SpeechRecognitionState
11
+ /** The ghost buttons' look, so Cancel matches the controls it replaces. */
12
+ readonly buttonClassName: string
11
13
  /** The filled control's look, so Done sits where Send was. */
12
14
  readonly doneClassName: string
13
15
  }
14
16
 
15
17
  /**
16
- * The composer's toolbar while a message is dictated: cancel, the voice as a waveform, how long it
17
- * has run, and Done. Done takes the focus, so Enter or Space finishes and Escape cancels.
18
+ * The composer while a message is dictated: cancel, the voice as a waveform, a recording dot with
19
+ * how long it has run, and Done. While the words are transcribed the waveform freezes and dims
20
+ * under a passing sheen, and Done waits. Done takes the focus, so Enter or Space finishes and
21
+ * Escape cancels.
18
22
  */
19
- export function DictationBar({ dictation, doneClassName }: DictationBarProps) {
23
+ export function DictationBar({ dictation, buttonClassName, doneClassName }: DictationBarProps) {
20
24
  const messages = useAgentMessages().composer
21
25
  const transcribing = dictation.status === "stopping"
22
26
  const seconds = useRecordingSeconds(dictation.status === "listening")
@@ -29,30 +33,34 @@ export function DictationBar({ dictation, doneClassName }: DictationBarProps) {
29
33
 
30
34
  return (
31
35
  // Escape is a shortcut: both buttons stay reachable with the keyboard.
32
- <div className="flex min-w-0 flex-1 items-center gap-2" onKeyDown={cancelOnEscape}>
36
+ <div
37
+ className="flex h-10 min-w-0 flex-1 items-center gap-2 group-data-[expanded]/composer:basis-full"
38
+ onKeyDown={cancelOnEscape}
39
+ >
33
40
  <button
34
41
  type="button"
35
42
  onClick={dictation.abort}
36
43
  aria-label={messages.cancelDictation}
37
44
  title={messages.cancelDictation}
38
- className={cn(
39
- "flex size-8 shrink-0 items-center justify-center rounded-full text-muted-foreground outline-none transition-colors",
40
- "hover:bg-muted hover:text-foreground focus-visible:bg-muted focus-visible:ring-2 focus-visible:ring-ring/40"
41
- )}
45
+ className={buttonClassName}
42
46
  >
43
- <X className="size-[18px]" strokeWidth={1.75} />
47
+ <X className="size-[18px]" strokeWidth={1.9} />
44
48
  </button>
45
49
 
46
- <DictationWaveform
47
- dictation={dictation}
48
- className={cn(
49
- "min-w-0 flex-1 text-foreground/60 transition-opacity duration-300",
50
- transcribing && "opacity-30"
51
- )}
52
- />
50
+ <div
51
+ data-transcribing={transcribing || undefined}
52
+ className="sixb-dictation-wave relative min-w-0 flex-1 text-foreground/55"
53
+ >
54
+ <DictationWaveform dictation={dictation} className="h-7 [&>span]:w-[3px]" />
55
+ </div>
53
56
 
54
57
  <span
55
- className="w-10 shrink-0 text-right text-xs text-muted-foreground tabular-nums"
58
+ aria-hidden="true"
59
+ data-transcribing={transcribing || undefined}
60
+ className="sixb-dictation-dot size-1.5 shrink-0 rounded-full"
61
+ />
62
+ <span
63
+ className="min-w-[30px] shrink-0 text-[12.5px] text-muted-foreground tabular-nums"
56
64
  aria-hidden="true"
57
65
  >
58
66
  {formatSeconds(seconds)}
@@ -70,15 +78,12 @@ export function DictationBar({ dictation, doneClassName }: DictationBarProps) {
70
78
  aria-disabled={transcribing}
71
79
  aria-label={messages.finishDictation}
72
80
  title={messages.finishDictation}
73
- className={cn(
74
- doneClassName,
75
- "ml-1 aria-disabled:bg-foreground/25 dark:aria-disabled:bg-white/20"
76
- )}
81
+ className={cn(doneClassName, "aria-disabled:bg-foreground/40")}
77
82
  >
78
83
  {transcribing ? (
79
- <Spinner className="size-3.5" />
84
+ <Spinner className="size-4" />
80
85
  ) : (
81
- <Check className="size-4" strokeWidth={2.25} />
86
+ <Check className="size-[17px]" strokeWidth={2.4} />
82
87
  )}
83
88
  </button>
84
89
  </div>
@@ -11,11 +11,7 @@ import { Info } from "lucide-react"
11
11
  import { useId, useState } from "react"
12
12
  import { useAgentMessages } from "../i18n"
13
13
  import type { LanguageModel } from "../types"
14
- import {
15
- COMPOSER_MENU_ROW_CLASS_NAME,
16
- COMPOSER_MENU_ROW_SELECTED_CLASS_NAME,
17
- ComposerMenuCheck,
18
- } from "./composer-menu"
14
+ import { COMPOSER_MENU_ROW_CLASS_NAME } from "./composer-menu"
19
15
  import { ProviderLogo } from "./provider-logo"
20
16
 
21
17
  export function ModelPickerRow({
@@ -25,7 +21,6 @@ export function ModelPickerRow({
25
21
  radio = false,
26
22
  describedBy,
27
23
  tier,
28
- note,
29
24
  onSelect,
30
25
  }: {
31
26
  model: LanguageModel
@@ -37,8 +32,6 @@ export function ModelPickerRow({
37
32
  describedBy?: string
38
33
  /** The tier the row stands for, named at its end when no heading names it. */
39
34
  tier?: { readonly id: string; readonly label: string }
40
- /** Said after the name, such as "Default". */
41
- note?: string
42
35
  onSelect: (model: LanguageModel) => void
43
36
  }) {
44
37
  const messages = useAgentMessages().models
@@ -67,31 +60,28 @@ export function ModelPickerRow({
67
60
  setDetailsOpen(false)
68
61
  onSelect(model)
69
62
  }}
63
+ // The chosen row's highlight is its wrapper's, which also holds its thinking.
70
64
  className={cn(
71
65
  COMPOSER_MENU_ROW_CLASS_NAME,
72
- "h-10 flex-1 py-0",
73
- selected && COMPOSER_MENU_ROW_SELECTED_CLASS_NAME
66
+ "flex-1",
67
+ selected && "hover:bg-transparent dark:hover:bg-transparent"
74
68
  )}
75
69
  >
76
70
  <ProviderLogo model={model} className="size-[18px] shrink-0" />
77
71
  {/* Just the name: a catalog's description is a paragraph, kept for the details card. */}
78
72
  <span
79
- className={cn(
80
- "flex min-w-0 flex-1 items-baseline gap-2 text-[13.5px] tracking-[-0.005em] text-foreground",
81
- selected && "font-medium"
82
- )}
73
+ className={cn("min-w-0 flex-1 truncate text-foreground", selected && "font-medium")}
83
74
  >
84
- <span className="truncate">{model.name}</span>
85
- {tier || note ? (
86
- <span
87
- id={tier?.id}
88
- className="shrink-0 text-xs font-normal whitespace-nowrap text-muted-foreground"
89
- >
90
- {[tier?.label, note].filter(Boolean).join(" · ")}
91
- </span>
92
- ) : null}
75
+ {model.name}
93
76
  </span>
94
- <ComposerMenuCheck checked={selected} />
77
+ {tier?.label ? (
78
+ <span
79
+ id={tier?.id}
80
+ className="shrink-0 text-xs font-normal whitespace-nowrap text-muted-foreground"
81
+ >
82
+ {tier.label}
83
+ </span>
84
+ ) : null}
95
85
  </button>
96
86
  </HoverCardTrigger>
97
87
  <HoverCardContent
@@ -37,17 +37,20 @@ export function ReasoningEffortSlider({
37
37
  <div>
38
38
  <div className="flex min-h-6 items-center gap-2">
39
39
  <span className="text-xs text-muted-foreground">{messages.thinking}</span>
40
- <span
41
- title={messages.descriptions[value]}
42
- className={cn(
43
- "ml-auto text-xs font-medium",
44
- enhanced ? "text-[#007aff] dark:text-[#9ec3ee]" : "text-foreground"
45
- )}
46
- >
47
- <span key={value} className="sixb-reasoning-label">
48
- {messages.levels[value]}
40
+ {/* The model's own default has no stop and no name: the outlined thumb says it. */}
41
+ {selectedIndex < 0 ? null : (
42
+ <span
43
+ title={messages.descriptions[value]}
44
+ className={cn(
45
+ "ml-auto text-xs font-medium",
46
+ enhanced ? "text-[#007aff] dark:text-[#9ec3ee]" : "text-foreground"
47
+ )}
48
+ >
49
+ <span key={value} className="sixb-reasoning-label">
50
+ {messages.levels[value]}
51
+ </span>
49
52
  </span>
50
- </span>
53
+ )}
51
54
  {value === resetLevel ? null : (
52
55
  <button
53
56
  type="button"
@@ -66,6 +69,7 @@ export function ReasoningEffortSlider({
66
69
  </div>
67
70
  <div
68
71
  data-max={enhanced}
72
+ data-unset={selectedIndex < 0}
69
73
  className="sixb-reasoning-slider"
70
74
  hidden={levels.length === 0}
71
75
  style={{ "--sixb-reasoning-progress": progress } as CSSProperties}
@@ -5,21 +5,26 @@ import { ContinueButton } from "./thread-people"
5
5
 
6
6
  /**
7
7
  * Above a participant's composer: whose conversation this is, and the way to continue alone. One
8
- * line wherever it fits; a long name gives way, never the action.
8
+ * line wherever it fits; a long name gives way, never the action. On its owner's computer, the
9
+ * conversation has no composer for them: the line says they follow it.
9
10
  */
10
11
  export function SharedThreadNotice({
11
12
  owner,
12
13
  sharing,
14
+ onComputer = false,
13
15
  }: {
14
16
  readonly owner: string
15
17
  readonly sharing: ThreadSharing
18
+ readonly onComputer?: boolean
16
19
  }) {
17
20
  const messages = useAgentMessages().sharing
18
21
 
19
22
  return (
20
23
  <div className="mx-auto flex w-full max-w-3xl items-center gap-2 px-4 pt-1 text-xs text-muted-foreground">
21
24
  <PersonAvatar name={owner} size="xs" />
22
- <span className="min-w-0 truncate">{messages.sharedBy(owner)}</span>
25
+ <span className="min-w-0 truncate">
26
+ {onComputer ? messages.onComputer(owner) : messages.sharedBy(owner)}
27
+ </span>
23
28
  <span aria-hidden className="shrink-0">
24
29
  ·
25
30
  </span>
@@ -179,7 +179,8 @@ function TranscriptView({
179
179
  // explicitly resumes following after that override.
180
180
  <MessageScrollerProvider key={threadId ?? "draft"} autoScroll defaultScrollPosition="end">
181
181
  <MessageScroller className="flex-1">
182
- <MessageScrollerViewport>
182
+ {/* Run sounds look for the conversation on screen by its thread. */}
183
+ <MessageScrollerViewport data-agent-thread={threadId ?? undefined}>
183
184
  <MessageScrollerContent
184
185
  aria-busy={turn.kind === "responding"}
185
186
  className="mx-auto w-full max-w-3xl px-4 pt-12 pb-6"
@@ -63,6 +63,7 @@ import {
63
63
  selectActiveRunId,
64
64
  shouldShowExtendedWaitingStatus,
65
65
  } from "../run-presentation"
66
+ import { watchRun } from "../run-sounds"
66
67
  import {
67
68
  canRetryRun,
68
69
  canStopRun,
@@ -475,8 +476,9 @@ export function useAgentConversation({ threadId, onThreadCreated }: UseAgentConv
475
476
  }
476
477
 
477
478
  if (!currentAgent) return
479
+ const title = deriveTitle(text, attachments)
478
480
  const created = await createThread.mutateAsync({
479
- body: { title: deriveTitle(text) },
481
+ body: title ? { title } : {},
480
482
  })
481
483
  createdThreadId = created.thread.id
482
484
  setPendingUser({
@@ -538,6 +540,7 @@ export function useAgentConversation({ threadId, onThreadCreated }: UseAgentConv
538
540
 
539
541
  // The saved message keeps the key the reader's pending copy had.
540
542
  const recordAcceptedSend = (run: AgentRun, key: string) => {
543
+ watchRun(run)
541
544
  setPendingSend({ run, anchor: true })
542
545
  setSentKeys((current) => new Map(current).set(run.triggerMessageId, key))
543
546
  setPendingUser((current) =>
@@ -560,6 +563,7 @@ export function useAgentConversation({ threadId, onThreadCreated }: UseAgentConv
560
563
  { path: { threadId, runId: presentation.run.id } },
561
564
  {
562
565
  onSuccess: (response) => {
566
+ watchRun(response.run)
563
567
  setPendingSend({ run: response.run, anchor: true })
564
568
  void refreshThread(threadId)
565
569
  },
@@ -665,6 +669,7 @@ export function useAgentConversation({ threadId, onThreadCreated }: UseAgentConv
665
669
  ),
666
670
  }
667
671
  )
672
+ if (response.run) watchRun(response.run)
668
673
  if (response.run && response.run.threadId === threadId) {
669
674
  setPendingSend({ run: response.run, anchor: false })
670
675
  }
@@ -690,6 +695,7 @@ export function useAgentConversation({ threadId, onThreadCreated }: UseAgentConv
690
695
  postMessage.mutateAsync({ path: { threadId }, body: { continue: true, ...settings } })
691
696
  )
692
697
  setContinuingThreadId(null)
698
+ watchRun(response.run)
693
699
  setPendingSend({ run: response.run, anchor: true })
694
700
  await refreshThread(threadId)
695
701
  } catch (error) {
@@ -792,7 +798,7 @@ export function useAgentConversation({ threadId, onThreadCreated }: UseAgentConv
792
798
  const stopping = stoppingRunId !== null && stoppingRunId === activeRunId
793
799
  const canStop = isRunning && canStopRun(activeRun, access, user)
794
800
 
795
- // Someone else's answer holds a shared thread: the reader keeps typing, and sends once it ends.
801
+ // Someone else's answer holds a shared thread: the composer names whose.
796
802
  const answeringFor =
797
803
  isRunning && activeRun?.requestedBy && requestedBySomeoneElse(activeRun, user)
798
804
  ? activeRun.requestedBy
@@ -947,7 +953,8 @@ export function useAgentConversation({ threadId, onThreadCreated }: UseAgentConv
947
953
  error: currentSendError
948
954
  ? failureMessage(currentSendError, labels, agentMessages.approvalModes.saveFailed)
949
955
  : undefined,
950
- disabled: (isRunning && answeringName === null) || Boolean(sandboxRecovery),
956
+ // Whoever's answer is in flight, the reader writes the next message, and sends it once it ends.
957
+ disabled: Boolean(sandboxRecovery),
951
958
  hint: answeringName
952
959
  ? agentMessages.sharing.answering(answeringName)
953
960
  : othersWaiting
@@ -1105,7 +1112,8 @@ function messageBody(
1105
1112
  settings: RequesterSettings
1106
1113
  ) {
1107
1114
  return {
1108
- text,
1115
+ // Files sent alone are the whole message.
1116
+ ...(text ? { text } : {}),
1109
1117
  ...(selection === undefined ? {} : selection),
1110
1118
  ...settings,
1111
1119
  ...(attachments.length === 0 ? {} : { attachments: [...attachments] }),
@@ -1190,9 +1198,13 @@ function isModelPreference(value: unknown): value is ModelPreference {
1190
1198
  )
1191
1199
  }
1192
1200
 
1193
- function deriveTitle(text: string): string {
1201
+ /** The first line of the message, else the first file's name; empty leaves the thread untitled. */
1202
+ function deriveTitle(text: string, attachments: readonly AgentFileRef[]): string {
1194
1203
  const firstLine = text.split("\n")[0]?.trim() ?? ""
1195
- return firstLine.length <= 60 ? firstLine : `${firstLine.slice(0, 57)}...`
1204
+ const title = firstLine || attachments.map((file) => file.fileName?.trim() ?? "").find(Boolean)
1205
+ if (!title) return ""
1206
+
1207
+ return title.length <= 60 ? title : `${title.slice(0, 57)}...`
1196
1208
  }
1197
1209
 
1198
1210
  function useExtendedWaitingStatus(run: Pick<AgentRun, "status" | "createdAt"> | null): boolean {
@@ -74,6 +74,27 @@ export const en = {
74
74
  dictationTranscribing: "Transcribing…",
75
75
  cancelDictation: "Cancel dictation",
76
76
  finishDictation: "Done",
77
+ /** The `+` menu: what a message can carry besides its text. */
78
+ add: "Add files and more",
79
+ mention: "Mention a record",
80
+ commands: "Commands",
81
+ },
82
+ /** Slash commands, typed as the whole message: `/opus`, `/ask`. */
83
+ commands: {
84
+ list: "Commands",
85
+ auto: "Let Auto pick the model",
86
+ model: (name: string) => `Use ${name}`,
87
+ modes: {
88
+ manual: "Ask before every action",
89
+ "accept-edits": "Allow edits without asking",
90
+ auto: "Run everything without asking",
91
+ },
92
+ },
93
+ /** The composer's one control for how the agent works: the model and the permissions. */
94
+ settings: {
95
+ title: "Model and permissions",
96
+ chip: (summary: string) => `${summary}. Change model and permissions`,
97
+ permissions: "Permissions",
77
98
  },
78
99
  files: {
79
100
  spreadsheet: "Spreadsheet",
@@ -105,15 +126,11 @@ export const en = {
105
126
  unnamed: "Context",
106
127
  },
107
128
  models: {
108
- choose: "Choose model and reasoning effort",
109
129
  unavailable: "Models unavailable",
110
130
  defaultModel: "Default model",
111
- popover: "Model and reasoning effort",
112
131
  search: "Search models",
113
132
  list: "Models",
114
133
  empty: "No matching models.",
115
- default: "Default",
116
- defaultSummary: (summary: string) => `Default · ${summary}`,
117
134
  details: (name: string) => `Details about ${name}`,
118
135
  contextWindow: "Context window",
119
136
  tokens: (tokens: number) => count(tokens, "token"),
@@ -124,11 +141,10 @@ export const en = {
124
141
  tools: "Tools",
125
142
  reasoning: "Reasoning",
126
143
  via: (name: string) => `Via ${name}`,
127
- /** With tiers: the model menu, and its first choice. */
128
144
  title: "Model",
129
- chip: (name: string) => `Model: ${name}. Change it`,
145
+ /** With tiers: the first choice of the model list. */
130
146
  auto: "Auto",
131
- autoRouting: "Picks the right model for each message",
147
+ autoRouting: "Best model for each message",
132
148
  autoStandard: (name: string) => `Sixb uses ${name}`,
133
149
  },
134
150
  reasoning: {
@@ -547,6 +563,32 @@ export const en = {
547
563
  },
548
564
  listWorkflowRuns: { title: "Listed workflow runs", running: "Listing workflow runs" },
549
565
  workflowRun: { title: "Checked a workflow run", running: "Checking a workflow run" },
566
+ listDatasets: { title: "Listed datasets", running: "Listing datasets" },
567
+ inspectDataset: {
568
+ title: (dataset: string) => `Inspected the ${dataset || "requested"} dataset`,
569
+ running: (dataset: string) => `Inspecting the ${dataset || "requested"} dataset`,
570
+ },
571
+ datasetVersions: {
572
+ title: (dataset: string) => `Listed versions of the ${dataset || "requested"} dataset`,
573
+ running: (dataset: string) => `Listing versions of the ${dataset || "requested"} dataset`,
574
+ },
575
+ datasetRows: {
576
+ title: (dataset: string) => `Read rows of the ${dataset || "requested"} dataset`,
577
+ running: (dataset: string) => `Reading rows of the ${dataset || "requested"} dataset`,
578
+ },
579
+ listSyncs: { title: "Listed syncs", running: "Listing syncs" },
580
+ inspectSync: {
581
+ title: (sync: string) => `Inspected the ${sync || "requested"} sync`,
582
+ running: (sync: string) => `Inspecting the ${sync || "requested"} sync`,
583
+ },
584
+ listSyncRuns: { title: "Listed sync runs", running: "Listing sync runs" },
585
+ listPipelines: { title: "Listed pipelines", running: "Listing pipelines" },
586
+ inspectPipeline: {
587
+ title: (pipeline: string) => `Inspected the ${pipeline || "requested"} pipeline`,
588
+ running: (pipeline: string) => `Inspecting the ${pipeline || "requested"} pipeline`,
589
+ },
590
+ listPipelineRuns: { title: "Listed pipeline runs", running: "Listing pipeline runs" },
591
+ pipelineRun: { title: "Checked a pipeline run", running: "Checking a pipeline run" },
550
592
  upload: { title: "Uploaded a file", running: "Uploading a file" },
551
593
  download: { title: "Downloaded a file", running: "Downloading a file" },
552
594
  models: { title: "Checked the available models", running: "Checking the available models" },
@@ -732,6 +774,8 @@ export const en = {
732
774
  cancel: "Cancel",
733
775
  close: "Close",
734
776
  sharedBy: (owner: string) => `${owner}'s thread`,
777
+ /** A thread on its owner's computer: its other readers follow it, and write nothing in it. */
778
+ onComputer: (owner: string) => `Runs on ${owner}'s computer: you can follow it here`,
735
779
  answering: (name: string) => `${name} is getting an answer…`,
736
780
  continueMine: "Continue in my own thread",
737
781
  continuing: "Copying…",
@@ -747,25 +791,24 @@ export const en = {
747
791
  left: "You left the thread",
748
792
  copied: "Copied to your threads",
749
793
  },
750
- /** What the agent may change without asking: the composer's chip and its menu. */
794
+ /** What the agent may change without asking: the composer's permissions and Settings. */
751
795
  approvalModes: {
752
796
  title: "What can the agent do without asking?",
753
- chip: (mode: string) => `Permissions: ${mode}. Change them`,
754
797
  changed: (mode: string) => `Permissions: ${mode}`,
755
798
  shortcut: "Shift+Tab in an empty message switches to the next mode",
756
799
  modes: {
757
800
  manual: {
758
- label: "Manual",
759
- description: "Asks before each action or workflow the agent requests",
801
+ label: "Ask first",
802
+ description: "Checks with you before each action or workflow.",
760
803
  },
761
804
  "accept-edits": {
762
- label: "Accept edits",
805
+ label: "Allow edits",
763
806
  description:
764
- "Changes your data without asking. Asks before reaching other systems or starting workflows",
807
+ "Changes your data on its own. Asks before reaching other systems or starting workflows.",
765
808
  },
766
809
  auto: {
767
- label: "Auto",
768
- description: "Runs every action and workflow without asking",
810
+ label: "Full access",
811
+ description: "Runs every action and workflow without asking.",
769
812
  },
770
813
  },
771
814
  saveFailed: "Couldn't change what the agent may do. Try again.",