@bolt-foundry/gambit 0.8.6-rc.6 → 0.8.6-rc.7
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/CHANGELOG.md +5 -1
- package/esm/gambit/simulator-ui/dist/bundle.js +1304 -2405
- package/esm/gambit/simulator-ui/dist/bundle.js.map +4 -4
- package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorGradePage/normalization_ast.d.ts.map +1 -1
- package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorGradePage/normalization_ast.js +5 -0
- package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorGradePage/query_text.d.ts +1 -1
- package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorGradePage/query_text.d.ts.map +1 -1
- package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorGradePage/query_text.js +1 -0
- package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorGradePage/raw_response_type.d.ts +1 -0
- package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorGradePage/raw_response_type.d.ts.map +1 -1
- package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorTestPage/normalization_ast.d.ts.map +1 -1
- package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorTestPage/normalization_ast.js +5 -0
- package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorTestPage/query_text.d.ts +1 -1
- package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorTestPage/query_text.d.ts.map +1 -1
- package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorTestPage/query_text.js +1 -0
- package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorTestPage/raw_response_type.d.ts +1 -0
- package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorTestPage/raw_response_type.d.ts.map +1 -1
- package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorVerifyPage/normalization_ast.d.ts.map +1 -1
- package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorVerifyPage/normalization_ast.js +5 -0
- package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorVerifyPage/query_text.d.ts +1 -1
- package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorVerifyPage/query_text.d.ts.map +1 -1
- package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorVerifyPage/query_text.js +1 -0
- package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorVerifyPage/raw_response_type.d.ts +1 -0
- package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorVerifyPage/raw_response_type.d.ts.map +1 -1
- package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorWorkspaceShell/normalization_ast.d.ts.map +1 -1
- package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorWorkspaceShell/normalization_ast.js +5 -0
- package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorWorkspaceShell/query_text.d.ts +1 -1
- package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorWorkspaceShell/query_text.d.ts.map +1 -1
- package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorWorkspaceShell/query_text.js +1 -0
- package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorWorkspaceShell/raw_response_type.d.ts +1 -0
- package/esm/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorWorkspaceShell/raw_response_type.d.ts.map +1 -1
- package/esm/simulator-ui/__generated__/__isograph/Workspace/GradeTab/param_type.d.ts +65 -0
- package/esm/simulator-ui/__generated__/__isograph/Workspace/GradeTab/param_type.d.ts.map +1 -1
- package/esm/simulator-ui/__generated__/__isograph/Workspace/GradeTab/resolver_reader.d.ts.map +1 -1
- package/esm/simulator-ui/__generated__/__isograph/Workspace/GradeTab/resolver_reader.js +8 -1
- package/esm/simulator-ui/__generated__/__isograph/Workspace/TestTab/param_type.d.ts +82 -0
- package/esm/simulator-ui/__generated__/__isograph/Workspace/TestTab/param_type.d.ts.map +1 -1
- package/esm/simulator-ui/__generated__/__isograph/Workspace/TestTab/resolver_reader.d.ts.map +1 -1
- package/esm/simulator-ui/__generated__/__isograph/Workspace/TestTab/resolver_reader.js +8 -1
- package/esm/simulator-ui/__generated__/__isograph/Workspace/VerifyTab/param_type.d.ts +106 -0
- package/esm/simulator-ui/__generated__/__isograph/Workspace/VerifyTab/param_type.d.ts.map +1 -1
- package/esm/simulator-ui/__generated__/__isograph/Workspace/VerifyTab/resolver_reader.d.ts.map +1 -1
- package/esm/simulator-ui/__generated__/__isograph/Workspace/VerifyTab/resolver_reader.js +8 -1
- package/esm/simulator-ui/__generated__/__isograph/Workspace/WorkbenchChatDrawer/param_type.d.ts +32 -0
- package/esm/simulator-ui/__generated__/__isograph/Workspace/WorkbenchChatDrawer/param_type.d.ts.map +1 -1
- package/esm/simulator-ui/__generated__/__isograph/Workspace/WorkbenchChatDrawer/resolver_reader.d.ts.map +1 -1
- package/esm/simulator-ui/__generated__/__isograph/Workspace/WorkbenchChatDrawer/resolver_reader.js +8 -1
- package/esm/simulator-ui/isograph/components/Query/SimulatorGradePage.d.ts.map +1 -1
- package/esm/simulator-ui/isograph/components/Query/SimulatorGradePage.js +76 -2
- package/esm/simulator-ui/isograph/components/Query/SimulatorTestPage.d.ts.map +1 -1
- package/esm/simulator-ui/isograph/components/Query/SimulatorTestPage.js +80 -6
- package/esm/simulator-ui/isograph/components/Query/SimulatorVerifyPage.d.ts.map +1 -1
- package/esm/simulator-ui/isograph/components/Query/SimulatorVerifyPage.js +24 -1
- package/esm/simulator-ui/isograph/components/Workspace/WorkbenchChatDrawer.d.ts.map +1 -1
- package/esm/simulator-ui/isograph/components/Workspace/WorkbenchChatDrawer.js +16 -6
- package/esm/simulator-ui/isograph/components/WorkspaceConversationRun/WorkbenchConversationRunChat.d.ts +4 -0
- package/esm/simulator-ui/isograph/components/WorkspaceConversationRun/WorkbenchConversationRunChat.d.ts.map +1 -1
- package/esm/simulator-ui/isograph/components/WorkspaceConversationRun/WorkbenchConversationRunChat.js +59 -24
- package/esm/simulator-ui/isograph/components/grade/GradeTabView.d.ts +14 -0
- package/esm/simulator-ui/isograph/components/grade/GradeTabView.d.ts.map +1 -1
- package/esm/simulator-ui/isograph/components/grade/GradeTabView.js +1 -1
- package/esm/simulator-ui/src/AppShell.d.ts.map +1 -1
- package/esm/simulator-ui/src/AppShell.js +6 -6
- package/esm/simulator-ui/src/Chat.d.ts +6 -30
- package/esm/simulator-ui/src/Chat.d.ts.map +1 -1
- package/esm/simulator-ui/src/Chat.js +14 -109
- package/esm/simulator-ui/src/TestBotChatPanel.d.ts +2 -0
- package/esm/simulator-ui/src/TestBotChatPanel.d.ts.map +1 -1
- package/esm/simulator-ui/src/TestBotChatPanel.js +2 -2
- package/esm/simulator-ui/src/WorkbenchDrawerIso.d.ts +2 -0
- package/esm/simulator-ui/src/WorkbenchDrawerIso.d.ts.map +1 -1
- package/esm/simulator-ui/src/WorkbenchDrawerIso.js +3 -1
- package/esm/simulator-ui/src/gds/WorkbenchComposerChip.d.ts +2 -17
- package/esm/simulator-ui/src/gds/WorkbenchComposerChip.d.ts.map +1 -1
- package/esm/simulator-ui/src/grade/GradeResultsPanel.d.ts +10 -0
- package/esm/simulator-ui/src/grade/GradeResultsPanel.d.ts.map +1 -1
- package/esm/simulator-ui/src/grade/GradeResultsPanel.js +16 -1
- package/esm/simulator-ui/src/shared.d.ts +1 -0
- package/esm/simulator-ui/src/shared.d.ts.map +1 -1
- package/esm/simulator-ui/src/shared.js +4 -2
- package/esm/simulator-ui/src/workbenchChipStore.d.ts +12 -0
- package/esm/simulator-ui/src/workbenchChipStore.d.ts.map +1 -0
- package/esm/simulator-ui/src/workbenchChipStore.js +69 -0
- package/esm/simulator-ui/src/workbenchContext.d.ts +50 -0
- package/esm/simulator-ui/src/workbenchContext.d.ts.map +1 -0
- package/esm/simulator-ui/src/workbenchContext.js +159 -0
- package/esm/src/simulator_graphql.d.ts.map +1 -1
- package/esm/src/simulator_graphql.js +5 -0
- package/package.json +1 -1
- package/script/gambit/simulator-ui/dist/bundle.js +1304 -2405
- package/script/gambit/simulator-ui/dist/bundle.js.map +4 -4
- package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorGradePage/normalization_ast.d.ts.map +1 -1
- package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorGradePage/normalization_ast.js +5 -0
- package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorGradePage/query_text.d.ts +1 -1
- package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorGradePage/query_text.d.ts.map +1 -1
- package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorGradePage/query_text.js +1 -0
- package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorGradePage/raw_response_type.d.ts +1 -0
- package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorGradePage/raw_response_type.d.ts.map +1 -1
- package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorTestPage/normalization_ast.d.ts.map +1 -1
- package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorTestPage/normalization_ast.js +5 -0
- package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorTestPage/query_text.d.ts +1 -1
- package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorTestPage/query_text.d.ts.map +1 -1
- package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorTestPage/query_text.js +1 -0
- package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorTestPage/raw_response_type.d.ts +1 -0
- package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorTestPage/raw_response_type.d.ts.map +1 -1
- package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorVerifyPage/normalization_ast.d.ts.map +1 -1
- package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorVerifyPage/normalization_ast.js +5 -0
- package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorVerifyPage/query_text.d.ts +1 -1
- package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorVerifyPage/query_text.d.ts.map +1 -1
- package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorVerifyPage/query_text.js +1 -0
- package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorVerifyPage/raw_response_type.d.ts +1 -0
- package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorVerifyPage/raw_response_type.d.ts.map +1 -1
- package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorWorkspaceShell/normalization_ast.d.ts.map +1 -1
- package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorWorkspaceShell/normalization_ast.js +5 -0
- package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorWorkspaceShell/query_text.d.ts +1 -1
- package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorWorkspaceShell/query_text.d.ts.map +1 -1
- package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorWorkspaceShell/query_text.js +1 -0
- package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorWorkspaceShell/raw_response_type.d.ts +1 -0
- package/script/simulator-ui/__generated__/__isograph/Query/EntrypointSimulatorWorkspaceShell/raw_response_type.d.ts.map +1 -1
- package/script/simulator-ui/__generated__/__isograph/Workspace/GradeTab/param_type.d.ts +65 -0
- package/script/simulator-ui/__generated__/__isograph/Workspace/GradeTab/param_type.d.ts.map +1 -1
- package/script/simulator-ui/__generated__/__isograph/Workspace/GradeTab/resolver_reader.d.ts.map +1 -1
- package/script/simulator-ui/__generated__/__isograph/Workspace/GradeTab/resolver_reader.js +8 -1
- package/script/simulator-ui/__generated__/__isograph/Workspace/TestTab/param_type.d.ts +82 -0
- package/script/simulator-ui/__generated__/__isograph/Workspace/TestTab/param_type.d.ts.map +1 -1
- package/script/simulator-ui/__generated__/__isograph/Workspace/TestTab/resolver_reader.d.ts.map +1 -1
- package/script/simulator-ui/__generated__/__isograph/Workspace/TestTab/resolver_reader.js +8 -1
- package/script/simulator-ui/__generated__/__isograph/Workspace/VerifyTab/param_type.d.ts +106 -0
- package/script/simulator-ui/__generated__/__isograph/Workspace/VerifyTab/param_type.d.ts.map +1 -1
- package/script/simulator-ui/__generated__/__isograph/Workspace/VerifyTab/resolver_reader.d.ts.map +1 -1
- package/script/simulator-ui/__generated__/__isograph/Workspace/VerifyTab/resolver_reader.js +8 -1
- package/script/simulator-ui/__generated__/__isograph/Workspace/WorkbenchChatDrawer/param_type.d.ts +32 -0
- package/script/simulator-ui/__generated__/__isograph/Workspace/WorkbenchChatDrawer/param_type.d.ts.map +1 -1
- package/script/simulator-ui/__generated__/__isograph/Workspace/WorkbenchChatDrawer/resolver_reader.d.ts.map +1 -1
- package/script/simulator-ui/__generated__/__isograph/Workspace/WorkbenchChatDrawer/resolver_reader.js +8 -1
- package/script/simulator-ui/isograph/components/Query/SimulatorGradePage.d.ts.map +1 -1
- package/script/simulator-ui/isograph/components/Query/SimulatorGradePage.js +109 -2
- package/script/simulator-ui/isograph/components/Query/SimulatorTestPage.d.ts.map +1 -1
- package/script/simulator-ui/isograph/components/Query/SimulatorTestPage.js +113 -6
- package/script/simulator-ui/isograph/components/Query/SimulatorVerifyPage.d.ts.map +1 -1
- package/script/simulator-ui/isograph/components/Query/SimulatorVerifyPage.js +24 -1
- package/script/simulator-ui/isograph/components/Workspace/WorkbenchChatDrawer.d.ts.map +1 -1
- package/script/simulator-ui/isograph/components/Workspace/WorkbenchChatDrawer.js +16 -6
- package/script/simulator-ui/isograph/components/WorkspaceConversationRun/WorkbenchConversationRunChat.d.ts +4 -0
- package/script/simulator-ui/isograph/components/WorkspaceConversationRun/WorkbenchConversationRunChat.d.ts.map +1 -1
- package/script/simulator-ui/isograph/components/WorkspaceConversationRun/WorkbenchConversationRunChat.js +58 -23
- package/script/simulator-ui/isograph/components/grade/GradeTabView.d.ts +14 -0
- package/script/simulator-ui/isograph/components/grade/GradeTabView.d.ts.map +1 -1
- package/script/simulator-ui/isograph/components/grade/GradeTabView.js +1 -1
- package/script/simulator-ui/src/AppShell.d.ts.map +1 -1
- package/script/simulator-ui/src/AppShell.js +6 -6
- package/script/simulator-ui/src/Chat.d.ts +6 -30
- package/script/simulator-ui/src/Chat.d.ts.map +1 -1
- package/script/simulator-ui/src/Chat.js +14 -109
- package/script/simulator-ui/src/TestBotChatPanel.d.ts +2 -0
- package/script/simulator-ui/src/TestBotChatPanel.d.ts.map +1 -1
- package/script/simulator-ui/src/TestBotChatPanel.js +2 -2
- package/script/simulator-ui/src/WorkbenchDrawerIso.d.ts +2 -0
- package/script/simulator-ui/src/WorkbenchDrawerIso.d.ts.map +1 -1
- package/script/simulator-ui/src/WorkbenchDrawerIso.js +3 -1
- package/script/simulator-ui/src/gds/WorkbenchComposerChip.d.ts +2 -17
- package/script/simulator-ui/src/gds/WorkbenchComposerChip.d.ts.map +1 -1
- package/script/simulator-ui/src/grade/GradeResultsPanel.d.ts +10 -0
- package/script/simulator-ui/src/grade/GradeResultsPanel.d.ts.map +1 -1
- package/script/simulator-ui/src/grade/GradeResultsPanel.js +16 -1
- package/script/simulator-ui/src/shared.d.ts +1 -0
- package/script/simulator-ui/src/shared.d.ts.map +1 -1
- package/script/simulator-ui/src/shared.js +4 -2
- package/script/simulator-ui/src/workbenchChipStore.d.ts +12 -0
- package/script/simulator-ui/src/workbenchChipStore.d.ts.map +1 -0
- package/script/simulator-ui/src/workbenchChipStore.js +108 -0
- package/script/simulator-ui/src/workbenchContext.d.ts +50 -0
- package/script/simulator-ui/src/workbenchContext.d.ts.map +1 -0
- package/script/simulator-ui/src/workbenchContext.js +165 -0
- package/script/src/simulator_graphql.d.ts.map +1 -1
- package/script/src/simulator_graphql.js +5 -0
- package/esm/simulator-ui/src/ProviderLoginPanel.d.ts +0 -8
- package/esm/simulator-ui/src/ProviderLoginPanel.d.ts.map +0 -1
- package/esm/simulator-ui/src/ProviderLoginPanel.js +0 -156
- package/esm/simulator-ui/src/WorkbenchDrawer.d.ts +0 -38
- package/esm/simulator-ui/src/WorkbenchDrawer.d.ts.map +0 -1
- package/esm/simulator-ui/src/WorkbenchDrawer.js +0 -716
- package/esm/simulator-ui/src/gds/Accordion.d.ts +0 -19
- package/esm/simulator-ui/src/gds/Accordion.d.ts.map +0 -1
- package/esm/simulator-ui/src/gds/Accordion.js +0 -47
- package/script/simulator-ui/src/ProviderLoginPanel.d.ts +0 -8
- package/script/simulator-ui/src/ProviderLoginPanel.d.ts.map +0 -1
- package/script/simulator-ui/src/ProviderLoginPanel.js +0 -162
- package/script/simulator-ui/src/WorkbenchDrawer.d.ts +0 -38
- package/script/simulator-ui/src/WorkbenchDrawer.d.ts.map +0 -1
- package/script/simulator-ui/src/WorkbenchDrawer.js +0 -722
- package/script/simulator-ui/src/gds/Accordion.d.ts +0 -19
- package/script/simulator-ui/src/gds/Accordion.d.ts.map +0 -1
- package/script/simulator-ui/src/gds/Accordion.js +0 -86
|
@@ -20,6 +20,7 @@ const PageGrid_js_1 = __importDefault(require("../../../src/gds/PageGrid.js"));
|
|
|
20
20
|
const PageShell_js_1 = __importDefault(require("../../../src/gds/PageShell.js"));
|
|
21
21
|
const Panel_js_1 = __importDefault(require("../../../src/gds/Panel.js"));
|
|
22
22
|
const utils_js_1 = require("../../../src/utils.js");
|
|
23
|
+
const workbenchChipStore_js_1 = require("../../../src/workbenchChipStore.js");
|
|
23
24
|
const verify_unified_js_1 = require("../../../src/verify_unified.js");
|
|
24
25
|
const MAX_SCENARIO_RUNS = verify_unified_js_1.VERIFY_LIMITS.scenarioRunsMax;
|
|
25
26
|
const MAX_GRADER_REPEATS = verify_unified_js_1.VERIFY_LIMITS.graderRepeatsMax;
|
|
@@ -59,6 +60,7 @@ function formatPercent(value) {
|
|
|
59
60
|
exports.SimulatorVerifyPage = (0, iso_js_1.iso)(`
|
|
60
61
|
field Workspace.VerifyTab @component {
|
|
61
62
|
id
|
|
63
|
+
workbenchSelectedContextChips @updatable
|
|
62
64
|
scenarioDecks {
|
|
63
65
|
id
|
|
64
66
|
label
|
|
@@ -154,8 +156,12 @@ exports.SimulatorVerifyPage = (0, iso_js_1.iso)(`
|
|
|
154
156
|
}
|
|
155
157
|
}
|
|
156
158
|
}
|
|
157
|
-
`)(function SimulatorVerifyPage({ data }) {
|
|
159
|
+
`)(function SimulatorVerifyPage({ data, startUpdate }) {
|
|
158
160
|
const workspaceId = data.id ?? "";
|
|
161
|
+
const composerChips = (0, react_1.useMemo)(() => (0, workbenchChipStore_js_1.resolveWorkbenchSelectedContextChips)(workspaceId, data.workbenchSelectedContextChips), [data.workbenchSelectedContextChips, workspaceId]);
|
|
162
|
+
const updateComposerChips = (0, react_1.useCallback)((next) => {
|
|
163
|
+
(0, workbenchChipStore_js_1.replaceWorkbenchSelectedContextChips)(startUpdate, next, workspaceId);
|
|
164
|
+
}, [startUpdate, workspaceId]);
|
|
159
165
|
const { navigate } = (0, RouterContext_js_1.useRouter)();
|
|
160
166
|
const runBatchMutation = (0, useGambitTypedMutation_js_1.useGambitTypedMutation)(GambitWorkspaceVerifyBatchRunCreateMutation_js_1.default);
|
|
161
167
|
(0, useGambitTypedSubscription_js_1.useGambitTypedSubscription)(GambitWorkspaceVerifyLiveSubscription_js_1.default, workspaceId ? { workspaceId } : null);
|
|
@@ -522,6 +528,23 @@ exports.SimulatorVerifyPage = (0, iso_js_1.iso)(`
|
|
|
522
528
|
outlier.messageRefId
|
|
523
529
|
? ` · ref ${outlier.messageRefId}`
|
|
524
530
|
: ""),
|
|
531
|
+
React.createElement("div", { className: "verify-outlier-links" },
|
|
532
|
+
React.createElement("button", { type: "button", className: "link-button", "data-testid": "verify-outlier-add-to-chat", onClick: () => updateComposerChips((0, workbenchChipStore_js_1.mergeWorkbenchSelectedContextChip)(composerChips, {
|
|
533
|
+
chipId: `verify:${outlier.key}`,
|
|
534
|
+
source: "verify_outlier",
|
|
535
|
+
workspaceId,
|
|
536
|
+
runId: outlier.maxRunId ?? outlier.minRunId,
|
|
537
|
+
capturedAt: new Date().toISOString(),
|
|
538
|
+
batchId: selectedBatch?.id,
|
|
539
|
+
scenarioRunId: outlier.scenarioRunId,
|
|
540
|
+
messageRefId: outlier.messageRefId,
|
|
541
|
+
score: outlier.averageScore ?? undefined,
|
|
542
|
+
instability: (outlier.maxScore ?? 0) -
|
|
543
|
+
(outlier.minScore ?? 0) >= 2,
|
|
544
|
+
message: `${(0, utils_js_1.scenarioNameFromValue)(outlier.scenarioRunId) ??
|
|
545
|
+
outlier.scenarioRunId}: avg ${outlier.averageScore ?? "-"}, min/max ${outlier.minScore ?? "-"}/${outlier.maxScore ?? "-"}, samples ${outlier.completedSampleCount}/${outlier.gradeSampleCount}`,
|
|
546
|
+
enabled: true,
|
|
547
|
+
})) }, "Add to chat")),
|
|
525
548
|
uniqueRunLinks.length > 0 && (React.createElement("div", { className: "verify-outlier-links" }, uniqueRunLinks.map((runId) => (React.createElement("a", { key: runId, href: (0, workspace_routes_js_1.buildWorkspacePath)("grade", workspaceId, {
|
|
526
549
|
runId,
|
|
527
550
|
}), onClick: (event) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkbenchChatDrawer.d.ts","sourceRoot":"","sources":["../../../../../src/simulator-ui/isograph/components/Workspace/WorkbenchChatDrawer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WorkbenchChatDrawer.d.ts","sourceRoot":"","sources":["../../../../../src/simulator-ui/isograph/components/Workspace/WorkbenchChatDrawer.tsx"],"names":[],"mappings":"AAwEA,eAAO,MAAM,mBAAmB;UA4BJ,OAAO;iCAqdlC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -53,6 +53,7 @@ const useGambitTypedMutation_js_1 = require("../../../src/hooks/useGambitTypedMu
|
|
|
53
53
|
const useGambitTypedSubscription_js_1 = require("../../../src/hooks/useGambitTypedSubscription.js");
|
|
54
54
|
const WorkbenchDrawerIso_js_1 = __importDefault(require("../../../src/WorkbenchDrawerIso.js"));
|
|
55
55
|
const utils_js_1 = require("../../../src/utils.js");
|
|
56
|
+
const workbenchChipStore_js_1 = require("../../../src/workbenchChipStore.js");
|
|
56
57
|
const workspace_contract_js_1 = require("../../../../src/workspace_contract.js");
|
|
57
58
|
const BUILD_CHAT_PROVIDER_STORAGE_KEY = "gambit:build-chat-provider";
|
|
58
59
|
function toErrorMessage(error) {
|
|
@@ -94,6 +95,7 @@ function storeBuildChatProvider(provider) {
|
|
|
94
95
|
exports.WorkbenchChatDrawer = (0, iso_js_1.iso)(`
|
|
95
96
|
field Workspace.WorkbenchChatDrawer @component {
|
|
96
97
|
id
|
|
98
|
+
workbenchSelectedContextChips @updatable
|
|
97
99
|
models {
|
|
98
100
|
codex {
|
|
99
101
|
model
|
|
@@ -115,10 +117,14 @@ exports.WorkbenchChatDrawer = (0, iso_js_1.iso)(`
|
|
|
115
117
|
}
|
|
116
118
|
}
|
|
117
119
|
}
|
|
118
|
-
`)(function WorkbenchChatDrawer({ data }, componentProps) {
|
|
120
|
+
`)(function WorkbenchChatDrawer({ data, startUpdate }, componentProps) {
|
|
119
121
|
const workspaceId = typeof data.id === "string" && data.id.trim().length > 0
|
|
120
122
|
? data.id
|
|
121
123
|
: null;
|
|
124
|
+
const composerChips = (0, react_1.useMemo)(() => (0, workbenchChipStore_js_1.resolveWorkbenchSelectedContextChips)(workspaceId, data.workbenchSelectedContextChips), [data.workbenchSelectedContextChips, workspaceId]);
|
|
125
|
+
const updateComposerChips = (0, react_1.useCallback)((next) => {
|
|
126
|
+
(0, workbenchChipStore_js_1.replaceWorkbenchSelectedContextChips)(startUpdate, next, workspaceId);
|
|
127
|
+
}, [startUpdate, workspaceId]);
|
|
122
128
|
(0, useGambitTypedSubscription_js_1.useGambitTypedSubscription)(GambitWorkspaceWorkbenchLiveSubscription_js_1.default, workspaceId ? { workspaceId } : null);
|
|
123
129
|
const runNode = (data.buildRuns?.edges ?? []).flatMap((edge) => edge?.node ? [edge.node] : [])[0] ?? null;
|
|
124
130
|
const codexStatus = data.models?.codex
|
|
@@ -257,7 +263,8 @@ exports.WorkbenchChatDrawer = (0, iso_js_1.iso)(`
|
|
|
257
263
|
const historyContent = (React.createElement(React.Fragment, null,
|
|
258
264
|
chatHistoryLoading && (React.createElement(Callout_js_1.default, null, "Loading chat history\u2026")),
|
|
259
265
|
chatHistoryError && React.createElement("div", { className: "error" }, chatHistoryError),
|
|
260
|
-
!chatHistoryLoading && !chatHistoryError && chatHistory.length === 0 &&
|
|
266
|
+
!chatHistoryLoading && !chatHistoryError && chatHistory.length === 0 &&
|
|
267
|
+
(React.createElement(Callout_js_1.default, null, "No previous chats yet.")),
|
|
261
268
|
!chatHistoryLoading && !chatHistoryError && chatHistory.length > 0 && (React.createElement(List_js_1.default, { className: "workbench-chat-history-list" }, chatHistory.map((entry) => {
|
|
262
269
|
const timestamp = entry.updatedAt ?? entry.startedAt;
|
|
263
270
|
const label = timestamp
|
|
@@ -270,10 +277,10 @@ exports.WorkbenchChatDrawer = (0, iso_js_1.iso)(`
|
|
|
270
277
|
React.createElement(ListItem_js_1.default, { title: `Chat - ${label}` })));
|
|
271
278
|
})))));
|
|
272
279
|
if (ConversationRunChat && workspaceId) {
|
|
273
|
-
return (React.createElement(ConversationRunChat, { open: componentProps.open, isSending: createRunMutation.inFlight ||
|
|
280
|
+
return (React.createElement(ConversationRunChat, { open: componentProps.open, composerChips: composerChips, onComposerChipsChange: updateComposerChips, isSending: createRunMutation.inFlight ||
|
|
274
281
|
resetWorkspaceMutation.inFlight, isStopping: stopRunMutation.inFlight, codexAccess: codexStatus, canStartNewChat: !resetWorkspaceMutation.inFlight, onNewChat: () => {
|
|
275
282
|
void resetWorkspace();
|
|
276
|
-
}, chatHeaderActions: headerActions, chatHistoryOpen: chatHistoryOpen, chatHistoryContent: historyContent, onSend: (args) => {
|
|
283
|
+
}, chatHeaderActions: headerActions, chatHistoryOpen: chatHistoryOpen, onToggleChatHistory: () => setChatHistoryOpen((previous) => !previous), chatHistoryContent: historyContent, onSend: (args) => {
|
|
277
284
|
createRunMutation.commit({
|
|
278
285
|
input: {
|
|
279
286
|
workspaceId: args.workspaceId,
|
|
@@ -420,8 +427,11 @@ exports.WorkbenchChatDrawer = (0, iso_js_1.iso)(`
|
|
|
420
427
|
void startAssistant();
|
|
421
428
|
} }),
|
|
422
429
|
React.createElement(Callout_js_1.default, null, "Start a chat session to inspect the workspace and begin editing files."),
|
|
423
|
-
codexLoginRequired && (React.createElement(Callout_js_1.default, { variant: "danger", title: "Codex login required" }, codexStatus?.statusText?.trim() ||
|
|
430
|
+
codexLoginRequired && (React.createElement(Callout_js_1.default, { variant: "danger", title: "Codex login required" }, codexStatus?.statusText?.trim() ||
|
|
431
|
+
"Run `codex login` to continue.")),
|
|
424
432
|
chatError && React.createElement("div", { className: "error" }, chatError)));
|
|
425
|
-
return (React.createElement(WorkbenchDrawerIso_js_1.default, { open: componentProps.open, runStatus: "IDLE", chatHeaderActions: headerActions,
|
|
433
|
+
return (React.createElement(WorkbenchDrawerIso_js_1.default, { open: componentProps.open, runStatus: "IDLE", chatHeaderActions: headerActions, showChatHistoryToggle: utils_js_1.workbenchChatTopActionsEnabled, chatHistoryOpen: utils_js_1.workbenchChatTopActionsEnabled
|
|
434
|
+
? chatHistoryOpen
|
|
435
|
+
: false, onToggleChatHistory: () => setChatHistoryOpen((previous) => !previous), chatHistoryContent: historyContent, chatBody: fallbackBody }));
|
|
426
436
|
});
|
|
427
437
|
exports.default = exports.WorkbenchChatDrawer;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import { type OptimisticTranscriptEntry } from "../../../src/transcriptEntries.js";
|
|
3
|
+
import { type WorkbenchSelectedContextChip } from "../../../src/workbenchContext.js";
|
|
3
4
|
export declare const WorkbenchConversationRunChat: (data: import("../../../__generated__/__isograph/WorkspaceConversationRun/WorkbenchConversationRunChat/param_type.js").WorkspaceConversationRun__WorkbenchConversationRunChat__param, componentProps: {
|
|
4
5
|
open: boolean;
|
|
5
6
|
codexAccess?: {
|
|
@@ -37,7 +38,10 @@ export declare const WorkbenchConversationRunChat: (data: import("../../../__gen
|
|
|
37
38
|
onNewChat?: () => void;
|
|
38
39
|
chatHeaderActions?: ReactNode;
|
|
39
40
|
chatHistoryOpen?: boolean;
|
|
41
|
+
onToggleChatHistory?: () => void;
|
|
40
42
|
chatHistoryContent?: ReactNode;
|
|
43
|
+
composerChips?: Array<WorkbenchSelectedContextChip>;
|
|
44
|
+
onComposerChipsChange?: (next: Array<WorkbenchSelectedContextChip>) => void;
|
|
41
45
|
}) => import("react").JSX.Element;
|
|
42
46
|
export default WorkbenchConversationRunChat;
|
|
43
47
|
//# sourceMappingURL=WorkbenchConversationRunChat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkbenchConversationRunChat.d.ts","sourceRoot":"","sources":["../../../../../src/simulator-ui/isograph/components/WorkspaceConversationRun/WorkbenchConversationRunChat.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,SAAS,EAOf,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"WorkbenchConversationRunChat.d.ts","sourceRoot":"","sources":["../../../../../src/simulator-ui/isograph/components/WorkspaceConversationRun/WorkbenchConversationRunChat.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,SAAS,EAOf,MAAM,OAAO,CAAC;AAcf,OAAO,EAEL,KAAK,yBAAyB,EAK/B,MAAM,mCAAmC,CAAC;AAK3C,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,kCAAkC,CAAC;AAqJ1C,eAAO,MAAM,4BAA4B;UAwCjC,OAAO;kBACC;QACZ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC5B,YAAY,CAAC,EAAE,OAAO,CAAC;KACxB,GAAG,IAAI;mBACO,MAAM;YACb,CAAC,IAAI,EAAE;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,wBAAwB,EAAE,MAAM,CAAC;QACjC,mBAAmB,EAAE,MAAM,CAAC;QAC5B,2BAA2B,EAAE,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAC9D,UAAU,EAAE,MAAM,IAAI,CAAC;QACvB,OAAO,EAAE,MAAM,IAAI,CAAC;KACrB,KAAK,IAAI;YACF,CAAC,IAAI,EAAE;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE,MAAM,CAAC;QACd,wBAAwB,EAAE,MAAM,CAAC;QACjC,2BAA2B,EAAE,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAC9D,UAAU,EAAE,MAAM,IAAI,CAAC;QACvB,OAAO,EAAE,MAAM,IAAI,CAAC;KACrB,KAAK,IAAI;eACC,OAAO;gBACN,OAAO;sBACD,OAAO;gBACb,MAAM,IAAI;wBACF,SAAS;sBACX,OAAO;0BACH,MAAM,IAAI;yBACX,SAAS;oBACd,KAAK,CAAC,4BAA4B,CAAC;4BAC3B,CAAC,IAAI,EAAE,KAAK,CAAC,4BAA4B,CAAC,KAAK,IAAI;iCAid3E,CAAC;AAEH,eAAe,4BAA4B,CAAC"}
|
|
@@ -45,9 +45,12 @@ const Button_js_1 = __importDefault(require("../../../src/gds/Button.js"));
|
|
|
45
45
|
const Callout_js_1 = __importDefault(require("../../../src/gds/Callout.js"));
|
|
46
46
|
const CodexLoginRequiredOverlay_js_1 = __importDefault(require("../../../src/CodexLoginRequiredOverlay.js"));
|
|
47
47
|
const WorkbenchChatIntro_js_1 = __importDefault(require("../../../src/WorkbenchChatIntro.js"));
|
|
48
|
+
const WorkbenchComposerChip_js_1 = __importDefault(require("../../../src/gds/WorkbenchComposerChip.js"));
|
|
48
49
|
const transcriptEntries_js_1 = require("../../../src/transcriptEntries.js");
|
|
49
50
|
const WorkbenchDrawerIso_js_1 = __importDefault(require("../../../src/WorkbenchDrawerIso.js"));
|
|
50
51
|
const utils_js_1 = require("../../../src/utils.js");
|
|
52
|
+
const workbenchContext_js_1 = require("../../../src/workbenchContext.js");
|
|
53
|
+
const workbenchChipStore_js_1 = require("../../../src/workbenchChipStore.js");
|
|
51
54
|
const RUN_STATUS_VALUES = new Set([
|
|
52
55
|
"IDLE",
|
|
53
56
|
"RUNNING",
|
|
@@ -81,12 +84,10 @@ function isBuildChatDebugEnabled() {
|
|
|
81
84
|
}
|
|
82
85
|
return stored === "1" || stored === "true" || stored === "yes";
|
|
83
86
|
}
|
|
84
|
-
const BUILD_CHAT_DEBUG = isBuildChatDebugEnabled();
|
|
85
87
|
function logBuildChatDebug(event, payload) {
|
|
86
|
-
if (!
|
|
88
|
+
if (!isBuildChatDebugEnabled())
|
|
87
89
|
return;
|
|
88
|
-
|
|
89
|
-
void payload;
|
|
90
|
+
console.info(`[build-chat-debug] ${event}`, payload);
|
|
90
91
|
}
|
|
91
92
|
function toRunStatus(value) {
|
|
92
93
|
if (typeof value !== "string")
|
|
@@ -262,6 +263,9 @@ exports.WorkbenchConversationRunChat = (0, iso_js_1.iso)(`
|
|
|
262
263
|
const wasActiveRef = (0, react_1.useRef)(false);
|
|
263
264
|
const [chatDraft, setChatDraft] = (0, react_1.useState)("");
|
|
264
265
|
const [localError, setLocalError] = (0, react_1.useState)(null);
|
|
266
|
+
const composerChips = componentProps.composerChips ?? [];
|
|
267
|
+
const updateComposerChips = componentProps.onComposerChipsChange ??
|
|
268
|
+
(() => { });
|
|
265
269
|
const onSendMessage = (0, react_1.useCallback)((message, options) => {
|
|
266
270
|
if (codexLoginRequired) {
|
|
267
271
|
setChatError("Codex login is required for this workspace.");
|
|
@@ -344,11 +348,13 @@ exports.WorkbenchConversationRunChat = (0, iso_js_1.iso)(`
|
|
|
344
348
|
]);
|
|
345
349
|
const isRunning = runStatus === "RUNNING";
|
|
346
350
|
const isBusy = componentProps.isSending || componentProps.isStopping;
|
|
351
|
+
const hasEnabledComposerChip = composerChips.some((chip) => chip.enabled);
|
|
347
352
|
const canStartAssistant = !isRunning && !componentProps.isSending &&
|
|
348
353
|
transcriptMessageCount === 0;
|
|
349
354
|
const canSubmitMessage = !componentProps.isSending && !isRunning &&
|
|
350
|
-
chatDraft.trim().length > 0;
|
|
351
|
-
const showStartOverlay = canStartAssistant
|
|
355
|
+
(chatDraft.trim().length > 0 || hasEnabledComposerChip);
|
|
356
|
+
const showStartOverlay = canStartAssistant && !hasEnabledComposerChip &&
|
|
357
|
+
chatDraft.trim().length === 0;
|
|
352
358
|
const resolvedError = chatError ?? localError;
|
|
353
359
|
const handleCopyCodexLoginCommand = (0, react_1.useCallback)(() => {
|
|
354
360
|
globalThis.navigator?.clipboard?.writeText(codexLoginCommand);
|
|
@@ -401,15 +407,37 @@ exports.WorkbenchConversationRunChat = (0, iso_js_1.iso)(`
|
|
|
401
407
|
const trimmed = chatDraft.trim();
|
|
402
408
|
if (!canSubmitMessage || isBusy)
|
|
403
409
|
return;
|
|
410
|
+
const activeChips = composerChips.filter((chip) => chip.enabled);
|
|
411
|
+
const activeChipIds = new Set(activeChips.map((chip) => chip.chipId));
|
|
412
|
+
const outboundMessage = activeChips.length > 0
|
|
413
|
+
? (0, Chat_js_1.encodeWorkbenchMessageWithContext)(trimmed, activeChips.map((chip) => (0, workbenchContext_js_1.toWorkbenchMessageContext)(chip)))
|
|
414
|
+
: trimmed;
|
|
415
|
+
logBuildChatDebug("send.outbound", {
|
|
416
|
+
runId,
|
|
417
|
+
workspaceId,
|
|
418
|
+
trimmed,
|
|
419
|
+
activeChips,
|
|
420
|
+
outboundMessage,
|
|
421
|
+
});
|
|
404
422
|
setLocalError(null);
|
|
405
423
|
try {
|
|
406
|
-
await onSendMessage(
|
|
424
|
+
await onSendMessage(outboundMessage);
|
|
407
425
|
setChatDraft("");
|
|
426
|
+
if (activeChipIds.size > 0) {
|
|
427
|
+
updateComposerChips(composerChips.map((chip) => activeChipIds.has(chip.chipId) ? { ...chip, enabled: false } : chip));
|
|
428
|
+
}
|
|
408
429
|
}
|
|
409
430
|
catch (error) {
|
|
410
431
|
setLocalError(toErrorMessage(error));
|
|
411
432
|
}
|
|
412
|
-
}, [
|
|
433
|
+
}, [
|
|
434
|
+
canSubmitMessage,
|
|
435
|
+
chatDraft,
|
|
436
|
+
composerChips,
|
|
437
|
+
isBusy,
|
|
438
|
+
onSendMessage,
|
|
439
|
+
updateComposerChips,
|
|
440
|
+
]);
|
|
413
441
|
const stopMessage = (0, react_1.useCallback)(async () => {
|
|
414
442
|
if (isBusy || !isRunning)
|
|
415
443
|
return;
|
|
@@ -424,16 +452,23 @@ exports.WorkbenchConversationRunChat = (0, iso_js_1.iso)(`
|
|
|
424
452
|
const addScenarioErrorToChat = (0, react_1.useCallback)(() => {
|
|
425
453
|
if (!scenarioRunError)
|
|
426
454
|
return;
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
455
|
+
updateComposerChips((0, workbenchChipStore_js_1.mergeWorkbenchSelectedContextChip)(composerChips, {
|
|
456
|
+
chipId: `scenario_run_error:${runId ?? workspaceId ?? "workspace"}`,
|
|
457
|
+
source: "scenario_run_error",
|
|
458
|
+
workspaceId: workspaceId ?? undefined,
|
|
459
|
+
runId: runId ?? undefined,
|
|
460
|
+
capturedAt: new Date().toISOString(),
|
|
461
|
+
error: scenarioRunError,
|
|
462
|
+
enabled: true,
|
|
463
|
+
}));
|
|
435
464
|
composerInputRef.current?.focus();
|
|
436
|
-
}, [
|
|
465
|
+
}, [
|
|
466
|
+
composerChips,
|
|
467
|
+
runId,
|
|
468
|
+
scenarioRunError,
|
|
469
|
+
updateComposerChips,
|
|
470
|
+
workspaceId,
|
|
471
|
+
]);
|
|
437
472
|
const errorCalloutTestId = `${testIdPrefix}-error-callout`;
|
|
438
473
|
const addErrorToChatTestId = `${testIdPrefix}-add-error-to-chat`;
|
|
439
474
|
const chatBody = (React.createElement("div", { className: "test-bot-sidebar flex-column gap-8 flex-1 build-chat-panel" },
|
|
@@ -454,6 +489,9 @@ exports.WorkbenchConversationRunChat = (0, iso_js_1.iso)(`
|
|
|
454
489
|
React.createElement("div", { className: "composer-inputs" },
|
|
455
490
|
React.createElement("div", { className: "build-chat-activity-sticky" },
|
|
456
491
|
React.createElement(BuildChatActivityIndicator, { state: activityState, startedAtMs: resolvedStartedAtMs, testId: activityIndicatorTestId, timerTestId: activityTimerTestId })),
|
|
492
|
+
composerChips.length > 0 && (React.createElement("div", { className: "workbench-composer-chip-row", "data-testid": `${testIdPrefix}-composer-chip-row` }, composerChips.map((chip) => (React.createElement(WorkbenchComposerChip_js_1.default, { key: chip.chipId, context: chip, enabled: chip.enabled, onEnabledChange: (enabled) => updateComposerChips(composerChips.map((entry) => entry.chipId === chip.chipId
|
|
493
|
+
? { ...entry, enabled }
|
|
494
|
+
: entry)), onRemove: () => updateComposerChips(composerChips.filter((entry) => entry.chipId !== chip.chipId)) }))))),
|
|
457
495
|
scenarioRunError && (React.createElement(Callout_js_1.default, { variant: "danger", title: "Scenario run failed", actions: React.createElement(Button_js_1.default, { variant: "secondary", size: "small", "data-testid": addErrorToChatTestId, onClick: addScenarioErrorToChat }, "Add to chat"), "data-testid": errorCalloutTestId }, scenarioRunError)),
|
|
458
496
|
React.createElement("div", { className: "flex-row gap-4 mb-2" },
|
|
459
497
|
React.createElement("textarea", { ref: composerInputRef, className: "message-input flex-1", rows: 1, placeholder: "Message Gambit Bot...", value: chatDraft, onChange: (event) => setChatDraft(event.target.value), "data-testid": chatInputTestId, disabled: isBusy, onKeyDown: (event) => {
|
|
@@ -465,17 +503,14 @@ exports.WorkbenchConversationRunChat = (0, iso_js_1.iso)(`
|
|
|
465
503
|
}
|
|
466
504
|
} }),
|
|
467
505
|
React.createElement("div", { className: "composer-actions" },
|
|
468
|
-
React.createElement("div", { className: "composer-action-slot composer-action-slot-
|
|
506
|
+
React.createElement("div", { className: "composer-action-slot composer-action-slot-primary" }, isRunning
|
|
469
507
|
? (React.createElement(Button_js_1.default, { variant: "secondary", className: "composer-action-button", disabled: isBusy, "data-testid": stopButtonTestId, onClick: () => {
|
|
470
508
|
void stopMessage();
|
|
471
509
|
} }, componentProps.isStopping ? "Stopping..." : "Stop"))
|
|
472
|
-
: (React.createElement("
|
|
473
|
-
React.createElement("div", { className: "composer-action-slot composer-action-slot-primary" }, !showStartOverlay
|
|
474
|
-
? (React.createElement(Button_js_1.default, { variant: "primary", className: "composer-action-button", disabled: !canSubmitMessage || isBusy ||
|
|
510
|
+
: (React.createElement(Button_js_1.default, { variant: "primary", className: "composer-action-button", disabled: !canSubmitMessage || isBusy ||
|
|
475
511
|
codexLoginRequired, "data-testid": sendButtonTestId, onClick: () => {
|
|
476
512
|
void sendMessage();
|
|
477
|
-
} }, componentProps.isSending ? "Sending..." : "Send"))
|
|
478
|
-
: (React.createElement("span", { className: "composer-action-placeholder", "aria-hidden": "true" }))))),
|
|
513
|
+
} }, componentProps.isSending ? "Sending..." : "Send"))))),
|
|
479
514
|
resolvedError && React.createElement("div", { className: "error" }, resolvedError)))));
|
|
480
515
|
return (React.createElement(WorkbenchDrawerIso_js_1.default, { open: componentProps.open, runStatus: runStatus, chatHeaderActions: componentProps.chatHeaderActions, chatHistoryOpen: utils_js_1.workbenchChatTopActionsEnabled
|
|
481
516
|
? componentProps.chatHistoryOpen
|
|
@@ -65,6 +65,20 @@ export declare function GradeTabView(props: {
|
|
|
65
65
|
runId: string;
|
|
66
66
|
turnIndex?: number;
|
|
67
67
|
}) => void;
|
|
68
|
+
onAddFlagToWorkbench?: (args: {
|
|
69
|
+
refId: string;
|
|
70
|
+
runId: string;
|
|
71
|
+
turnIndex?: number;
|
|
72
|
+
score?: number;
|
|
73
|
+
graderReason?: string;
|
|
74
|
+
flagReason?: string;
|
|
75
|
+
priorUser?: string;
|
|
76
|
+
gradedAssistant?: string;
|
|
77
|
+
}) => void;
|
|
78
|
+
onAddErrorToWorkbench?: (args: {
|
|
79
|
+
runId?: string;
|
|
80
|
+
error: string;
|
|
81
|
+
}) => void;
|
|
68
82
|
mutationError: string | null;
|
|
69
83
|
expandedResults: Record<string, boolean>;
|
|
70
84
|
onToggleExpandedResult: (itemKey: string) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GradeTabView.d.ts","sourceRoot":"","sources":["../../../../../src/simulator-ui/isograph/components/grade/GradeTabView.tsx"],"names":[],"mappings":"AAMA,MAAM,MAAM,sBAAsB,GAAG;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;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C;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC5C,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACxC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7D,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACtD,YAAY,EAAE,CAAC,IAAI,EAAE;QACnB,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,KAAK,IAAI,CAAC;IACX,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,sBAAsB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACnD,+
|
|
1
|
+
{"version":3,"file":"GradeTabView.d.ts","sourceRoot":"","sources":["../../../../../src/simulator-ui/isograph/components/grade/GradeTabView.tsx"],"names":[],"mappings":"AAMA,MAAM,MAAM,sBAAsB,GAAG;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,aAAa,GAA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IAAI,CAAC;IACX,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC1E,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,sBAAsB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACnD,+BA+IA;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -92,6 +92,6 @@ function GradeTabView(props) {
|
|
|
92
92
|
meta: [run.status, run.finishedAt ?? run.startedAt].filter(Boolean)
|
|
93
93
|
.join(" · "),
|
|
94
94
|
})), [props.scenarioRuns]);
|
|
95
|
-
return (React.createElement(GradeTabShell_js_1.default, { runner: React.createElement(GradeRunnerPanel_js_1.default, { testRunOptions: testRunOptions, selectedTestRunId: props.selectedScenarioRunId, onSelectTestRun: (runId) => props.onSelectScenarioRun(runId || null), graders: graderOptions, selectedGraderId: props.selectedGraderId, onSelectGrader: props.onSelectGrader, selectedGraderDescription: selectedGrader?.description ?? null, sessionsCount: props.scenarioRuns.length, onRunGrader: props.onRunGrader, canRun: props.canRunGrader, running: props.runInFlight, runButtonTestId: "grade-run-grader" }), results: React.createElement(GradeResultsPanel_js_1.default, { error: props.mutationError, loading: false, runCount: runSections.length, runItemsCount: runSections.flatMap((section) => section.items).length, emptyMessage: "No grader runs for this selected test run yet.", routeRunNotFound: props.routeRunMissing, missingRunHref: props.missingRunHref, runSections: runSections, expandedRunId: props.routeGradeRunId, onToggleRun: (runId) => props.onSelectRun(props.routeGradeRunId === runId ? null : runId), expandedResults: props.expandedResults, onToggleExpandedResult: props.onToggleExpandedResult, flaggedRefSet: flaggedRefSet, flagReasonDrafts: props.reasonDrafts, flagReasonByRefId: props.flagByRefId, onToggleFlag: props.onToggleFlag, onFlagReasonChange: props.onReasonDraftChange, onFlagReasonBlur: props.onReasonBlur, topErrorRunId: props.routeGradeRunId }) }));
|
|
95
|
+
return (React.createElement(GradeTabShell_js_1.default, { runner: React.createElement(GradeRunnerPanel_js_1.default, { testRunOptions: testRunOptions, selectedTestRunId: props.selectedScenarioRunId, onSelectTestRun: (runId) => props.onSelectScenarioRun(runId || null), graders: graderOptions, selectedGraderId: props.selectedGraderId, onSelectGrader: props.onSelectGrader, selectedGraderDescription: selectedGrader?.description ?? null, sessionsCount: props.scenarioRuns.length, onRunGrader: props.onRunGrader, canRun: props.canRunGrader, running: props.runInFlight, runButtonTestId: "grade-run-grader" }), results: React.createElement(GradeResultsPanel_js_1.default, { error: props.mutationError, loading: false, runCount: runSections.length, runItemsCount: runSections.flatMap((section) => section.items).length, emptyMessage: "No grader runs for this selected test run yet.", routeRunNotFound: props.routeRunMissing, missingRunHref: props.missingRunHref, runSections: runSections, expandedRunId: props.routeGradeRunId, onToggleRun: (runId) => props.onSelectRun(props.routeGradeRunId === runId ? null : runId), expandedResults: props.expandedResults, onToggleExpandedResult: props.onToggleExpandedResult, flaggedRefSet: flaggedRefSet, flagReasonDrafts: props.reasonDrafts, flagReasonByRefId: props.flagByRefId, onToggleFlag: props.onToggleFlag, onFlagReasonChange: props.onReasonDraftChange, onFlagReasonBlur: props.onReasonBlur, onAddFlagToWorkbench: props.onAddFlagToWorkbench, onAddErrorToWorkbench: props.onAddErrorToWorkbench, topErrorRunId: props.routeGradeRunId }) }));
|
|
96
96
|
}
|
|
97
97
|
exports.default = GradeTabView;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../../src/simulator-ui/src/AppShell.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../../src/simulator-ui/src/AppShell.tsx"],"names":[],"mappings":"AAuCA,wBAAgB,QAAQ,CAAC,KAAK,EAAE;IAC9B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC;QAC1B,IAAI,EAAE,OAAO,CAAC;QACd,QAAQ,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;QACxC,QAAQ,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;QACjD,WAAW,EAAE,CAAC,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;QAC5D,OAAO,EAAE,MAAM,IAAI,CAAC;QACpB,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAClC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;QAC3B,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;QAC/B,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAC5B,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACpC,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,UAAU,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;QACxC,kBAAkB,EAAE,CAAC,UAAU,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,KAAK,IAAI,CAAC;KACvE,CAAC,CAAC;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAC9B,IAAI,EAAE,OAAO,CAAC;KACf,CAAC,CAAC;CACJ,+BAsTA"}
|
|
@@ -44,7 +44,6 @@ const utils_js_1 = require("./utils.js");
|
|
|
44
44
|
const RouterContext_js_1 = require("./RouterContext.js");
|
|
45
45
|
const Button_js_1 = __importDefault(require("./gds/Button.js"));
|
|
46
46
|
const Icon_js_1 = __importDefault(require("./gds/Icon.js"));
|
|
47
|
-
const WorkbenchDrawer_js_1 = __importDefault(require("./WorkbenchDrawer.js"));
|
|
48
47
|
const utils_js_2 = require("./utils.js");
|
|
49
48
|
const useGambitTypedMutation_js_1 = require("./hooks/useGambitTypedMutation.js");
|
|
50
49
|
const GambitWorkspaceCreateMutation_js_1 = __importDefault(require("../mutations/GambitWorkspaceCreateMutation.js"));
|
|
@@ -90,7 +89,7 @@ function AppShell(props) {
|
|
|
90
89
|
});
|
|
91
90
|
const createWorkspaceMutation = (0, useGambitTypedMutation_js_1.useGambitTypedMutation)(GambitWorkspaceCreateMutation_js_1.default);
|
|
92
91
|
const deleteWorkspaceMutation = (0, useGambitTypedMutation_js_1.useGambitTypedMutation)(GambitWorkspaceDeleteMutation_js_1.default);
|
|
93
|
-
const Workbench = props.Workbench
|
|
92
|
+
const Workbench = props.Workbench;
|
|
94
93
|
const activeWorkspaceId = (0, react_1.useMemo)(() => {
|
|
95
94
|
const route = (0, workspace_routes_js_1.parseWorkspaceRoute)(workspaceRoutePath);
|
|
96
95
|
return route?.workspaceId ?? null;
|
|
@@ -104,7 +103,8 @@ function AppShell(props) {
|
|
|
104
103
|
workspaceRoutePath === "/workspaces/new", [workspaceRoutePath]);
|
|
105
104
|
const isDocsPath = workspaceRoutePath === "/docs";
|
|
106
105
|
const canOpenWorkbench = Boolean(activeWorkspaceId);
|
|
107
|
-
const workbenchVisible = workbenchOpen && canOpenWorkbench
|
|
106
|
+
const workbenchVisible = workbenchOpen && canOpenWorkbench &&
|
|
107
|
+
Boolean(Workbench);
|
|
108
108
|
const handleSelectWorkspace = (0, react_1.useCallback)((workspaceId) => {
|
|
109
109
|
navigate((0, workspace_routes_js_1.buildWorkspacePath)("build", workspaceId));
|
|
110
110
|
setDrawerOpen(false);
|
|
@@ -203,15 +203,15 @@ function AppShell(props) {
|
|
|
203
203
|
React.createElement("span", { className: "top-nav-deck" }, deckLabel)),
|
|
204
204
|
React.createElement("div", { className: "top-nav-right" },
|
|
205
205
|
React.createElement("div", { className: "top-nav-actions" }),
|
|
206
|
-
React.createElement(Button_js_1.default, { "data-testid": "nav-workbench", className: (0, utils_js_2.classNames)("workbench-toggle", workbenchVisible && "active"), variant: "secondary", onClick: () => setWorkbenchOpen((prev) => !prev), disabled: !canOpenWorkbench, "aria-label": workbenchVisible
|
|
206
|
+
Workbench && (React.createElement(Button_js_1.default, { "data-testid": "nav-workbench", className: (0, utils_js_2.classNames)("workbench-toggle", workbenchVisible && "active"), variant: "secondary", onClick: () => setWorkbenchOpen((prev) => !prev), disabled: !canOpenWorkbench, "aria-label": workbenchVisible
|
|
207
207
|
? "Close workbench drawer"
|
|
208
208
|
: "Open workbench drawer" },
|
|
209
|
-
React.createElement(Icon_js_1.default, { name: "chat", size: 16, style: { color: "currentColor" } })))),
|
|
209
|
+
React.createElement(Icon_js_1.default, { name: "chat", size: 16, style: { color: "currentColor" } }))))),
|
|
210
210
|
React.createElement("div", { className: "app-content-frame" },
|
|
211
211
|
React.createElement("main", { className: "page-shell" },
|
|
212
212
|
isWorkspacesPath && (React.createElement("div", { style: { padding: "12px 16px 0 16px" } },
|
|
213
213
|
React.createElement(Button_js_1.default, { "data-testid": "workspace-create-cta", variant: "primary", size: "small", onClick: createWorkspace, disabled: createWorkspaceMutation.inFlight }, "New workspace"))),
|
|
214
214
|
isDocsPath ? React.createElement(DocsPage_js_1.default, null) : props.children),
|
|
215
|
-
React.createElement(Workbench, { open: workbenchVisible })),
|
|
215
|
+
Workbench ? React.createElement(Workbench, { open: workbenchVisible }) : null),
|
|
216
216
|
React.createElement(Drawer, { open: drawerOpen, onCreateWorkspace: createWorkspace, onSelect: handleSelectWorkspace, onDelete: deleteWorkspace, onDeleteAll: deleteAllWorkspaces, onClose: () => setDrawerOpen(false), activeWorkspaceId: activeWorkspaceId, bundleStamp: null, creatingWorkspace: createWorkspaceMutation.inFlight, deletingWorkspaceId: deletingWorkspaceId, deletingAll: deletingAll, appearance: appearance, onAppearanceChange: persistAppearance })));
|
|
217
217
|
}
|
|
@@ -1,43 +1,19 @@
|
|
|
1
1
|
import { type BuildDisplayMessage } from "./utils.js";
|
|
2
2
|
import { bucketBuildChatDisplay } from "./ActivityTranscriptRows.js";
|
|
3
3
|
import { useBuildChat } from "./BuildChatContext.js";
|
|
4
|
+
import { type WorkbenchErrorContext, type WorkbenchFlagContext, type WorkbenchMessageContext, type WorkbenchRatingContext, type WorkbenchSelectedContextChip, type WorkbenchVerifyOutlierContext } from "./workbenchContext.js";
|
|
4
5
|
export { bucketBuildChatDisplay };
|
|
5
|
-
export type WorkbenchScenarioErrorContext = {
|
|
6
|
+
export type WorkbenchScenarioErrorContext = WorkbenchErrorContext & {
|
|
6
7
|
source: "scenario_run_error";
|
|
7
|
-
workspaceId?: string;
|
|
8
|
-
runId?: string;
|
|
9
|
-
capturedAt: string;
|
|
10
|
-
error: string;
|
|
11
8
|
};
|
|
12
|
-
export type
|
|
13
|
-
source: "
|
|
14
|
-
workspaceId?: string;
|
|
15
|
-
runId?: string;
|
|
16
|
-
capturedAt: string;
|
|
17
|
-
messageRefId: string;
|
|
18
|
-
statePath?: string;
|
|
19
|
-
statePointer?: string;
|
|
20
|
-
score: number;
|
|
21
|
-
reason?: string;
|
|
9
|
+
export type WorkbenchGraderErrorContext = WorkbenchErrorContext & {
|
|
10
|
+
source: "grader_run_error";
|
|
22
11
|
};
|
|
23
|
-
export type WorkbenchFlagContext = {
|
|
24
|
-
source: "grading_flag";
|
|
25
|
-
workspaceId?: string;
|
|
26
|
-
runId?: string;
|
|
27
|
-
capturedAt: string;
|
|
28
|
-
flagId?: string;
|
|
29
|
-
refId: string;
|
|
30
|
-
score?: number;
|
|
31
|
-
message: string;
|
|
32
|
-
};
|
|
33
|
-
export type WorkbenchMessageContext = WorkbenchScenarioErrorContext | WorkbenchRatingContext | WorkbenchFlagContext;
|
|
34
12
|
export type WorkbenchScenarioErrorChip = WorkbenchScenarioErrorContext & {
|
|
35
13
|
enabled: boolean;
|
|
36
14
|
};
|
|
37
|
-
export type WorkbenchComposerChip =
|
|
38
|
-
|
|
39
|
-
enabled: boolean;
|
|
40
|
-
};
|
|
15
|
+
export type WorkbenchComposerChip = WorkbenchSelectedContextChip;
|
|
16
|
+
export type { WorkbenchFlagContext, WorkbenchRatingContext, WorkbenchVerifyOutlierContext, };
|
|
41
17
|
export declare function encodeWorkbenchMessageWithErrorContext(message: string, context: WorkbenchScenarioErrorContext): string;
|
|
42
18
|
export declare function encodeWorkbenchMessageWithContext(message: string, contexts: Array<WorkbenchMessageContext>): string;
|
|
43
19
|
export declare function decodeWorkbenchMessageWithErrorContext(content: string): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chat.d.ts","sourceRoot":"","sources":["../../../src/simulator-ui/src/Chat.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,mBAAmB,EAGzB,MAAM,YAAY,CAAC;AAIpB,OAAO,EAEL,sBAAsB,EACvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"Chat.d.ts","sourceRoot":"","sources":["../../../src/simulator-ui/src/Chat.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,mBAAmB,EAGzB,MAAM,YAAY,CAAC;AAIpB,OAAO,EAEL,sBAAsB,EACvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAGL,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,4BAA4B,EACjC,KAAK,6BAA6B,EACnC,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAElC,MAAM,MAAM,6BAA6B,GAAG,qBAAqB,GAAG;IAClE,MAAM,EAAE,oBAAoB,CAAC;CAC9B,CAAC;AACF,MAAM,MAAM,2BAA2B,GAAG,qBAAqB,GAAG;IAChE,MAAM,EAAE,kBAAkB,CAAC;CAC5B,CAAC;AACF,MAAM,MAAM,0BAA0B,GAAG,6BAA6B,GAAG;IACvE,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AACF,MAAM,MAA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