@kortix/ui 0.16.4 → 0.16.5

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 (100) hide show
  1. package/dist/customize/sections/view/review-center-connected.js +64 -71
  2. package/dist/customize/sections/view/secret-delivery.d.ts +11 -20
  3. package/dist/customize/sections/view/secret-delivery.js +20 -29
  4. package/dist/customize/sections/view/secrets-view.js +9 -24
  5. package/dist/i18n/en.d.ts +116 -13
  6. package/dist/i18n/en.js +127 -24
  7. package/dist/i18n/ui-catalog/product-catalog-translation-keys.generated.js +2 -0
  8. package/dist/internal/auth/auth-card-shell.d.ts +24 -3
  9. package/dist/internal/auth/auth-card-shell.js +15 -8
  10. package/dist/internal/auth/auth-primitives.d.ts +15 -2
  11. package/dist/internal/auth/auth-primitives.js +22 -5
  12. package/dist/internal/components/agent-mark.d.ts +2 -1
  13. package/dist/internal/components/agent-mark.js +14 -3
  14. package/dist/internal/hooks/use-review-session-summary.d.ts +1 -1
  15. package/dist/internal/hooks/use-review-session-summary.js +1 -1
  16. package/dist/internal/layout/project-nav-row.d.ts +3 -1
  17. package/dist/internal/layout/project-nav-row.js +2 -2
  18. package/dist/markdown/setup-links/secret-intake-form.d.ts +4 -1
  19. package/dist/markdown/setup-links/secret-intake-form.js +60 -16
  20. package/dist/markdown/setup-links/setup-link-button.js +6 -1
  21. package/dist/session/agents/agent-hover-card.d.ts +26 -0
  22. package/dist/session/agents/agent-hover-card.js +70 -0
  23. package/dist/session/agents/agent-strip.js +33 -7
  24. package/dist/session/agents/agent-surface.d.ts +26 -1
  25. package/dist/session/agents/agent-surface.js +57 -6
  26. package/dist/session/agents/held-messages.js +2 -2
  27. package/dist/session/agents/subagent-dialog-content.js +2 -2
  28. package/dist/session/composer/ComposerCard.js +4 -1
  29. package/dist/session/composer/composer-toolbar.d.ts +8 -1
  30. package/dist/session/composer/composer-toolbar.js +2 -2
  31. package/dist/session/composer/dictation/dictation-control.d.ts +10 -0
  32. package/dist/session/composer/dictation/dictation-control.js +28 -0
  33. package/dist/session/composer/dictation/dictation-state.d.ts +26 -0
  34. package/dist/session/composer/dictation/dictation-state.js +71 -0
  35. package/dist/session/composer/dictation/recorder.d.ts +30 -0
  36. package/dist/session/composer/dictation/recorder.js +129 -0
  37. package/dist/session/composer/dictation/use-composer-dictation.d.ts +25 -0
  38. package/dist/session/composer/dictation/use-composer-dictation.js +218 -0
  39. package/dist/session/composer/queued-prompt-list.js +5 -1
  40. package/dist/session/panel/easy/apps-card.js +3 -10
  41. package/dist/session/panel/easy/background-tasks-card.d.ts +23 -0
  42. package/dist/session/panel/easy/background-tasks-card.js +119 -0
  43. package/dist/session/panel/easy/change-requests-card.js +1 -1
  44. package/dist/session/panel/easy/changes-card.js +4 -6
  45. package/dist/session/panel/easy/context-card.js +8 -9
  46. package/dist/session/panel/easy/context-meter.d.ts +2 -0
  47. package/dist/session/panel/easy/context-meter.js +18 -4
  48. package/dist/session/panel/easy/detail-view.js +4 -2
  49. package/dist/session/panel/easy/easy-panel-logic.d.ts +4 -15
  50. package/dist/session/panel/easy/easy-panel-logic.js +4 -17
  51. package/dist/session/panel/easy/easy-panel.js +5 -4
  52. package/dist/session/panel/easy/outputs-card.d.ts +1 -13
  53. package/dist/session/panel/easy/outputs-card.js +14 -40
  54. package/dist/session/panel/easy/panel-card.d.ts +13 -40
  55. package/dist/session/panel/easy/panel-card.js +17 -55
  56. package/dist/session/panel/easy/plan-card.js +4 -7
  57. package/dist/session/panel/model-switch-event.d.ts +2 -2
  58. package/dist/session/panel/model-switch-event.js +13 -9
  59. package/dist/session/panel/session-panel-provider.d.ts +2 -1
  60. package/dist/session/panel/session-panel-provider.js +3 -3
  61. package/dist/session/panel/shared/derive-panels.js +14 -1
  62. package/dist/session/panel/shared/use-panel-handoffs.d.ts +0 -1
  63. package/dist/session/panel/shared/use-panel-handoffs.js +3 -15
  64. package/dist/session/thread/chat-minimap.js +7 -1
  65. package/dist/session/thread/session-chat.js +59 -15
  66. package/dist/session/tool/shared/infrastructure-contexts.d.ts +2 -0
  67. package/dist/session/tool/shared/infrastructure-contexts.js +2 -0
  68. package/dist/session/tool/shared/infrastructure-row-header.js +4 -1
  69. package/dist/session/tool/shared/infrastructure-rows.js +19 -19
  70. package/dist/session/tool/tool-part-renderer.js +23 -9
  71. package/dist/session/tool/tools/bash-tool.js +3 -2
  72. package/dist/session/tool/tools/codemode-tool.d.ts +15 -0
  73. package/dist/session/tool/tools/codemode-tool.js +54 -2
  74. package/dist/session/tool/tools/kortix-action-tool.d.ts +1 -0
  75. package/dist/session/tool/tools/kortix-action-tool.js +19 -8
  76. package/dist/session/tool/tools/multi-agent-tool-bodies.d.ts +8 -1
  77. package/dist/session/tool/tools/multi-agent-tool-bodies.js +76 -10
  78. package/dist/session/tool/tools/task-tool.js +17 -5
  79. package/dist/session/turn/peer-message-row.d.ts +3 -0
  80. package/dist/session/turn/peer-message-row.js +8 -2
  81. package/dist/session/turn/subagent-notice-row.js +5 -3
  82. package/dist/styles.css +1 -1
  83. package/dist/test-utils/intl.d.ts +116 -13
  84. package/dist/workspace/projects/modal/project-icon-field.d.ts +3 -1
  85. package/dist/workspace/projects/modal/project-icon-field.js +3 -3
  86. package/dist/workspace/review/review-center.d.ts +9 -1
  87. package/dist/workspace/review/review-center.js +107 -14
  88. package/dist/workspace/review/review-detail.d.ts +19 -0
  89. package/dist/workspace/review/review-detail.js +18 -3
  90. package/dist/workspace/review/review-swipe-deck.d.ts +27 -0
  91. package/dist/workspace/review/review-swipe-deck.js +304 -0
  92. package/dist/workspace/review/review-swipe.d.ts +17 -0
  93. package/dist/workspace/review/review-swipe.js +10 -0
  94. package/dist/workspace/sidebar/footer/project-review-nav.d.ts +13 -0
  95. package/dist/workspace/sidebar/footer/project-review-nav.js +29 -0
  96. package/dist/workspace/sidebar/project-nav-items.d.ts +3 -1
  97. package/dist/workspace/sidebar/project-nav-items.js +24 -5
  98. package/dist/workspace/sidebar/project-spaces-nav.js +3 -10
  99. package/dist/workspace/sidebar/sidebar-more-group.js +1 -1
  100. package/package.json +3 -3
