@tutti-os/agent-gui 0.0.47 → 0.0.48
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.
- package/dist/agent-conversation/index.d.ts +4 -4
- package/dist/agent-conversation/index.js +6 -6
- package/dist/agent-message-center/index.d.ts +2 -2
- package/dist/agent-message-center/index.js +35 -13
- package/dist/agent-message-center/index.js.map +1 -1
- package/dist/{agentConversationVM-BTMtRteS.d.ts → agentConversationVM-DSXrFL9v.d.ts} +5 -1
- package/dist/{agentGuiNodeTypes-B5Y6yDKy.d.ts → agentGuiNodeTypes-Bp1G8pOj.d.ts} +4 -4
- package/dist/app/renderer/agentactivity.css +62 -12
- package/dist/{chunk-XJXSR5XI.js → chunk-6YN7HQL5.js} +125 -34
- package/dist/chunk-6YN7HQL5.js.map +1 -0
- package/dist/{chunk-MCH35MAX.js → chunk-7W3VWU5R.js} +10 -6
- package/dist/chunk-7W3VWU5R.js.map +1 -0
- package/dist/{chunk-Q4X6Q4E6.js → chunk-EUOGIKT7.js} +2 -2
- package/dist/{chunk-ZAF4IVUT.js → chunk-LWMC2YA3.js} +431 -359
- package/dist/chunk-LWMC2YA3.js.map +1 -0
- package/dist/{chunk-5QTC2L52.js → chunk-N6HRVMIS.js} +2 -2
- package/dist/{chunk-KACBTC7Y.js → chunk-NETHPCSA.js} +11 -3
- package/dist/chunk-NETHPCSA.js.map +1 -0
- package/dist/{chunk-J3SJZMI5.js → chunk-OB43QOMC.js} +2 -2
- package/dist/{chunk-2FOBSURO.js → chunk-OYQZRLJQ.js} +2 -2
- package/dist/{chunk-7NCWSH7U.js → chunk-RNIY43TA.js} +5 -5
- package/dist/{chunk-VE6JY2TH.js → chunk-U6JWW45G.js} +1 -1
- package/dist/chunk-U6JWW45G.js.map +1 -0
- package/dist/{chunk-HCS3HUUX.js → chunk-VGDPBC6W.js} +37 -7
- package/dist/chunk-VGDPBC6W.js.map +1 -0
- package/dist/{chunk-KUCWRSXU.js → chunk-ZVKRNEOF.js} +2 -2
- package/dist/context-mention-palette/index.js +7 -7
- package/dist/i18n/index.d.ts +10 -2
- package/dist/i18n/index.js +2 -2
- package/dist/index.d.ts +290 -8
- package/dist/index.js +189 -44
- package/dist/index.js.map +1 -1
- package/dist/plan-decision-ops.d.ts +2 -2
- package/dist/queued-prompt-runtime.d.ts +3 -3
- package/dist/workbench/index.js +3 -3
- package/dist/workbench/sessionTitle.js +3 -3
- package/dist/workspace-agent-generated-files.d.ts +1 -1
- package/dist/workspace-agent-generated-files.js +3 -3
- package/dist/{workspaceAgentActivityListViewModel-DLnMBMoh.d.ts → workspaceAgentActivityListViewModel-B5viw5Da.d.ts} +1 -1
- package/package.json +12 -12
- package/dist/chunk-HCS3HUUX.js.map +0 -1
- package/dist/chunk-KACBTC7Y.js.map +0 -1
- package/dist/chunk-MCH35MAX.js.map +0 -1
- package/dist/chunk-VE6JY2TH.js.map +0 -1
- package/dist/chunk-XJXSR5XI.js.map +0 -1
- package/dist/chunk-ZAF4IVUT.js.map +0 -1
- /package/dist/{chunk-Q4X6Q4E6.js.map → chunk-EUOGIKT7.js.map} +0 -0
- /package/dist/{chunk-5QTC2L52.js.map → chunk-N6HRVMIS.js.map} +0 -0
- /package/dist/{chunk-J3SJZMI5.js.map → chunk-OB43QOMC.js.map} +0 -0
- /package/dist/{chunk-2FOBSURO.js.map → chunk-OYQZRLJQ.js.map} +0 -0
- /package/dist/{chunk-7NCWSH7U.js.map → chunk-RNIY43TA.js.map} +0 -0
- /package/dist/{chunk-KUCWRSXU.js.map → chunk-ZVKRNEOF.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { W as WorkspaceAgentActivityCard, n as WorkspaceAgentActivitySession, T as ToolCallStatusKind, q as WorkspaceAgentActivityTimelineItem } from './workspaceAgentActivityListViewModel-
|
|
1
|
+
import { W as WorkspaceAgentActivityCard, n as WorkspaceAgentActivitySession, T as ToolCallStatusKind, q as WorkspaceAgentActivityTimelineItem } from './workspaceAgentActivityListViewModel-B5viw5Da.js';
|
|
2
2
|
|
|
3
3
|
interface WorkspaceAgentSessionDetailMessage {
|
|
4
4
|
id: string;
|
|
@@ -214,6 +214,8 @@ interface AgentPlanModeItemVM {
|
|
|
214
214
|
plan?: string | null;
|
|
215
215
|
status: string | null;
|
|
216
216
|
filePath?: string | null;
|
|
217
|
+
options?: AgentApprovalOptionVM[];
|
|
218
|
+
keepPlanningOptionId?: string;
|
|
217
219
|
occurredAtUnixMs: number | null;
|
|
218
220
|
}
|
|
219
221
|
|
|
@@ -341,6 +343,8 @@ type AgentConversationPromptVM = AgentApprovalItemVM | {
|
|
|
341
343
|
kind: "exit-plan";
|
|
342
344
|
requestId: string;
|
|
343
345
|
title: string;
|
|
346
|
+
options: AgentApprovalOptionVM[];
|
|
347
|
+
keepPlanningOptionId?: string;
|
|
344
348
|
} | {
|
|
345
349
|
kind: "plan-implementation";
|
|
346
350
|
requestId: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AgentActivityUsage } from '@tutti-os/agent-activity-core';
|
|
2
|
-
import { e as AgentHostAgentSessionCommand, f as AgentHostAgentSessionComposerSettings, h as AgentHostAgentSessionReasoningEffort, i as AgentHostAgentSessionSpeed, g as AgentHostAgentSessionPermissionConfig, j as AgentHostAgentSessionState, a as AgentGUIProvider,
|
|
3
|
-
import { A as AgentHostBatchUserInfoInput, a as AgentHostBatchUserInfoResult, b as AgentHostDeleteWorkspaceAgentSessionInput, k as AgentHostWorkspaceAgentSessionSummaryInput, j as AgentHostWorkspaceAgentSessionSummary, e as AgentHostWorkspaceAgentListInput, l as AgentHostWorkspaceAgentSnapshot, i as AgentHostWorkspaceAgentSessionMessagesInput, h as AgentHostWorkspaceAgentSessionMessages, p as WorkspaceAgentActivitySyncState } from './workspaceAgentActivityListViewModel-
|
|
4
|
-
import { A as AgentApprovalItemVM, a as AgentAskUserQuestionVM, b as AgentConversationPromptVM, c as AgentConversationVM, W as WorkspaceAgentSessionDetailViewModel } from './agentConversationVM-
|
|
2
|
+
import { e as AgentHostAgentSessionCommand, f as AgentHostAgentSessionComposerSettings, h as AgentHostAgentSessionReasoningEffort, i as AgentHostAgentSessionSpeed, g as AgentHostAgentSessionPermissionConfig, j as AgentHostAgentSessionState, a as AgentGUIProvider, m as AgentPromptContentBlock, A as AgentGUINodeData, b as AgentGUIProviderTarget } from './types-xMz0lJWt.js';
|
|
3
|
+
import { A as AgentHostBatchUserInfoInput, a as AgentHostBatchUserInfoResult, b as AgentHostDeleteWorkspaceAgentSessionInput, k as AgentHostWorkspaceAgentSessionSummaryInput, j as AgentHostWorkspaceAgentSessionSummary, e as AgentHostWorkspaceAgentListInput, l as AgentHostWorkspaceAgentSnapshot, i as AgentHostWorkspaceAgentSessionMessagesInput, h as AgentHostWorkspaceAgentSessionMessages, p as WorkspaceAgentActivitySyncState } from './workspaceAgentActivityListViewModel-B5viw5Da.js';
|
|
4
|
+
import { A as AgentApprovalItemVM, a as AgentAskUserQuestionVM, b as AgentConversationPromptVM, c as AgentConversationVM, W as WorkspaceAgentSessionDetailViewModel } from './agentConversationVM-DSXrFL9v.js';
|
|
5
5
|
import { WorkspaceUserProjectService } from '@tutti-os/workspace-user-project/contracts';
|
|
6
6
|
|
|
7
7
|
declare const APP_ERROR_CODES: readonly ["common.invalid_input", "common.approved_path_required", "common.unavailable", "common.unexpected", "session.not_found", "control_surface.unauthorized", "workspace.select_directory_failed", "workspace.select_files_failed", "workspace.ensure_directory_failed", "workspace.import_files_failed", "workspace.read_file_failed", "workspace.write_file_failed", "workspace.export_file_failed", "workspace.copy_path_failed", "workspace.host_unsupported", "workspace.runtime_artifact_unavailable", "runtime.guest_agent_lane_unavailable", "workspace.room_full", "workspace.room_delete_forbidden", "workspace.room_delete_not_found", "filesystem.create_directory_failed", "filesystem.read_file_bytes_failed", "filesystem.read_file_text_failed", "filesystem.write_file_text_failed", "filesystem.copy_entry_failed", "filesystem.move_entry_failed", "filesystem.rename_entry_failed", "filesystem.delete_entry_failed", "filesystem.read_directory_failed", "filesystem.stat_failed", "terminal.spawn_failed", "terminal.write_failed", "terminal.resize_failed", "terminal.close_failed", "terminal.attach_failed", "terminal.detach_failed", "terminal.snapshot_failed", "agent.list_models_failed", "agent.launch_failed", "agent.read_last_message_failed", "agent.provider_session_not_found", "agent.resume_session_not_local", "agent.resume_session_resolve_failed", "agent.settings_require_new_session", "task.suggest_title_failed", "persistence.unavailable", "persistence.quota_exceeded", "persistence.payload_too_large", "persistence.io_failed", "persistence.invalid_state", "persistence.invalid_node_id", "update.get_state_failed", "update.configure_failed", "update.check_failed", "update.download_failed", "update.install_failed", "PACKAGE_DOWNLOAD_INTERRUPTED", "PACKAGE_DOWNLOAD_HTTP_STATUS", "PACKAGE_DOWNLOAD_INVALID", "PACKAGE_DOWNLOAD_DISK_ERROR"];
|
|
@@ -611,4 +611,4 @@ interface AgentGUINodeViewModel {
|
|
|
611
611
|
inlineNotice: AgentGUIInlineNotice | null;
|
|
612
612
|
}
|
|
613
613
|
|
|
614
|
-
export type {
|
|
614
|
+
export type { AgentComposerDraft as A, PersistWriteResult as P, ReadWorkspaceAgentReadStateInput as R, WorkspaceAgentReadStateSnapshot as W, AgentGUIComposerSettingsVM as a, AgentGUINodeViewModel as b, AgentGUIProviderSkillOption as c, AgentGUIQueuedPromptVM as d, AgentHostApi as e, AgentHostApplyWorkspaceGitPatchInput as f, AgentHostInputApi as g, AgentHostRuntimeApi as h, AgentHostSelectFilesInput as i, AgentProbeProvider as j, AgentProbeSnapshot as k, AgentProviderProbeListInput as l, AgentProviderProbeListResult as m, AgentSessionCommand as n, AgentUsageQuota as o, AgentUsageSnapshot as p, WriteWorkspaceAgentReadStateInput as q };
|
|
@@ -119,11 +119,11 @@
|
|
|
119
119
|
z-index: 100301;
|
|
120
120
|
display: flex;
|
|
121
121
|
align-items: center;
|
|
122
|
-
gap:
|
|
123
|
-
height:
|
|
124
|
-
padding: 0
|
|
122
|
+
gap: 2px;
|
|
123
|
+
height: 32px;
|
|
124
|
+
padding: 0 2px;
|
|
125
125
|
border-radius: 999px;
|
|
126
|
-
background:
|
|
126
|
+
background: var(--background-fronted);
|
|
127
127
|
box-shadow:
|
|
128
128
|
0 18px 40px color-mix(in srgb, black 26%, transparent),
|
|
129
129
|
0 0 0 1px color-mix(in srgb, white 12%, transparent);
|
|
@@ -168,9 +168,10 @@
|
|
|
168
168
|
|
|
169
169
|
.tsh-zoom-dialog__zoom-controls button {
|
|
170
170
|
justify-content: center;
|
|
171
|
-
width:
|
|
172
|
-
height:
|
|
171
|
+
width: 28px;
|
|
172
|
+
height: 28px;
|
|
173
173
|
padding: 0;
|
|
174
|
+
border-radius: 999px;
|
|
174
175
|
}
|
|
175
176
|
|
|
176
177
|
.tsh-zoom-dialog__zoom-controls button:disabled {
|
|
@@ -183,8 +184,8 @@
|
|
|
183
184
|
padding: 0 4px;
|
|
184
185
|
text-align: center;
|
|
185
186
|
font-size: 12px;
|
|
186
|
-
line-height:
|
|
187
|
-
color: var(--text-
|
|
187
|
+
line-height: 28px;
|
|
188
|
+
color: var(--text-primary);
|
|
188
189
|
font-variant-numeric: tabular-nums;
|
|
189
190
|
}
|
|
190
191
|
|
|
@@ -208,11 +209,14 @@
|
|
|
208
209
|
|
|
209
210
|
.tsh-zoom-dialog__icon-button:hover,
|
|
210
211
|
.tsh-zoom-dialog__image-actions button:hover,
|
|
211
|
-
.tsh-zoom-dialog__zoom-controls button:not(:disabled):hover,
|
|
212
212
|
.tsh-image-context-menu button:hover {
|
|
213
213
|
background: color-mix(in srgb, var(--background-panel) 82%, white 12%);
|
|
214
214
|
}
|
|
215
215
|
|
|
216
|
+
.tsh-zoom-dialog__zoom-controls button:not(:disabled):hover {
|
|
217
|
+
background: color-mix(in srgb, var(--background-panel) 86%, black 8%);
|
|
218
|
+
}
|
|
219
|
+
|
|
216
220
|
.workspace-agents-status-panel {
|
|
217
221
|
--workspace-agents-status-panel-chrome-gap: 8px;
|
|
218
222
|
--workspace-room-top-bar-safe-area: 52px;
|
|
@@ -1497,6 +1501,46 @@ aside.workspace-agents-status-panel
|
|
|
1497
1501
|
color: var(--agent-turn-summary-path);
|
|
1498
1502
|
}
|
|
1499
1503
|
|
|
1504
|
+
.agent-turn-summary-card__path-directory,
|
|
1505
|
+
.agent-turn-summary-card__path-file {
|
|
1506
|
+
min-width: 0;
|
|
1507
|
+
overflow: hidden;
|
|
1508
|
+
text-overflow: ellipsis;
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
.agent-turn-summary-card__path-directory {
|
|
1512
|
+
flex: 0 1 auto;
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
.agent-turn-summary-card__path-file {
|
|
1516
|
+
flex: 0 0 auto;
|
|
1517
|
+
max-width: 100%;
|
|
1518
|
+
}
|
|
1519
|
+
|
|
1520
|
+
.agent-path-tail-label {
|
|
1521
|
+
display: flex;
|
|
1522
|
+
min-width: 0;
|
|
1523
|
+
max-width: 100%;
|
|
1524
|
+
overflow: hidden;
|
|
1525
|
+
white-space: nowrap;
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
.agent-path-tail-label__directory,
|
|
1529
|
+
.agent-path-tail-label__file {
|
|
1530
|
+
min-width: 0;
|
|
1531
|
+
overflow: hidden;
|
|
1532
|
+
text-overflow: ellipsis;
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
.agent-path-tail-label__directory {
|
|
1536
|
+
flex: 0 1 auto;
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
.agent-path-tail-label__file {
|
|
1540
|
+
flex: 0 0 auto;
|
|
1541
|
+
max-width: 100%;
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1500
1544
|
.workspace-agents-status-panel__detail-turn-summary
|
|
1501
1545
|
.workspace-agents-status-panel__detail-tool-diff-added {
|
|
1502
1546
|
color: var(--state-success);
|
|
@@ -2632,7 +2676,7 @@ aside.workspace-agents-status-panel
|
|
|
2632
2676
|
.agent-gui-chrome__card--danger {
|
|
2633
2677
|
border-color: color-mix(
|
|
2634
2678
|
in srgb,
|
|
2635
|
-
var(--status-danger, var(--state-danger))
|
|
2679
|
+
var(--status-danger, var(--state-danger)) 28%,
|
|
2636
2680
|
transparent
|
|
2637
2681
|
);
|
|
2638
2682
|
border-bottom: 0;
|
|
@@ -2640,7 +2684,11 @@ aside.workspace-agents-status-panel
|
|
|
2640
2684
|
border-top-right-radius: 8px;
|
|
2641
2685
|
border-bottom-right-radius: 0;
|
|
2642
2686
|
border-bottom-left-radius: 0;
|
|
2643
|
-
background:
|
|
2687
|
+
background: color-mix(
|
|
2688
|
+
in srgb,
|
|
2689
|
+
var(--status-danger, var(--state-danger)) 10%,
|
|
2690
|
+
var(--background-fronted)
|
|
2691
|
+
);
|
|
2644
2692
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
2645
2693
|
align-items: center;
|
|
2646
2694
|
min-height: 36px;
|
|
@@ -5090,6 +5138,7 @@ button.agent-gui-node__conversation-section-toggle:hover
|
|
|
5090
5138
|
gap: 6px;
|
|
5091
5139
|
align-items: center;
|
|
5092
5140
|
min-width: 0;
|
|
5141
|
+
margin-bottom: 12px;
|
|
5093
5142
|
padding: 2px 6px 0 22px;
|
|
5094
5143
|
}
|
|
5095
5144
|
|
|
@@ -6005,7 +6054,7 @@ button.agent-gui-node__conversation-section-toggle:hover
|
|
|
6005
6054
|
margin-left:auto has no free space to absorb and the message text would butt
|
|
6006
6055
|
directly against "Set up". Space the message and action explicitly. */
|
|
6007
6056
|
column-gap: 6px;
|
|
6008
|
-
pointer-events:
|
|
6057
|
+
pointer-events: none;
|
|
6009
6058
|
}
|
|
6010
6059
|
|
|
6011
6060
|
.agent-gui-node__detail-header + .agent-gui-node__provider-setup-notice {
|
|
@@ -6022,6 +6071,7 @@ button.agent-gui-node__conversation-section-toggle:hover
|
|
|
6022
6071
|
font: inherit;
|
|
6023
6072
|
text-decoration: underline;
|
|
6024
6073
|
cursor: pointer;
|
|
6074
|
+
pointer-events: auto;
|
|
6025
6075
|
-webkit-app-region: no-drag;
|
|
6026
6076
|
}
|
|
6027
6077
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getOptionalAgentHostApi,
|
|
3
3
|
useOptionalAgentHostApi
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-U6JWW45G.js";
|
|
5
5
|
import {
|
|
6
6
|
resolveAgentWorkspaceFileVisualKind
|
|
7
7
|
} from "./chunk-PJP5BUU6.js";
|
|
8
8
|
import {
|
|
9
9
|
translate,
|
|
10
10
|
useTranslation
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-N6HRVMIS.js";
|
|
12
12
|
|
|
13
13
|
// shared/agentMcpToolTarget.ts
|
|
14
14
|
function extractAgentMcpToolTarget({
|
|
@@ -144,28 +144,86 @@ function objectValue(value) {
|
|
|
144
144
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
+
// shared/agentConversation/exitPlanOptions.ts
|
|
148
|
+
var EXIT_PLAN_KEEP_PLANNING_OPTION_ID = "plan";
|
|
149
|
+
function isExitPlanSwitchModeInput(input) {
|
|
150
|
+
const record = recordValue(input);
|
|
151
|
+
const toolCall = recordValue(record.toolCall);
|
|
152
|
+
if (normalizeToken(stringValue2(toolCall.kind)) !== "switchmode") {
|
|
153
|
+
return false;
|
|
154
|
+
}
|
|
155
|
+
return collectRawOptions(record).some(
|
|
156
|
+
(option) => normalizeToken(rawOptionId(option)) === EXIT_PLAN_KEEP_PLANNING_OPTION_ID
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
function extractExitPlanModeOptions(input, payload) {
|
|
160
|
+
const sources = payload === void 0 ? [recordValue(input)] : [recordValue(input), recordValue(payload)];
|
|
161
|
+
return sources.flatMap(collectRawOptions).flatMap((option) => {
|
|
162
|
+
const id = rawOptionId(option);
|
|
163
|
+
if (!id || normalizeToken(id) === EXIT_PLAN_KEEP_PLANNING_OPTION_ID) {
|
|
164
|
+
return [];
|
|
165
|
+
}
|
|
166
|
+
return [
|
|
167
|
+
{
|
|
168
|
+
id,
|
|
169
|
+
label: stringValue2(option.name) ?? stringValue2(option.label) ?? stringValue2(option.title) ?? stringValue2(option.kind) ?? id,
|
|
170
|
+
kind: stringValue2(option.kind) ?? id,
|
|
171
|
+
...stringValue2(option.description) ? { description: stringValue2(option.description) } : {}
|
|
172
|
+
}
|
|
173
|
+
];
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
function extractExitPlanKeepPlanningOptionId(input, payload) {
|
|
177
|
+
const sources = payload === void 0 ? [recordValue(input)] : [recordValue(input), recordValue(payload)];
|
|
178
|
+
for (const option of sources.flatMap(collectRawOptions)) {
|
|
179
|
+
const id = rawOptionId(option);
|
|
180
|
+
if (id && normalizeToken(id) === EXIT_PLAN_KEEP_PLANNING_OPTION_ID) {
|
|
181
|
+
return id;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
return null;
|
|
185
|
+
}
|
|
186
|
+
function collectRawOptions(record) {
|
|
187
|
+
return arrayValue(record.options).map(recordValue);
|
|
188
|
+
}
|
|
189
|
+
function rawOptionId(option) {
|
|
190
|
+
return stringValue2(option.optionId) ?? stringValue2(option.id) ?? stringValue2(option.kind) ?? "";
|
|
191
|
+
}
|
|
192
|
+
function normalizeToken(value) {
|
|
193
|
+
return (value ?? "").replace(/[_\s-]+/g, "").trim().toLowerCase();
|
|
194
|
+
}
|
|
195
|
+
function stringValue2(value) {
|
|
196
|
+
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
197
|
+
}
|
|
198
|
+
function recordValue(value) {
|
|
199
|
+
return value && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
200
|
+
}
|
|
201
|
+
function arrayValue(value) {
|
|
202
|
+
return Array.isArray(value) ? value : [];
|
|
203
|
+
}
|
|
204
|
+
|
|
147
205
|
// shared/agentConversation/askUserQuestions.ts
|
|
148
206
|
function normalizeAskUserQuestions(rawQuestions) {
|
|
149
|
-
return
|
|
207
|
+
return arrayValue2(rawQuestions).flatMap((value, index) => {
|
|
150
208
|
const question = objectValue2(value);
|
|
151
209
|
if (!question) {
|
|
152
210
|
return [];
|
|
153
211
|
}
|
|
154
212
|
return [
|
|
155
213
|
{
|
|
156
|
-
id:
|
|
157
|
-
header:
|
|
158
|
-
question:
|
|
159
|
-
options:
|
|
214
|
+
id: stringValue3(question.id) ?? `question-${index + 1}`,
|
|
215
|
+
header: stringValue3(question.header) ?? `Question ${index + 1}`,
|
|
216
|
+
question: stringValue3(question.question) ?? stringValue3(question.header) ?? `Question ${index + 1}`,
|
|
217
|
+
options: arrayValue2(question.options).flatMap((optionValue) => {
|
|
160
218
|
const option = objectValue2(optionValue);
|
|
161
|
-
const label =
|
|
219
|
+
const label = stringValue3(option?.label);
|
|
162
220
|
if (!label) {
|
|
163
221
|
return [];
|
|
164
222
|
}
|
|
165
223
|
return [
|
|
166
224
|
{
|
|
167
225
|
label,
|
|
168
|
-
description:
|
|
226
|
+
description: stringValue3(option?.description) ?? ""
|
|
169
227
|
}
|
|
170
228
|
];
|
|
171
229
|
}),
|
|
@@ -174,13 +232,13 @@ function normalizeAskUserQuestions(rawQuestions) {
|
|
|
174
232
|
];
|
|
175
233
|
});
|
|
176
234
|
}
|
|
177
|
-
function
|
|
235
|
+
function stringValue3(value) {
|
|
178
236
|
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
179
237
|
}
|
|
180
238
|
function objectValue2(value) {
|
|
181
239
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
182
240
|
}
|
|
183
|
-
function
|
|
241
|
+
function arrayValue2(value) {
|
|
184
242
|
return Array.isArray(value) ? value : [];
|
|
185
243
|
}
|
|
186
244
|
|
|
@@ -375,6 +433,7 @@ function ZoomableImage({
|
|
|
375
433
|
const [copyStatus, setCopyStatus] = useState2(null);
|
|
376
434
|
const [imagePreviewZoom, setImagePreviewZoom] = useState2(1);
|
|
377
435
|
const [isWheelZooming, setIsWheelZooming] = useState2(false);
|
|
436
|
+
const [isImagePreviewOpen, setIsImagePreviewOpen] = useState2(false);
|
|
378
437
|
const imagePreviewZoomPercent = Math.round(imagePreviewZoom * 100);
|
|
379
438
|
const canZoomOut = imagePreviewZoom > IMAGE_PREVIEW_ZOOM_MIN;
|
|
380
439
|
const canZoomIn = imagePreviewZoom < IMAGE_PREVIEW_ZOOM_MAX;
|
|
@@ -566,6 +625,19 @@ function ZoomableImage({
|
|
|
566
625
|
)
|
|
567
626
|
}
|
|
568
627
|
) : null,
|
|
628
|
+
copyStatus ? /* @__PURE__ */ jsx2(
|
|
629
|
+
ImageCopyStatusToast,
|
|
630
|
+
{
|
|
631
|
+
busy: copyStatus.busy,
|
|
632
|
+
message: copyStatus.message,
|
|
633
|
+
variant: copyStatus.variant,
|
|
634
|
+
onOpenChange: (open) => {
|
|
635
|
+
if (!open) {
|
|
636
|
+
setCopyStatus(null);
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
) : null,
|
|
569
641
|
/* @__PURE__ */ jsx2(
|
|
570
642
|
Button,
|
|
571
643
|
{
|
|
@@ -598,6 +670,13 @@ function ZoomableImage({
|
|
|
598
670
|
wrapElement,
|
|
599
671
|
zoomMargin: 24,
|
|
600
672
|
ZoomContent: renderZoomContent,
|
|
673
|
+
onZoomChange: (zoomed) => {
|
|
674
|
+
setIsImagePreviewOpen(zoomed);
|
|
675
|
+
if (!zoomed) {
|
|
676
|
+
setIsWheelZooming(false);
|
|
677
|
+
setImagePreviewZoom(1);
|
|
678
|
+
}
|
|
679
|
+
},
|
|
601
680
|
children: /* @__PURE__ */ jsx2(
|
|
602
681
|
"img",
|
|
603
682
|
{
|
|
@@ -610,29 +689,32 @@ function ZoomableImage({
|
|
|
610
689
|
)
|
|
611
690
|
}
|
|
612
691
|
),
|
|
613
|
-
contextMenuPosition && !contextMenuPosition.inZoomDialog && actionButtons ?
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
692
|
+
contextMenuPosition && !contextMenuPosition.inZoomDialog && actionButtons ? createPortal(
|
|
693
|
+
/* @__PURE__ */ jsx2(
|
|
694
|
+
"div",
|
|
695
|
+
{
|
|
696
|
+
className: "tsh-image-context-menu nodrag tsh-desktop-no-drag",
|
|
697
|
+
style: {
|
|
698
|
+
left: contextMenuPosition.x,
|
|
699
|
+
top: contextMenuPosition.y
|
|
700
|
+
},
|
|
701
|
+
role: "menu",
|
|
702
|
+
onClick: (event) => event.stopPropagation(),
|
|
703
|
+
children: /* @__PURE__ */ jsx2(
|
|
704
|
+
ImageActionButtons,
|
|
705
|
+
{
|
|
706
|
+
copyLabel: t("common.copyImage"),
|
|
707
|
+
downloadLabel: t("common.downloadImage"),
|
|
708
|
+
itemRole: "menuitem",
|
|
709
|
+
onCopy: handleCopyImageAction,
|
|
710
|
+
onDownload: handleDownloadImage
|
|
711
|
+
}
|
|
712
|
+
)
|
|
713
|
+
}
|
|
714
|
+
),
|
|
715
|
+
document.body
|
|
634
716
|
) : null,
|
|
635
|
-
copyStatus ? createPortal(
|
|
717
|
+
copyStatus && !isImagePreviewOpen ? createPortal(
|
|
636
718
|
/* @__PURE__ */ jsx2(
|
|
637
719
|
ImageCopyStatusToast,
|
|
638
720
|
{
|
|
@@ -664,6 +746,8 @@ function ImageCopyStatusToast({
|
|
|
664
746
|
anchor: "viewport",
|
|
665
747
|
busy,
|
|
666
748
|
variant,
|
|
749
|
+
"data-tsh-image-copy-status": "true",
|
|
750
|
+
style: { zIndex: 100303 },
|
|
667
751
|
onOpenChange,
|
|
668
752
|
children: /* @__PURE__ */ jsx2(ToastTitle, { children: message })
|
|
669
753
|
}
|
|
@@ -763,6 +847,7 @@ function ImageActionButtons({
|
|
|
763
847
|
className: "tsh-zoom-dialog__icon-button",
|
|
764
848
|
size: "icon",
|
|
765
849
|
title: copyLabel,
|
|
850
|
+
onPointerDown: (event) => event.stopPropagation(),
|
|
766
851
|
variant: "chrome",
|
|
767
852
|
onClick: (event) => {
|
|
768
853
|
event.preventDefault();
|
|
@@ -779,6 +864,7 @@ function ImageActionButtons({
|
|
|
779
864
|
className: "tsh-zoom-dialog__icon-button",
|
|
780
865
|
size: "icon",
|
|
781
866
|
title: downloadLabel,
|
|
867
|
+
onPointerDown: (event) => event.stopPropagation(),
|
|
782
868
|
variant: "chrome",
|
|
783
869
|
onClick: (event) => {
|
|
784
870
|
event.preventDefault();
|
|
@@ -797,6 +883,7 @@ function ImageActionButtons({
|
|
|
797
883
|
type: "button",
|
|
798
884
|
role: itemRole,
|
|
799
885
|
title: copyLabel,
|
|
886
|
+
onPointerDown: (event) => event.stopPropagation(),
|
|
800
887
|
onClick: (event) => {
|
|
801
888
|
event.preventDefault();
|
|
802
889
|
event.stopPropagation();
|
|
@@ -814,6 +901,7 @@ function ImageActionButtons({
|
|
|
814
901
|
type: "button",
|
|
815
902
|
role: itemRole,
|
|
816
903
|
title: downloadLabel,
|
|
904
|
+
onPointerDown: (event) => event.stopPropagation(),
|
|
817
905
|
onClick: (event) => {
|
|
818
906
|
event.preventDefault();
|
|
819
907
|
event.stopPropagation();
|
|
@@ -3474,6 +3562,9 @@ function clamp(value, min, max) {
|
|
|
3474
3562
|
export {
|
|
3475
3563
|
cn,
|
|
3476
3564
|
extractAgentMcpToolTarget,
|
|
3565
|
+
isExitPlanSwitchModeInput,
|
|
3566
|
+
extractExitPlanModeOptions,
|
|
3567
|
+
extractExitPlanKeepPlanningOptionId,
|
|
3477
3568
|
normalizeAskUserQuestions,
|
|
3478
3569
|
resolveWorkspaceFilePathCandidate,
|
|
3479
3570
|
resolveWorkspaceFileLinkAction,
|
|
@@ -3484,4 +3575,4 @@ export {
|
|
|
3484
3575
|
CustomScrollArea,
|
|
3485
3576
|
MessageSquareMoreIcon
|
|
3486
3577
|
};
|
|
3487
|
-
//# sourceMappingURL=chunk-
|
|
3578
|
+
//# sourceMappingURL=chunk-6YN7HQL5.js.map
|