@@ -105,17 +105,6 @@ export declare function neighborOutputs(items: OutputItem[], currentKey: string)
105
105
  next: OutputItem | null;
106
106
  position: string;
107
107
  };
108
- /**
109
- * Whether the Outputs card should flip open on this render — the "payoff"
110
- * moment: a run just finished (`wasRunning` true, `isRunning` now false) and
111
- * left something behind. Must be false on every other render, including:
112
- * - every render while still running (no transition yet)
113
- * - every render once idle and already settled (no transition this tick)
114
- * - a run finishing with nothing to show (nothing to pay off)
115
- * so the card only auto-opens exactly once, at the transition, never on
116
- * every subsequent re-render of an already-finished run.
117
- */
118
- export declare function shouldAutoExpandOutputs(wasRunning: boolean, isRunning: boolean, outputCount: number): boolean;
119
108
  /**
120
109
  * Whether the run should read as "still going", combining two signals:
121
110
  *
@@ -129,8 +118,8 @@ export declare function shouldAutoExpandOutputs(wasRunning: boolean, isRunning:
129
118
  * for the whole turn regardless of gaps between tool calls.
130
119
  *
131
120
  * ORing them closes the gap: the run reads as running for its entire actual
132
- * duration, so `shouldAutoExpandOutputs` only fires at the real finish (not
133
- * at the first inter-tool pause), and the Progress card's shimmer/subtitle
121
+ * duration, so the payoff only fires at the real finish (not at the first
122
+ * inter-tool pause), and the Progress card's shimmer/subtitle
134
123
  * stop flickering at every tool boundary.
135
124
  */
136
125
  export declare function deriveIsRunning(stepsRunning: boolean, sessionBusy: boolean): boolean;
@@ -165,8 +154,8 @@ export interface OutputKindGroup {
165
154
  export declare function groupOutputsByKind(outputs: OutputItem[]): OutputKindGroup[] | null;
166
155
  /**
167
156
  * Whether the panel should present the primary deliverable on this render —
168
- * the payoff screen (W2). Same transition discipline as
169
- * `shouldAutoExpandOutputs`, with four extra refusals: a failed or stopped
157
+ * the payoff screen (W2). It fires once, on the running -> idle transition,
158
+ * with four refusals: a failed or stopped
170
159
  * run presents its outcome, not a payoff; an open detail is never replaced;
171
160
  * a user who opened any detail during the run has shown they're driving —
172
161
  * auto-opening would fight them; and the panel must actually be open — desktop
@@ -135,19 +135,6 @@ export function neighborOutputs(items, currentKey) {
135
135
  position: `${index + 1} of ${items.length}`,
136
136
  };
137
137
  }
138
- /**
139
- * Whether the Outputs card should flip open on this render — the "payoff"
140
- * moment: a run just finished (`wasRunning` true, `isRunning` now false) and
141
- * left something behind. Must be false on every other render, including:
142
- * - every render while still running (no transition yet)
143
- * - every render once idle and already settled (no transition this tick)
144
- * - a run finishing with nothing to show (nothing to pay off)
145
- * so the card only auto-opens exactly once, at the transition, never on
146
- * every subsequent re-render of an already-finished run.
147
- */
148
- export function shouldAutoExpandOutputs(wasRunning, isRunning, outputCount) {
149
- return wasRunning && !isRunning && outputCount > 0;
150
- }
151
138
  /**
152
139
  * Whether the run should read as "still going", combining two signals:
153
140
  *
@@ -161,8 +148,8 @@ export function shouldAutoExpandOutputs(wasRunning, isRunning, outputCount) {
161
148
  * for the whole turn regardless of gaps between tool calls.
162
149
  *
163
150
  * ORing them closes the gap: the run reads as running for its entire actual
164
- * duration, so `shouldAutoExpandOutputs` only fires at the real finish (not
165
- * at the first inter-tool pause), and the Progress card's shimmer/subtitle
151
+ * duration, so the payoff only fires at the real finish (not at the first
152
+ * inter-tool pause), and the Progress card's shimmer/subtitle
166
153
  * stop flickering at every tool boundary.
167
154
  */
168
155
  export function deriveIsRunning(stepsRunning, sessionBusy) {
@@ -226,8 +213,8 @@ export function groupOutputsByKind(outputs) {
226
213
  }
227
214
  /**
228
215
  * Whether the panel should present the primary deliverable on this render —
229
- * the payoff screen (W2). Same transition discipline as
230
- * `shouldAutoExpandOutputs`, with four extra refusals: a failed or stopped
216
+ * the payoff screen (W2). It fires once, on the running -> idle transition,
217
+ * with four refusals: a failed or stopped
231
218
  * run presents its outcome, not a payoff; an open detail is never replaced;
232
219
  * a user who opened any detail during the run has shown they're driving —
233
220
  * auto-opening would fight them; and the panel must actually be open — desktop
@@ -5,8 +5,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
5
  * (Outputs / Context / Preview / Plan) over the same tool-call data the
6
6
  * Advanced stepper renders one-at-a-time.
7
7
  *
8
- * It is the docked cards column's whole content: flat sections, one hairline
9
- * under each, no header, no tab strip, no wrapper. The column draws the
8
+ * It is the docked cards column's whole content: flat sections, an inset
9
+ * hairline between each, no header, no tab strip, no wrapper. The column draws the
10
10
  * vertical rule beside the chat (`session-action-panel-column.tsx`).
11
11
  *
12
12
  * It owns no state — everything it reads (the derived outputs, the context
@@ -31,6 +31,7 @@ import { useOptionalSessionPanel } from '../session-panel-provider.js';
31
31
  import { useSessionChangeRequestsPanel } from '../../outcomes/session-outcomes-bridge.js';
32
32
  import { ChangeRequestsCard } from './change-requests-card.js';
33
33
  import { AppsCard } from './apps-card.js';
34
+ import { BackgroundTasksCard } from './background-tasks-card.js';
34
35
  import { ChangesCard } from './changes-card.js';
35
36
  import { ContextCard } from './context-card.js';
36
37
  import { useSessionContextUsage } from './context-meter.js';
@@ -52,7 +53,7 @@ export function EasyPanel() {
52
53
  // read-only inside `legacy-subagent-chat.tsx`, which has no panel at all.
53
54
  if (!panel)
54
55
  return null;
55
- const { files, context, apps, outputsDefaultOpen, sessionId, handleOpenOutput, openDetail } = panel;
56
+ const { files, context, apps, isSessionBusy, sessionId, handleOpenOutput, openDetail } = panel;
56
57
  return (
57
58
  // A fill-and-scroll column, not a scrolling stack.
58
59
  //
@@ -67,5 +68,5 @@ export function EasyPanel() {
67
68
  // Preview keep `shrink-0` and stay on screen at their full height, always.
68
69
  // `min-h-0` is what lets this shrink at all — a flex container defaults to
69
70
  // its content's minimum height and would otherwise refuse.
70
- _jsxs("div", { className: "flex h-full min-h-0 flex-col", children: [_jsx(OutputsCard, { fill: !changeRequests?.requests.length, outputs: files, defaultExpanded: outputsDefaultOpen || files.length > 0, onOpenOutput: (o) => handleOpenOutput(o, files) }), _jsx(ChangesCard, { onOpenDetail: openDetail, onOpenAll: () => panel.openFiles(true) }), _jsx(ContextCard, { usage: contextUsage, files: context.files, web: context.web, tools: context.tools, sessionId: sessionId, onOpenDetail: openDetail, onOpenFile: (path, allPaths) => handleOpenOutput(pathOutput(path), allPaths.map(pathOutput)), onAddContext: () => useSessionComposerPrefillStore.getState().requestAttach(sessionId) }), apps.length > 0 && _jsx(AppsCard, { apps: apps, onOpenApp: (a) => handleOpenOutput(a, apps) }), !planInChat && _jsx(PlanPanelCard, { sessionId: sessionId }), changeRequests && _jsx(ChangeRequestsCard, { ...changeRequests })] }));
71
+ _jsxs("div", { className: "flex h-full min-h-0 flex-col pb-2", children: [_jsx(OutputsCard, { fill: !changeRequests?.requests.length, outputs: files, onOpenOutput: (o) => handleOpenOutput(o, files) }), _jsx(ChangesCard, { onOpenDetail: openDetail, onOpenAll: () => panel.openFiles(true) }), _jsx(ContextCard, { usage: contextUsage, files: context.files, web: context.web, tools: context.tools, sessionId: sessionId, onOpenDetail: openDetail, onOpenFile: (path, allPaths) => handleOpenOutput(pathOutput(path), allPaths.map(pathOutput)), onAddContext: () => useSessionComposerPrefillStore.getState().requestAttach(sessionId) }), apps.length > 0 && _jsx(AppsCard, { apps: apps, onOpenApp: (a) => handleOpenOutput(a, apps) }), _jsx(BackgroundTasksCard, { projectId: panel.projectId, sessionId: panel.projectSessionId, live: isSessionBusy, onOpenDetail: openDetail }), !planInChat && _jsx(PlanPanelCard, { sessionId: sessionId }), changeRequests && _jsx(ChangeRequestsCard, { ...changeRequests })] }));
71
72
  }
@@ -1,14 +1,4 @@
1
1
  import type { OutputItem } from '../shared/derive-panels.js';
2
- /** The chalk key: a file's extension, else its kind. */
3
- export declare function chalkLabel(output: {
4
- kind: string;
5
- name: string;
6
- }): string;
7
- /** A 24px chalk tile, fill only (no border); the glyph takes the chalk ink, whatever its own color class. */
8
- export declare function ChalkTile({ label, children }: {
9
- label: string;
10
- children: React.ReactNode;
11
- }): import("react").JSX.Element;
12
2
  export declare function OutputRows({ outputs, onOpenOutput, initialShowAll, }: {
13
3
  outputs: OutputItem[];
14
4
  /** Only called for outputs that are actually openable — see `isOpenable`. */
@@ -24,10 +14,8 @@ export declare function OutputRows({ outputs, onOpenOutput, initialShowAll, }: {
24
14
  */
25
15
  initialShowAll?: boolean;
26
16
  }): import("react").JSX.Element;
27
- export declare function OutputsCard({ outputs, defaultExpanded, onOpenOutput, fill, }: {
17
+ export declare function OutputsCard({ outputs, onOpenOutput, fill, }: {
28
18
  outputs: OutputItem[];
29
19
  fill?: boolean;
30
- /** Auto-expands when a run finishes with something to show — the payoff moment. */
31
- defaultExpanded: boolean;
32
20
  onOpenOutput: (output: OutputItem) => void;
33
21
  }): import("react").JSX.Element;
@@ -23,11 +23,10 @@ import { ObjectUrlCache } from '../../../internal/lib/object-url-cache.js';
23
23
  import { track } from '../../../lib/telemetry.js';
24
24
  import { cn } from '../../../lib/utils.js';
25
25
  import { AppWindowIcon as AppWindow, CaretDownIcon as ChevronDown, FileTextIcon as FileText, ImageIcon, PresentationIcon, VideoIcon, } from '@phosphor-icons/react';
26
- import { chalkColors } from '../../../_vendor/kortix-shared.js';
27
26
  import { useEffect, useState } from 'react';
28
27
  import { deliverableKindLabel, isScaffoldingOutput } from '../shared/output-priority.js';
29
28
  import { groupOutputsByKind, outputKey } from './easy-panel-logic.js';
30
- import { PanelCard } from './panel-card.js';
29
+ import { PANEL_ROW, PANEL_ROW_ICON, PanelCard } from './panel-card.js';
31
30
  import { Download } from '../../../internal/icons/download.js';
32
31
  const KIND_ICON = {
33
32
  file: FileText,
@@ -81,41 +80,25 @@ function ImageThumb({ path, callID, name }) {
81
80
  // `size-4`, like every other leading glyph in this list — the fallback
82
81
  // stands where the thumbnail will, so it must not be a smaller mark.
83
82
  const Ico = KIND_ICON.image;
84
- return _jsx(Ico, { className: "text-foreground size-4" });
83
+ return _jsx(Ico, {});
85
84
  }
86
85
  return (
87
86
  // eslint-disable-next-line @next/next/no-img-element
88
- _jsx("img", { src: src, alt: name, className: "size-6 rounded-sm object-cover outline outline-1 -outline-offset-1 outline-black/10 dark:outline-white/10" }));
87
+ _jsx("img", { src: src, alt: name, className: "outline-foreground/10 size-5 rounded-xs object-cover outline outline-1 -outline-offset-1" }));
89
88
  }
90
89
  /**
91
- * A file gets its real per-extension glyph (the `.md` tile, the `.png` tile) —
92
- * the same one the files explorer uses, so an output looks like the thing the
93
- * user will open. A running app and generated media have no filename to key off,
94
- * so they keep their kind icon — except an image with a path, which gets a real
95
- * thumbnail (W13): the icon says "picture," the thumb shows which one.
90
+ * A file gets its real per-extension glyph, the same one the files explorer
91
+ * uses, in meta ink. An image with a path shows its real pixels instead: the
92
+ * glyph says "picture", the thumbnail shows which one.
96
93
  */
97
94
  function OutputIcon({ output }) {
98
- const tile = 'flex size-6 shrink-0 items-center justify-center rounded-sm';
99
95
  if (output.kind === 'image' && output.path) {
100
- return (_jsx("span", { className: tile, children: _jsx(ImageThumb, { path: output.path, callID: output.callID, name: output.name }) }));
96
+ return _jsx(ImageThumb, { path: output.path, callID: output.callID, name: output.name });
101
97
  }
102
- // The chalk tile Drive uses for a file type: one stable color per extension
103
- // (or per kind, for an app or generated media), the glyph in its ink. A list
104
- // of eight outputs reads by color before a single name is read.
98
+ if (output.kind === 'file')
99
+ return getFileIcon(output.name, { variant: 'monochrome' });
105
100
  const Ico = KIND_ICON[output.kind];
106
- return (_jsx(ChalkTile, { label: chalkLabel(output), children: output.kind === 'file' ? (getFileIcon(output.name, { className: 'size-3.5', variant: 'monochrome' })) : (_jsx(Ico, { className: "size-3.5" })) }));
107
- }
108
- /** The chalk key: a file's extension, else its kind. */
109
- export function chalkLabel(output) {
110
- if (output.kind === 'file' && output.name.includes('.')) {
111
- return output.name.slice(output.name.lastIndexOf('.') + 1).toUpperCase();
112
- }
113
- return output.kind.toUpperCase();
114
- }
115
- /** A 24px chalk tile, fill only (no border); the glyph takes the chalk ink, whatever its own color class. */
116
- export function ChalkTile({ label, children }) {
117
- const chalk = chalkColors(label);
118
- return (_jsx("span", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm [&_svg]:text-current!", style: { backgroundColor: chalk.background, color: chalk.foreground }, "aria-hidden": true, children: children }));
101
+ return _jsx(Ico, {});
119
102
  }
120
103
  /** An output leads somewhere only if there's something to open: a file has a
121
104
  * path, a running app has a URL. Media the agent generated may have neither. */
@@ -140,11 +123,7 @@ const VISIBLE_LIMIT = 8;
140
123
  * apart. */
141
124
  function OutputRow({ output, onOpenOutput, }) {
142
125
  const t = useTranslations('sessionUi.panel');
143
- return (_jsx("li", { className: "flex items-center", children: _jsxs("button", { type: "button", disabled: !isOpenable(output), onClick: () => isOpenable(output) && onOpenOutput(output),
144
- // Compact (~34px): a run can make dozens of outputs, and the chalk
145
- // tile carries the type, so a row is the tile, the name and at most
146
- // one state word. The kind label repeated what the tile already says.
147
- title: `${output.title ?? output.name} · ${deliverableKindLabel(output)}`, className: "hover:bg-accent flex w-full items-center gap-2.5 px-4 py-1.5 text-left transition-[background-color,transform] active:scale-[0.998] disabled:cursor-default", children: [_jsx(OutputIcon, { output: output }), _jsx("span", { className: "text-foreground min-w-0 flex-1 truncate text-sm", children: output.title ?? output.name }), output.fresh === 'new' && (_jsx("span", { className: "text-kortix-green shrink-0 text-xs font-medium", children: t('outputNew') })), output.fresh === 'updated' && (_jsx("span", { className: "text-muted-foreground shrink-0 text-xs", children: t('outputUpdated') }))] }) }));
126
+ return (_jsx("li", { className: "flex", children: _jsxs("button", { type: "button", disabled: !isOpenable(output), onClick: () => isOpenable(output) && onOpenOutput(output), title: `${output.title ?? output.name} · ${deliverableKindLabel(output)}`, className: PANEL_ROW, children: [_jsx("span", { className: PANEL_ROW_ICON, children: _jsx(OutputIcon, { output: output }) }), _jsx("span", { className: "text-foreground min-w-0 flex-1 truncate", children: output.title ?? output.name }), output.fresh === 'new' && (_jsx("span", { className: "text-muted-foreground shrink-0 text-xs", children: t('outputNew') })), output.fresh === 'updated' && (_jsx("span", { className: "text-muted-foreground shrink-0 text-xs", children: t('outputUpdated') }))] }) }));
148
127
  }
149
128
  export function OutputRows({ outputs, onOpenOutput, initialShowAll, }) {
150
129
  const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
@@ -162,12 +141,7 @@ export function OutputRows({ outputs, onOpenOutput, initialShowAll, }) {
162
141
  // `groupOutputsByKind`'s own doc comment) — the collapsed, pre-fold slice
163
142
  // stays a flat list, so this is `null` whenever `showAll` is false.
164
143
  const groups = showAll ? groupOutputsByKind(visible) : null;
165
- return (_jsxs(FadedScrollArea, { fadeColor: "from-pane", rootClassName: "h-auto min-h-0 flex-1", className: "overscroll-contain", children: [groups ? (_jsx("div", { className: "flex flex-col gap-0", children: groups.map((group, i) => (_jsxs("div", { children: [_jsx("p", { className: cn('text-muted-foreground px-4 pb-1 text-xs font-medium', i > 0 && 'pt-2'), children: group.label }), _jsx("ul", { className: "flex flex-col gap-0", children: group.items.map((o) => (_jsx(OutputRow, { output: o, onOpenOutput: onOpenOutput }, outputKey(o)))) })] }, group.kind))) })) : (_jsx("ul", { className: "flex flex-col gap-0", children: visible.map((o) => (_jsx(OutputRow, { output: o, onOpenOutput: onOpenOutput }, outputKey(o)))) })), hidden > 0 && !showAll && (_jsxs("button", { type: "button", onClick: () => setShowAll(true),
166
- // Same rhythm and press feedback as the rows above it. `color` rides
167
- // along in the transition list because this row also lightens its
168
- // label on hover — `transition-colors` would have swept in
169
- // border-color and fill with it.
170
- className: "text-muted-foreground hover:text-foreground hover:bg-accent mt-0.5 flex w-full cursor-pointer items-center gap-2.5 px-4 py-1.5 text-left text-sm transition-[background-color,color,transform] active:scale-[0.998]", children: [_jsx("span", { className: "flex size-6 shrink-0 items-center justify-center", children: _jsx(ChevronDown, { className: "size-3.5" }) }), _jsxs("span", { className: "truncate tabular-nums", children: [hidden, " ", tI18nComplete.raw('text187897ce0afc'), " ", hiddenNoun] })] }))] }));
144
+ return (_jsxs(FadedScrollArea, { fadeColor: "from-pane", rootClassName: "h-auto min-h-0 flex-1", className: "overscroll-contain", children: [groups ? (_jsx("div", { className: "flex flex-col gap-0", children: groups.map((group, i) => (_jsxs("div", { children: [_jsx("p", { className: cn('text-muted-foreground px-3 pb-1 text-xs', i > 0 && 'pt-3'), children: group.label }), _jsx("ul", { className: "flex flex-col gap-0", children: group.items.map((o) => (_jsx(OutputRow, { output: o, onOpenOutput: onOpenOutput }, outputKey(o)))) })] }, group.kind))) })) : (_jsx("ul", { className: "flex flex-col gap-0", children: visible.map((o) => (_jsx(OutputRow, { output: o, onOpenOutput: onOpenOutput }, outputKey(o)))) })), hidden > 0 && !showAll && (_jsx("div", { className: "flex", children: _jsxs("button", { type: "button", onClick: () => setShowAll(true), className: cn(PANEL_ROW, 'text-muted-foreground hover:text-foreground cursor-pointer'), children: [_jsx("span", { className: PANEL_ROW_ICON, children: _jsx(ChevronDown, { className: "size-3.5!" }) }), _jsxs("span", { className: "truncate tabular-nums", children: [hidden, " ", tI18nComplete.raw('text187897ce0afc'), " ", hiddenNoun] })] }) }))] }));
171
145
  }
172
146
  /**
173
147
  * The card header's "download all" affordance (W15). Only worth offering once
@@ -202,7 +176,7 @@ function DownloadAllAction({ outputs }) {
202
176
  };
203
177
  return (_jsx(Hint, { label: tI18nComplete.raw('textf7917eced9c2'), side: "bottom", children: _jsx(Button, { variant: "ghost", size: "icon", onClick: () => void handleDownload(), disabled: busy, "aria-label": tI18nComplete.raw('textf7917eced9c2'), "aria-busy": busy, className: "size-7 active:scale-[0.96] disabled:opacity-100", children: busy ? (_jsx(Loading, { className: "text-muted-foreground size-3.5 motion-reduce:animate-none" })) : (_jsx(Download, { className: "size-3.5" })) }) }));
204
178
  }
205
- export function OutputsCard({ outputs, defaultExpanded, onOpenOutput, fill = true, }) {
179
+ export function OutputsCard({ outputs, onOpenOutput, fill = true, }) {
206
180
  const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
207
- return (_jsx(PanelCard, { title: tI18nComplete.raw('texte7ce99764a2d'), count: outputs.length, isEmpty: outputs.length === 0, defaultExpanded: defaultExpanded, emptyText: tI18nComplete.raw('textd5f2ad00f99b'), contentClassName: cn('flex min-h-0 flex-col pb-2', !fill && 'max-h-40 overflow-y-auto'), fill: fill, headerAction: _jsx(DownloadAllAction, { outputs: outputs }), children: _jsx(OutputRows, { outputs: outputs, onOpenOutput: onOpenOutput }) }));
181
+ return (_jsx(PanelCard, { title: tI18nComplete.raw('texte7ce99764a2d'), isEmpty: outputs.length === 0, emptyText: tI18nComplete.raw('textd5f2ad00f99b'), contentClassName: cn('flex min-h-0 flex-col pb-2', !fill && 'max-h-40 overflow-y-auto'), fill: fill, headerAction: _jsx(DownloadAllAction, { outputs: outputs }), children: _jsx(OutputRows, { outputs: outputs, onOpenOutput: onOpenOutput }) }));
208
182
  }
@@ -1,56 +1,29 @@
1
- import { type ReactNode } from 'react';
1
+ import type { ReactNode } from 'react';
2
+ /** The row every section draws: one height, one hover, one text edge. Its
3
+ * parent is a flex row (`<li className="flex">`) so `flex-1` fills it. */
4
+ export declare const PANEL_ROW: string;
5
+ /** The fixed leading slot, so every row's label starts on one x. */
6
+ export declare const PANEL_ROW_ICON = "text-muted-foreground flex w-5 shrink-0 items-center justify-center [&_svg]:size-4";
2
7
  export interface PanelCardProps {
3
8
  title: string;
4
- count?: number;
5
- /**
6
- * Stands in the count badge's slot for a card whose quantity is not a count.
7
- *
8
- * Plan is the only such card: "3 of 6, and here is the dial" is its size,
9
- * the way "12" is Outputs'. Putting it HERE rather than beside the chevron
10
- * is what keeps the column's headers parallel — every card states its size
11
- * immediately after its title, so the eye reads one column of titles and one
12
- * column of sizes rather than hunting a different edge per card.
13
- *
14
- * Mutually exclusive with `count` in practice: a card that has both is
15
- * saying its size twice.
16
- */
9
+ /** Stands beside the title: Plan's "3 of 6" dial. */
17
10
  indicator?: ReactNode;
18
11
  /** Second line under the title — Plan uses it for its live step label. */
19
12
  subtitle?: ReactNode;
20
13
  children?: ReactNode;
21
- /** Soft placeholder art shown above `emptyText` — the "promise" state. */
22
- emptyArt?: ReactNode;
23
14
  emptyText?: string;
24
- /** Extra content under `emptyText` — the empty Context card's "Add
25
- * context" / "Connect apps" row (Task 5). Full-width, not the `Empty`
26
- * primitive's own `max-w-sm` prose cap, since a connector strip needs the
27
- * card's whole width to lay out its rows. */
15
+ /** Extra content under `emptyText` — the empty Context section's "Add context". */
28
16
  emptyActions?: ReactNode;
29
17
  isEmpty: boolean;
30
- defaultExpanded?: boolean;
31
18
  /** Override the body padding — a full-bleed list wants none. */
32
19
  contentClassName?: string;
33
- /** A control beside the chevron (Outputs' "download all") — click-isolated
34
- * from the header's own expand/collapse toggle. */
20
+ /** A control on the title's right edge (Outputs' "download all"). */
35
21
  headerAction?: ReactNode;
36
22
  /**
37
- * This card absorbs the column's leftover height instead of pushing its
38
- * siblings off the bottom.
39
- *
40
- * Exactly ONE card in the column may set it. The card still sizes to its
41
- * content — it never stretches to fill space it does not need — but it is the
42
- * only one the flex algorithm is allowed to shrink, and when it shrinks its
43
- * BODY scrolls while its header stays put. Everything else in the column
44
- * keeps `shrink-0` and stays wholly visible.
45
- *
46
- * That asymmetry is the whole design. A column where every card can shrink
47
- * has no anchor and clips all three; a column where none can shrink pushes
48
- * the lower cards out of sight the moment one list gets long. One flexible
49
- * card, the rest fixed, is what keeps Context and Preview on screen while
50
- * Outputs holds two hundred files.
51
- *
52
- * A `fill` card's `contentClassName` carries padding and scrolling only.
23
+ * This section absorbs the column's leftover height: it is the only one the
24
+ * flex algorithm may shrink, and when it shrinks its BODY scrolls while its
25
+ * title stays put. Exactly ONE section in the column may set it.
53
26
  */
54
27
  fill?: boolean;
55
28
  }
56
- export declare function PanelCard({ title, count, indicator, subtitle, children, emptyArt, emptyText, emptyActions, isEmpty, defaultExpanded, contentClassName, headerAction, fill, }: PanelCardProps): import("react").JSX.Element;
29
+ export declare function PanelCard({ title, indicator, subtitle, children, emptyText, emptyActions, isEmpty, contentClassName, headerAction, fill, }: PanelCardProps): import("react").JSX.Element;
@@ -1,62 +1,24 @@
1
1
  'use client';
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  /**
4
- * `PanelCard` — the reusable Easy-mode section shell (a flat section of the
5
- * docked cards column; the name predates the flat design). Outputs, Context, Preview
6
- * and Plan are all this component with different contents.
4
+ * `PanelCard` — one section of the session's docked column. Outputs, Changes,
5
+ * Context, Preview, Plan, Background tasks and Change requests are all this
6
+ * component with different contents.
7
7
  *
8
- * Collapsed and empty, a card is a *promise*: a title, soft placeholder art,
9
- * and one plain sentence saying what will show up here. Nothing technical is
10
- * visible until the user asks for it.
8
+ * A section is a plain title over its rows, always open. No header button, no
9
+ * caret, no count chip: the rows ARE the count. Sections are divided by one
10
+ * hairline on the column's inset (`mx-3`), never full-bleed.
11
11
  *
12
- * The chevron rotates down and the header toggles an in-place body. Every card
13
- * works this way: expanding one never hides the others, so the panel is always
14
- * the same rows and never navigates away from itself.
12
+ * The column's one text edge is `px-3`. Rows sit on `mx-1` and pad `px-2`, so
13
+ * their text starts on the same x as the title and their hover fill reaches a
14
+ * little past it — see `PANEL_ROW`.
15
15
  */
16
- import { CountBadge } from '../../../primitives/count-badge.js';
17
- import { Disclosure, DisclosureContent, DisclosureTrigger } from '../../../primitives/disclosure.js';
18
- import { Empty, EmptyContent, EmptyDescription, EmptyMedia } from '../../../primitives/empty.js';
19
16
  import { cn } from '../../../lib/utils.js';
20
- import { m } from 'motion/react';
21
- import { useReducedMotion } from '../../../internal/hooks/use-reduced-motion.js';
22
- import { useState } from 'react';
23
- import { CaretRightSolidIcon } from '../../../icons/caret-right-solid.js';
24
- /** Full-width section header. A flat row, not a card lid: hover is color
25
- * only. `px-4` is the column's one left edge: the rows below use it too. */
26
- const HEADER_CLASS = cn('flex min-h-11 w-full items-center justify-between gap-2 px-4 py-2 text-left', 'transition-colors duration-(--duration-fast) ease-out',
27
- // The same hover fill as the rows below: one hover token per column.
28
- 'hover:bg-accent');
29
- function CardTitleRow({ title, count, indicator, subtitle, chevron, }) {
30
- return (_jsxs(_Fragment, { children: [_jsxs("span", { className: "flex min-w-0 flex-col gap-0.5", children: [_jsxs("span", { className: "flex min-w-0 items-baseline gap-1.5", children: [_jsx("span", { className: "text-foreground truncate text-sm font-semibold", children: title }), typeof count === 'number' && count > 0 && (_jsx(CountBadge, { count: count })), indicator && _jsx("span", { className: "flex shrink-0 self-center", children: indicator })] }), subtitle] }), chevron] }));
31
- }
32
- export function PanelCard({ title, count, indicator, subtitle, children, emptyArt, emptyText, emptyActions, isEmpty, defaultExpanded = false, contentClassName = 'px-4 pb-4', headerAction, fill = false, }) {
33
- const [expanded, setExpanded] = useState(defaultExpanded);
34
- const reduce = useReducedMotion();
35
- const transition = reduce ? { duration: 0 } : { duration: 0.2, ease: 'easeOut' };
36
- // `defaultExpanded` can flip true after mount (e.g. "auto-open Outputs the
37
- // moment a run finishes with something to show"). One-way sync: force open
38
- // when that happens, but never fight a user's manual collapse afterwards.
39
- const [prevDefaultExpanded, setPrevDefaultExpanded] = useState(defaultExpanded);
40
- if (defaultExpanded !== prevDefaultExpanded) {
41
- setPrevDefaultExpanded(defaultExpanded);
42
- if (defaultExpanded)
43
- setExpanded(true);
44
- }
45
- return (
46
- // A section of the docked column, not a card: no fill, no radius, no box.
47
- // Sections divide with one hairline under each, the way the column itself
48
- // is divided from the chat by one hairline (`panel-chrome.ts`).
49
- _jsxs(Disclosure, { open: expanded, onOpenChange: setExpanded, className: cn(
50
- // `last:border-b-0`: dividers sit BETWEEN sections, no stray rule
51
- // under the last one.
52
- 'text-foreground border-border border-b last:border-b-0', fill ? 'flex min-h-0 flex-col' : 'shrink-0'), transition: transition, children: [_jsx(DisclosureTrigger, { children: _jsx("div", { className: cn(HEADER_CLASS, 'cursor-pointer'), children: _jsx(CardTitleRow, { title: title, count: count, indicator: indicator, subtitle: subtitle, chevron: _jsxs("span", { className: "flex shrink-0 items-center gap-0.5", children: [headerAction && (
53
- // Isolated from the toggle on both input paths: `stopPropagation`
54
- // on click covers the mouse/tap case, and on keydown stops the
55
- // Enter/Space that activates the nested button from *also*
56
- // bubbling up into the trigger's own Enter/Space handler.
57
- _jsx("span", { onClick: (e) => e.stopPropagation(), onKeyDown: (e) => e.stopPropagation(), children: headerAction })), _jsx(m.span, { animate: { rotate: expanded ? 90 : 0 }, transition: transition, className: "text-muted-foreground shrink-0", children: _jsx(CaretRightSolidIcon, { className: "size-4" }) })] }) }) }) }), _jsx(DisclosureContent, { className: cn(fill && 'flex min-h-0 flex-col'), contentClassName: contentClassName, children: isEmpty && !emptyArt ? (
58
- // Compact empty: one line in the section's own left edge, plus its
59
- // action. The illustrated `Empty` below stays for callers that pass
60
- // art; the session column's sections pass none.
61
- _jsxs("div", { className: "flex flex-col items-start gap-2 px-4", children: [emptyText && _jsx("p", { className: "text-muted-foreground text-sm text-pretty", children: emptyText }), emptyActions] })) : isEmpty ? (_jsxs(Empty, { className: "flex-none gap-3 rounded-none border-none p-0 text-center", children: [emptyArt && _jsx(EmptyMedia, { className: "mb-0", children: emptyArt }), emptyText && _jsx(EmptyDescription, { className: "text-pretty", children: emptyText }), emptyActions && (_jsx(EmptyContent, { className: "w-full max-w-none", children: emptyActions }))] })) : (children) })] }));
17
+ /** The row every section draws: one height, one hover, one text edge. Its
18
+ * parent is a flex row (`<li className="flex">`) so `flex-1` fills it. */
19
+ export const PANEL_ROW = cn('mx-1 flex h-8 flex-1 min-w-0 items-center gap-3 rounded-md px-2 text-left text-sm', 'hover:bg-hover transition-colors duration-(--duration-fast) ease-out', 'disabled:cursor-default disabled:hover:bg-transparent');
20
+ /** The fixed leading slot, so every row's label starts on one x. */
21
+ export const PANEL_ROW_ICON = 'text-muted-foreground flex w-5 shrink-0 items-center justify-center [&_svg]:size-4';
22
+ export function PanelCard({ title, indicator, subtitle, children, emptyText, emptyActions, isEmpty, contentClassName = 'pb-3', headerAction, fill = false, }) {
23
+ return (_jsxs("section", { "aria-label": title, className: cn('text-foreground group/section', fill ? 'flex min-h-0 flex-col' : 'shrink-0'), children: [_jsx("div", { className: "border-border mx-3 border-t group-first/section:hidden", "aria-hidden": true }), _jsxs("header", { className: "flex min-h-8 shrink-0 items-center justify-between gap-2 px-3 pt-4 pb-1.5", children: [_jsxs("span", { className: "flex min-w-0 flex-col gap-0.5", children: [_jsxs("span", { className: "flex min-w-0 items-center gap-2", children: [_jsx("h3", { className: "text-foreground truncate text-sm font-medium", children: title }), indicator && _jsx("span", { className: "flex shrink-0", children: indicator })] }), subtitle] }), headerAction && _jsx("span", { className: "flex shrink-0 items-center", children: headerAction })] }), _jsx("div", { className: cn(fill && 'flex min-h-0 flex-col', contentClassName), children: isEmpty ? (_jsxs("div", { className: "flex flex-col items-start gap-2 px-3", children: [emptyText && _jsx("p", { className: "text-muted-foreground text-sm text-pretty", children: emptyText }), emptyActions] })) : (children) })] }));
62
24
  }
@@ -91,10 +91,7 @@ export function PlanPanelCard({ sessionId }) {
91
91
  return null;
92
92
  return (_jsx(PanelCard, { title: tI18nComplete.raw('textfa8ed0bdabdd'),
93
93
  // Never the promise state — the card does not exist without a plan.
94
- isEmpty: false,
95
- // No `count`. `indicator` stands in its slot with the fraction, which is
96
- // what "how big is this card" means for a plan.
97
- indicator: _jsx(PlanProgress, { done: done, total: total, running: Boolean(current) }),
94
+ isEmpty: false, indicator: _jsx(PlanProgress, { done: done, total: total, running: Boolean(current) }),
98
95
  // The live step, always visible — the panel's one advantage over the
99
96
  // transcript is that it does not scroll away, and this is the line that
100
97
  // makes that worth something. Undefined before the plan starts is
@@ -103,8 +100,8 @@ export function PlanPanelCard({ sessionId }) {
103
100
  subtitle: label ? (_jsx("span", { className: cn(
104
101
  // `block`, not a bare span: `truncate` needs a block box to
105
102
  // clip against, and the header column already caps the width.
106
- 'block truncate text-xs', complete ? 'text-muted-foreground' : 'text-foreground/70'), children: label })) : undefined,
107
- // `px-4` matches the header's own inset, so a step's glyph sits on the
103
+ 'block truncate text-xs', complete ? 'text-muted-foreground' : 'text-foreground'), children: label })) : undefined,
104
+ // `px-3` matches the title's inset, so a step's glyph sits on the
108
105
  // same left edge as the title above it.
109
- contentClassName: "px-4 pb-3", defaultExpanded: true, children: _jsx(PlanSteps, { rows: rows }) }));
106
+ contentClassName: "px-3 pb-3", children: _jsx(PlanSteps, { rows: rows }) }));
110
107
  }
@@ -1,8 +1,8 @@
1
1
  /** The canonical audit timeline keeps this record even after inbox delivery. */
2
- export declare function ModelSwitchEvent({ summary }: {
2
+ export declare function ModelSwitchEvent({ summary, }: {
3
3
  summary: Record<string, unknown> | null | undefined;
4
4
  }): import("react").JSX.Element | null;
5
- export declare function ModelSwitchHistory({ history, current }: {
5
+ export declare function ModelSwitchHistory({ history, current, }: {
6
6
  history: unknown;
7
7
  current?: unknown;
8
8
  }): import("react").JSX.Element | null;
@@ -1,19 +1,23 @@
1
- import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useTranslations } from '../../i18n/index.js';
3
3
  /** The canonical audit timeline keeps this record even after inbox delivery. */
4
- export function ModelSwitchEvent({ summary }) {
4
+ export function ModelSwitchEvent({ summary, }) {
5
5
  const t = useTranslations('sessionModelSwitch');
6
6
  if (typeof summary?.to !== 'string')
7
7
  return null;
8
- return (_jsxs("div", { className: "text-muted-foreground mt-1 space-y-1 text-xs", children: [_jsxs("p", { children: [typeof summary.from === 'string' ? summary.from : '—', " \u2192 ", summary.to] }), _jsx("p", { children: typeof summary.actor_session_id === 'string' ? t('agentSession', { id: summary.actor_session_id }) : t('human') }), typeof summary.prompt === 'string' ? _jsx("p", { className: "whitespace-pre-wrap", children: summary.prompt }) : null] }));
8
+ return (_jsxs("div", { className: "text-muted-foreground mt-1 min-w-0 space-y-1 text-xs", children: [_jsxs("p", { className: "break-all font-mono text-foreground", children: [typeof summary.from === 'string' ? summary.from : '—', " \u2192 ", summary.to] }), _jsx("p", { className: "break-all", children: typeof summary.actor_session_id === 'string'
9
+ ? t('agentSession', { id: summary.actor_session_id })
10
+ : t('human') }), typeof summary.prompt === 'string' ? (_jsx("p", { className: "whitespace-pre-wrap break-words", children: summary.prompt })) : null] }));
9
11
  }
10
- export function ModelSwitchHistory({ history, current }) {
12
+ export function ModelSwitchHistory({ history, current, }) {
11
13
  const t = useTranslations('sessionModelSwitch');
12
14
  if (!Array.isArray(history))
13
15
  return null;
14
- return _jsxs(_Fragment, { children: [_jsx("p", { className: "text-muted-foreground mx-auto w-full max-w-2xl px-4 text-xs", children: typeof current === 'string' ? current : '—' }), _jsx("ol", { "aria-label": t('listLabel'), className: "mx-auto w-full max-w-2xl space-y-2 px-4", children: history.map((item) => {
15
- if (!item || typeof item !== 'object' || typeof item.id !== 'string')
16
- return null;
17
- return _jsxs("li", { children: [_jsx(ModelSwitchEvent, { summary: item }), typeof item.at === 'string' ? _jsx("time", { className: "text-muted-foreground text-xs", dateTime: item.at, children: item.at }) : null] }, item.id);
18
- }) })] });
16
+ const entries = history.filter((item) => item !== null &&
17
+ typeof item === 'object' &&
18
+ typeof item.id === 'string' &&
19
+ typeof item.to === 'string');
20
+ if (entries.length === 0)
21
+ return null;
22
+ return (_jsxs("details", { className: "text-muted-foreground mx-auto w-full min-w-0 max-w-2xl px-4 text-xs", children: [_jsxs("summary", { className: "cursor-pointer py-2", children: [_jsxs("span", { children: [t('listLabel'), " \u00B7 ", entries.length] }), typeof current === 'string' ? (_jsx("span", { className: "block max-w-full truncate pl-4 font-mono", title: current, children: current })) : null] }), _jsx("ol", { "aria-label": t('listLabel'), className: "mb-2 max-h-64 space-y-2 overflow-y-auto overscroll-contain border-l border-border pl-3", children: entries.map((item) => (_jsxs("li", { className: "min-w-0", children: [_jsx(ModelSwitchEvent, { summary: item }), typeof item.at === 'string' ? (_jsx("time", { className: "break-all text-muted-foreground text-xs", dateTime: item.at, children: item.at })) : null] }, item.id))) })] }));
19
23
  }
@@ -15,7 +15,8 @@ export interface SessionPanelValue {
15
15
  files: OutputItem[];
16
16
  context: ReturnType<typeof deriveContext>;
17
17
  apps: OutputItem[];
18
- outputsDefaultOpen: boolean;
18
+ /** The session works now: lists that poll (Background tasks) poll faster. */
19
+ isSessionBusy: boolean;
19
20
  /** Detail-panel state — everything the side panel renders. */
20
21
  detail: Detail | null;
21
22
  terminalOpen: boolean;
@@ -485,7 +485,7 @@ export function SessionPanelProvider({ sessionId, isSessionBusy = false, project
485
485
  : resumableFrameHistory(sessionId, apps.map((app) => app.url ?? ''));
486
486
  handleOpenOutput(resumed && output.kind === 'app' ? { ...output, url: resumed.entries[resumed.index] ?? '' } : output, undefined, 'quick');
487
487
  }, [apps, handleOpenOutput, sessionId]);
488
- const { outputsDefaultOpen, pendingQuickView } = usePanelHandoffs({
488
+ const { pendingQuickView } = usePanelHandoffs({
489
489
  sessionId, projectId, projectSessionId, isRunning, outcome, apps, files, steps, calls,
490
490
  detail, handleOpenOutput, openDetail, closeDetail, openTerminal, openAudit, openReminders, openDesktop, openBrowser, openFiles,
491
491
  });
@@ -605,7 +605,7 @@ export function SessionPanelProvider({ sessionId, isSessionBusy = false, project
605
605
  files,
606
606
  context,
607
607
  apps,
608
- outputsDefaultOpen,
608
+ isSessionBusy,
609
609
  detail,
610
610
  terminalOpen,
611
611
  terminalSwap,
@@ -627,7 +627,7 @@ export function SessionPanelProvider({ sessionId, isSessionBusy = false, project
627
627
  files,
628
628
  context,
629
629
  apps,
630
- outputsDefaultOpen,
630
+ isSessionBusy,
631
631
  detail,
632
632
  terminalOpen,
633
633
  terminalSwap,
@@ -21,7 +21,8 @@ import { looksLikeHtml, parseWebSearchOutput, wsDomain, } from '@kortix/sdk';
21
21
  import { getToolPrimaryArg, normalizeName } from '../../tool/tool-meta.js';
22
22
  import { extractReadableHtml } from '../../../_vendor/kortix-shared.js';
23
23
  import { contextLabelForTool, createArtifactKind, familyForTool, narrationToolName as humanizeToolName, } from '@kortix/sdk';
24
- import { imageGenView, toolCallMetadata, toolKind } from '@kortix/sdk';
24
+ import { imageGenView, parseReachable, toolCallMetadata, toolKind } from '@kortix/sdk';
25
+ import { multiAgentTool, parseKortixToolResult } from '../../tool/tools/kortix-tool-card.js';
25
26
  function filePathOf(call) {
26
27
  const input = inputOf(call);
27
28
  const p = input.filePath ?? input.file_path ?? input.path;
@@ -59,6 +60,11 @@ function inputOf(call) {
59
60
  ? input
60
61
  : {};
61
62
  }
63
+ /** A `list_agents` call that answered with no agent besides the asking session. */
64
+ function foundNoAgents(call) {
65
+ const result = parseKortixToolResult(rawOutputOf(call), call.name);
66
+ return (parseReachable(result?.data)?.length ?? 0) === 0;
67
+ }
62
68
  /** A completed call's output text as the tool returned it, without the
63
69
  * bash-only tag stripping `partOutput` (tool/shared/infrastructure.tsx) does —
64
70
  * image_gen/presentation_gen output is a flat JSON payload, never bash's
@@ -483,6 +489,13 @@ export function deriveContext(calls) {
483
489
  const family = familyForTool(call.name);
484
490
  if (family === 'hidden')
485
491
  continue; // context-engine bookkeeping — never shown
492
+ // A question the agent asked the user is not something it looked at: the
493
+ // chat already shows it, with the answer.
494
+ if (toolKind(call.name) === 'question')
495
+ continue;
496
+ // A check for other agents that found none says nothing: no row.
497
+ if (multiAgentTool(call.name) === 'list_agents' && foundNoAgents(call))
498
+ continue;
486
499
  if (toolKind(call.name) === 'read') {
487
500
  const path = filePathOf(call) ?? getToolPrimaryArg(call);
488
501
  if (!path || seenFiles.has(path))
@@ -2,7 +2,6 @@ import type { SessionPanelValue } from '../session-panel-provider.js';
2
2
  import type { usePanelDerivations } from './use-panel-derivations.js';
3
3
  type Handoffs = Pick<SessionPanelValue, 'sessionId' | 'projectId' | 'projectSessionId' | 'detail' | 'handleOpenOutput' | 'openDetail' | 'closeDetail' | 'openTerminal' | 'openAudit' | 'openReminders' | 'openDesktop' | 'openBrowser' | 'openFiles'> & Pick<ReturnType<typeof usePanelDerivations>, 'isRunning' | 'outcome' | 'apps' | 'files' | 'steps' | 'calls'>;
4
4
  export declare function usePanelHandoffs({ sessionId, projectId, projectSessionId, isRunning, outcome, apps, files, steps, calls, detail, handleOpenOutput, openDetail, closeDetail, openTerminal, openAudit, openReminders, openDesktop, openBrowser, openFiles, }: Handoffs): {
5
- outputsDefaultOpen: boolean;
6
5
  pendingQuickView: {
7
6
  sessionId: string;
8
7
  view: import("../../../internal/stores/kortix-computer-store.js").QuickView;