@stigmer/react 3.12.6 → 3.12.8
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/composer/ComposerToolbar.d.ts.map +1 -1
- package/composer/ComposerToolbar.js.map +1 -1
- package/execution/MessageThread.d.ts.map +1 -1
- package/execution/MessageThread.js +8 -11
- package/execution/MessageThread.js.map +1 -1
- package/execution/ResultView.d.ts.map +1 -1
- package/execution/ResultView.js +6 -0
- package/execution/ResultView.js.map +1 -1
- package/execution/ToolCallItem.d.ts.map +1 -1
- package/execution/ToolCallItem.js +13 -2
- package/execution/ToolCallItem.js.map +1 -1
- package/execution/tool-categories.d.ts +1 -1
- package/execution/tool-categories.d.ts.map +1 -1
- package/execution/tool-categories.js +6 -0
- package/execution/tool-categories.js.map +1 -1
- package/execution/useFileChangeContent.d.ts +2 -6
- package/execution/useFileChangeContent.d.ts.map +1 -1
- package/execution/useFileChangeContent.js +4 -12
- package/execution/useFileChangeContent.js.map +1 -1
- package/identity-account/AccountPreferencesPanel.d.ts +2 -1
- package/identity-account/AccountPreferencesPanel.d.ts.map +1 -1
- package/identity-account/AccountPreferencesPanel.js +41 -3
- package/identity-account/AccountPreferencesPanel.js.map +1 -1
- package/identity-account/useAccountExecutionDefaults.d.ts +7 -0
- package/identity-account/useAccountExecutionDefaults.d.ts.map +1 -1
- package/identity-account/useAccountExecutionDefaults.js +5 -2
- package/identity-account/useAccountExecutionDefaults.js.map +1 -1
- package/index.d.ts +5 -2
- package/index.d.ts.map +1 -1
- package/index.js +5 -1
- package/index.js.map +1 -1
- package/internal/MemoryEnabledRow.d.ts +37 -0
- package/internal/MemoryEnabledRow.d.ts.map +1 -0
- package/internal/MemoryEnabledRow.js +25 -0
- package/internal/MemoryEnabledRow.js.map +1 -0
- package/internal/download.d.ts +8 -0
- package/internal/download.d.ts.map +1 -0
- package/internal/download.js +25 -0
- package/internal/download.js.map +1 -0
- package/library/useExportResource.d.ts.map +1 -1
- package/library/useExportResource.js +3 -17
- package/library/useExportResource.js.map +1 -1
- package/memory/MemoryListPanel.d.ts +35 -0
- package/memory/MemoryListPanel.d.ts.map +1 -0
- package/memory/MemoryListPanel.js +141 -0
- package/memory/MemoryListPanel.js.map +1 -0
- package/memory/MemoryProposalCard.d.ts +35 -0
- package/memory/MemoryProposalCard.d.ts.map +1 -0
- package/memory/MemoryProposalCard.js +73 -0
- package/memory/MemoryProposalCard.js.map +1 -0
- package/memory/index.d.ts +10 -0
- package/memory/index.d.ts.map +1 -0
- package/memory/index.js +14 -0
- package/memory/index.js.map +1 -0
- package/memory/memoryGroups.d.ts +31 -0
- package/memory/memoryGroups.d.ts.map +1 -0
- package/memory/memoryGroups.js +52 -0
- package/memory/memoryGroups.js.map +1 -0
- package/memory/useConfirmMemory.d.ts +31 -0
- package/memory/useConfirmMemory.d.ts.map +1 -0
- package/memory/useConfirmMemory.js +43 -0
- package/memory/useConfirmMemory.js.map +1 -0
- package/memory/useDeleteMemory.d.ts +30 -0
- package/memory/useDeleteMemory.d.ts.map +1 -0
- package/memory/useDeleteMemory.js +42 -0
- package/memory/useDeleteMemory.js.map +1 -0
- package/memory/useMemories.d.ts +33 -0
- package/memory/useMemories.d.ts.map +1 -0
- package/memory/useMemories.js +42 -0
- package/memory/useMemories.js.map +1 -0
- package/memory/useMemory.d.ts +39 -0
- package/memory/useMemory.d.ts.map +1 -0
- package/memory/useMemory.js +43 -0
- package/memory/useMemory.js.map +1 -0
- package/memory/useRejectMemory.d.ts +34 -0
- package/memory/useRejectMemory.d.ts.map +1 -0
- package/memory/useRejectMemory.js +46 -0
- package/memory/useRejectMemory.js.map +1 -0
- package/memory/useUpdateMemoryContent.d.ts +32 -0
- package/memory/useUpdateMemoryContent.d.ts.map +1 -0
- package/memory/useUpdateMemoryContent.js +48 -0
- package/memory/useUpdateMemoryContent.js.map +1 -0
- package/organization/OrgPreferencesPanel.d.ts.map +1 -1
- package/organization/OrgPreferencesPanel.js +36 -4
- package/organization/OrgPreferencesPanel.js.map +1 -1
- package/package.json +4 -4
- package/session/AutoApproveIndicator.d.ts +18 -0
- package/session/AutoApproveIndicator.d.ts.map +1 -0
- package/session/AutoApproveIndicator.js +23 -0
- package/session/AutoApproveIndicator.js.map +1 -0
- package/session/NewSessionViewer.d.ts.map +1 -1
- package/session/NewSessionViewer.js +10 -1
- package/session/NewSessionViewer.js.map +1 -1
- package/session/SessionViewer.d.ts +26 -1
- package/session/SessionViewer.d.ts.map +1 -1
- package/session/SessionViewer.js +28 -22
- package/session/SessionViewer.js.map +1 -1
- package/session/TranscriptExportMenu.d.ts +24 -0
- package/session/TranscriptExportMenu.d.ts.map +1 -0
- package/session/TranscriptExportMenu.js +26 -0
- package/session/TranscriptExportMenu.js.map +1 -0
- package/session/facets/SetupTab.d.ts +43 -6
- package/session/facets/SetupTab.d.ts.map +1 -1
- package/session/facets/SetupTab.js +32 -36
- package/session/facets/SetupTab.js.map +1 -1
- package/session/facets/UsageTab.d.ts +2 -1
- package/session/facets/UsageTab.d.ts.map +1 -1
- package/session/facets/UsageTab.js +11 -5
- package/session/facets/UsageTab.js.map +1 -1
- package/session/facets/index.d.ts +1 -1
- package/session/facets/index.d.ts.map +1 -1
- package/session/facets/primitives.d.ts +58 -0
- package/session/facets/primitives.d.ts.map +1 -0
- package/session/facets/primitives.js +59 -0
- package/session/facets/primitives.js.map +1 -0
- package/session/index.d.ts +5 -1
- package/session/index.d.ts.map +1 -1
- package/session/index.js +2 -0
- package/session/index.js.map +1 -1
- package/session/useExportTranscript.d.ts +44 -0
- package/session/useExportTranscript.d.ts.map +1 -0
- package/session/useExportTranscript.js +109 -0
- package/session/useExportTranscript.js.map +1 -0
- package/session/useNewSessionFlow.d.ts +16 -0
- package/session/useNewSessionFlow.d.ts.map +1 -1
- package/session/useNewSessionFlow.js +25 -6
- package/session/useNewSessionFlow.js.map +1 -1
- package/session/useSessionConversation.d.ts.map +1 -1
- package/session/useSessionConversation.js +7 -19
- package/session/useSessionConversation.js.map +1 -1
- package/session/useSessionExecutions.d.ts +2 -14
- package/session/useSessionExecutions.d.ts.map +1 -1
- package/session/useSessionExecutions.js +4 -26
- package/session/useSessionExecutions.js.map +1 -1
- package/session/useSessionPageFlow.d.ts +41 -10
- package/session/useSessionPageFlow.d.ts.map +1 -1
- package/session/useSessionPageFlow.js +67 -9
- package/session/useSessionPageFlow.js.map +1 -1
- package/settings/MemorySection.d.ts +12 -0
- package/settings/MemorySection.d.ts.map +1 -0
- package/settings/MemorySection.js +21 -0
- package/settings/MemorySection.js.map +1 -0
- package/settings/index.d.ts +1 -0
- package/settings/index.d.ts.map +1 -1
- package/settings/index.js +1 -0
- package/settings/index.js.map +1 -1
- package/settings/settings-nav.d.ts.map +1 -1
- package/settings/settings-nav.js +2 -1
- package/settings/settings-nav.js.map +1 -1
- package/src/__tests__/public-api.test.ts +21 -0
- package/src/attachment/__tests__/prepare-image.test.ts +12 -6
- package/src/composer/ComposerToolbar.tsx +1 -0
- package/src/execution/MessageThread.tsx +8 -11
- package/src/execution/ResultView.tsx +6 -0
- package/src/execution/ToolCallItem.tsx +18 -1
- package/src/execution/tool-categories.ts +7 -0
- package/src/execution/useFileChangeContent.ts +5 -12
- package/src/identity-account/AccountPreferencesPanel.tsx +89 -2
- package/src/identity-account/__tests__/AccountPreferencesPanel.test.tsx +112 -0
- package/src/identity-account/__tests__/useAccountExecutionDefaults.test.tsx +34 -1
- package/src/identity-account/useAccountExecutionDefaults.ts +12 -2
- package/src/index.ts +38 -0
- package/src/internal/MemoryEnabledRow.tsx +92 -0
- package/src/internal/download.ts +29 -0
- package/src/library/useExportResource.ts +3 -19
- package/src/memory/MemoryListPanel.tsx +532 -0
- package/src/memory/MemoryProposalCard.tsx +181 -0
- package/src/memory/__tests__/MemoryListPanel.test.tsx +259 -0
- package/src/memory/__tests__/MemoryProposalCard.test.tsx +236 -0
- package/src/memory/__tests__/memoryHooks.test.tsx +283 -0
- package/src/memory/index.ts +24 -0
- package/src/memory/memoryGroups.ts +64 -0
- package/src/memory/useConfirmMemory.ts +62 -0
- package/src/memory/useDeleteMemory.ts +61 -0
- package/src/memory/useMemories.ts +66 -0
- package/src/memory/useMemory.ts +80 -0
- package/src/memory/useRejectMemory.ts +65 -0
- package/src/memory/useUpdateMemoryContent.ts +67 -0
- package/src/organization/OrgPreferencesPanel.tsx +52 -3
- package/src/organization/__tests__/OrgPreferencesPanel.test.tsx +65 -0
- package/src/session/AutoApproveIndicator.tsx +45 -0
- package/src/session/NewSessionViewer.tsx +17 -0
- package/src/session/SessionViewer.tsx +78 -41
- package/src/session/TranscriptExportMenu.tsx +78 -0
- package/src/session/__tests__/NewSessionViewer.test.tsx +32 -0
- package/src/session/__tests__/SessionViewer-autoApprove.test.tsx +244 -0
- package/src/session/__tests__/SessionViewer-transcriptExport.test.tsx +189 -0
- package/src/session/__tests__/TranscriptExportMenu.test.tsx +97 -0
- package/src/session/__tests__/useExportTranscript.test.tsx +187 -0
- package/src/session/__tests__/useNewSessionFlow.test.tsx +89 -0
- package/src/session/__tests__/useSessionPageFlow.autoApprove.test.tsx +263 -2
- package/src/session/facets/SetupTab.tsx +193 -157
- package/src/session/facets/UsageTab.tsx +38 -38
- package/src/session/facets/index.ts +1 -0
- package/src/session/facets/primitives.tsx +169 -0
- package/src/session/index.ts +10 -0
- package/src/session/useExportTranscript.ts +171 -0
- package/src/session/useNewSessionFlow.ts +42 -6
- package/src/session/useSessionConversation.ts +10 -16
- package/src/session/useSessionExecutions.ts +5 -26
- package/src/session/useSessionPageFlow.ts +108 -21
- package/src/settings/MemorySection.tsx +45 -0
- package/src/settings/index.ts +1 -0
- package/src/settings/settings-nav.ts +2 -0
- package/src/switch/Switch.tsx +4 -0
- package/src/usage/useExportCSV.ts +2 -14
- package/src/workflow/__tests__/useWorkflowCanvas.dirty.test.tsx +7 -2
- package/src/workflow/__tests__/useWorkflowCanvas.drag.test.tsx +7 -2
- package/src/workspace/WorkspaceSurface.tsx +26 -3
- package/styles.css +1 -1
- package/switch/Switch.d.ts +3 -1
- package/switch/Switch.d.ts.map +1 -1
- package/switch/Switch.js +2 -2
- package/switch/Switch.js.map +1 -1
- package/usage/useExportCSV.d.ts.map +1 -1
- package/usage/useExportCSV.js +2 -13
- package/usage/useExportCSV.js.map +1 -1
- package/workspace/WorkspaceSurface.js +11 -2
- package/workspace/WorkspaceSurface.js.map +1 -1
|
@@ -6,6 +6,7 @@ import { getUserMessage, toOrganizationUpdateInput } from "@stigmer/sdk";
|
|
|
6
6
|
import { useOrganization } from "./useOrganization.js";
|
|
7
7
|
import { useUpdateOrganization } from "./useUpdateOrganization.js";
|
|
8
8
|
import { useCheckPermission } from "../iam-policy/useCheckPermission.js";
|
|
9
|
+
import { MemoryEnabledRow } from "../internal/MemoryEnabledRow.js";
|
|
9
10
|
import { StandingContextField } from "../internal/StandingContextField.js";
|
|
10
11
|
import { SpinnerIcon } from "../internal/SpinnerIcon.js";
|
|
11
12
|
/**
|
|
@@ -32,6 +33,9 @@ export function OrgPreferencesPanel({ orgId, onUpdated, className, }) {
|
|
|
32
33
|
const baseId = useId();
|
|
33
34
|
const { organization, isLoading: isFetching, error: fetchError, refetch, } = useOrganization(orgId || null);
|
|
34
35
|
const { update, isUpdating, error: updateError, clearError, } = useUpdateOrganization();
|
|
36
|
+
// The memory toggle saves instantly (its own hook instance, so a flip's
|
|
37
|
+
// in-flight/error state never bleeds into the form's Save button).
|
|
38
|
+
const { update: updateMemoryFlag, isUpdating: isSavingMemoryFlag, error: memoryFlagError, } = useUpdateOrganization();
|
|
35
39
|
// Fail-open: OSS local mode has no IAM service, so editing stays
|
|
36
40
|
// available there; cloud gets a genuine server verdict.
|
|
37
41
|
const { allowed: canEdit } = useCheckPermission(orgId ? { kind: "organization", id: orgId } : null, "can_edit");
|
|
@@ -56,10 +60,16 @@ export function OrgPreferencesPanel({ orgId, onUpdated, className, }) {
|
|
|
56
60
|
clearError();
|
|
57
61
|
try {
|
|
58
62
|
// update() is a full-spec replace: spread the complete mapped input
|
|
59
|
-
// so unedited spec fields survive
|
|
63
|
+
// so unedited spec fields survive. `preferences` is a nested message,
|
|
64
|
+
// so the override spreads the mapper's COMPLETE preferences too —
|
|
65
|
+
// fields this form does not own (memory_enabled) survive the save.
|
|
66
|
+
const mapped = toOrganizationUpdateInput(organization);
|
|
60
67
|
const updated = await update({
|
|
61
|
-
...
|
|
62
|
-
preferences: {
|
|
68
|
+
...mapped,
|
|
69
|
+
preferences: {
|
|
70
|
+
...mapped.preferences,
|
|
71
|
+
standingContext: standingContext.trim() || undefined,
|
|
72
|
+
},
|
|
63
73
|
});
|
|
64
74
|
refetch();
|
|
65
75
|
onUpdated?.(updated);
|
|
@@ -68,6 +78,28 @@ export function OrgPreferencesPanel({ orgId, onUpdated, className, }) {
|
|
|
68
78
|
// error state is managed by useUpdateOrganization
|
|
69
79
|
}
|
|
70
80
|
}, [canSubmit, organization, standingContext, update, clearError, refetch, onUpdated]);
|
|
81
|
+
// The memory consent flag applies instantly (the UX-checkpoint decision):
|
|
82
|
+
// a consent bit flipped-but-unsaved that silently reverts on navigation is
|
|
83
|
+
// the failure consent UX must not have. Same wipe-safe double spread.
|
|
84
|
+
const handleMemoryToggle = useCallback(async (next) => {
|
|
85
|
+
if (!organization)
|
|
86
|
+
return;
|
|
87
|
+
try {
|
|
88
|
+
const mapped = toOrganizationUpdateInput(organization);
|
|
89
|
+
const updated = await updateMemoryFlag({
|
|
90
|
+
...mapped,
|
|
91
|
+
preferences: {
|
|
92
|
+
...mapped.preferences,
|
|
93
|
+
memoryEnabled: next || undefined,
|
|
94
|
+
},
|
|
95
|
+
});
|
|
96
|
+
refetch();
|
|
97
|
+
onUpdated?.(updated);
|
|
98
|
+
}
|
|
99
|
+
catch {
|
|
100
|
+
// error state is managed by the toggle's own hook instance
|
|
101
|
+
}
|
|
102
|
+
}, [organization, updateMemoryFlag, refetch, onUpdated]);
|
|
71
103
|
// -----------------------------------------------------------------------
|
|
72
104
|
// Loading state
|
|
73
105
|
// -----------------------------------------------------------------------
|
|
@@ -85,6 +117,6 @@ export function OrgPreferencesPanel({ orgId, onUpdated, className, }) {
|
|
|
85
117
|
// -----------------------------------------------------------------------
|
|
86
118
|
// Render
|
|
87
119
|
// -----------------------------------------------------------------------
|
|
88
|
-
return (_jsxs("form", { onSubmit: handleSubmit, className: cn("stg:space-y-4", className), children: [_jsx(StandingContextField, { id: `${baseId}-standing-context`, value: standingContext, onChange: setStandingContext, disabled: isUpdating, readOnly: !canEdit, placeholder: "e.g. We deploy to us-east-1. Our stack is Go and TypeScript. Prefer concise answers.", helperText: "Shared with agents as background context \u2014 not instructions. Applies to executions started by signed-in members of this organization and is visible on their execution records." }), !canEdit && (_jsx("p", { className: "stg:text-[0.65rem] stg:text-muted-foreground", children: "Only organization admins can edit these preferences." })), updateError && (_jsx("p", { className: "stg:text-destructive stg:text-[0.65rem]", role: "alert", children: getUserMessage(updateError) })), canEdit && (_jsxs("div", { className: "stg:flex stg:items-center stg:gap-2", children: [_jsxs("button", { type: "submit", disabled: !canSubmit, className: cn("stg:inline-flex stg:items-center stg:gap-1.5 stg:rounded-md stg:px-3 stg:py-1.5 stg:text-xs stg:font-medium", "stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover", "stg:disabled:pointer-events-none stg:disabled:opacity-40"), children: [isUpdating && _jsx(SpinnerIcon, { size: 12 }), "Save changes"] }), hasChanges && !isUpdating && (_jsx("button", { type: "button", onClick: handleDiscard, className: cn("stg:rounded-md stg:px-3 stg:py-1.5 stg:text-xs", "stg:text-muted-foreground stg:hover:text-foreground stg:hover:bg-accent-hover"), children: "Discard" }))] }))] }));
|
|
120
|
+
return (_jsxs("form", { onSubmit: handleSubmit, className: cn("stg:space-y-4", className), children: [_jsx(StandingContextField, { id: `${baseId}-standing-context`, value: standingContext, onChange: setStandingContext, disabled: isUpdating, readOnly: !canEdit, placeholder: "e.g. We deploy to us-east-1. Our stack is Go and TypeScript. Prefer concise answers.", helperText: "Shared with agents as background context \u2014 not instructions. Applies to executions started by signed-in members of this organization and is visible on their execution records." }), _jsx(MemoryEnabledRow, { id: `${baseId}-memory-enabled`, checked: organization.spec?.preferences?.memoryEnabled ?? false, onToggle: (next) => void handleMemoryToggle(next), saving: isSavingMemoryFlag, readOnly: !canEdit, error: memoryFlagError, helperText: "Allow agents to remember confirmed facts about members of this organization. Each member must also turn memory on in their own account preferences. Changes apply immediately." }), !canEdit && (_jsx("p", { className: "stg:text-[0.65rem] stg:text-muted-foreground", children: "Only organization admins can edit these preferences." })), updateError && (_jsx("p", { className: "stg:text-destructive stg:text-[0.65rem]", role: "alert", children: getUserMessage(updateError) })), canEdit && (_jsxs("div", { className: "stg:flex stg:items-center stg:gap-2", children: [_jsxs("button", { type: "submit", disabled: !canSubmit, className: cn("stg:inline-flex stg:items-center stg:gap-1.5 stg:rounded-md stg:px-3 stg:py-1.5 stg:text-xs stg:font-medium", "stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover", "stg:disabled:pointer-events-none stg:disabled:opacity-40"), children: [isUpdating && _jsx(SpinnerIcon, { size: 12 }), "Save changes"] }), hasChanges && !isUpdating && (_jsx("button", { type: "button", onClick: handleDiscard, className: cn("stg:rounded-md stg:px-3 stg:py-1.5 stg:text-xs", "stg:text-muted-foreground stg:hover:text-foreground stg:hover:bg-accent-hover"), children: "Discard" }))] }))] }));
|
|
89
121
|
}
|
|
90
122
|
//# sourceMappingURL=OrgPreferencesPanel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrgPreferencesPanel.js","sourceRoot":"","sources":["../../src/organization/OrgPreferencesPanel.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAkB,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzF,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAEzE,OAAO,EAAE,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AS,EAAE,EAAE,CACX,gDAAgD,EAChD,+EAA+E,CAChF,wBAGM,CACV,IACG,CACP,IACI,CACR,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stigmer/react",
|
|
3
|
-
"version": "3.12.
|
|
3
|
+
"version": "3.12.8",
|
|
4
4
|
"description": "React provider and client hook for the Stigmer platform SDK",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@bufbuild/protovalidate": "^1.1.1",
|
|
39
39
|
"@dagrejs/dagre": "^1.1.4",
|
|
40
|
-
"@stigmer/theme": "3.12.
|
|
40
|
+
"@stigmer/theme": "3.12.8",
|
|
41
41
|
"diff": "^8.0.3",
|
|
42
42
|
"fflate": "^0.8.2",
|
|
43
43
|
"hast-util-to-jsx-runtime": "^2.3.6",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"@codemirror/state": "^6.0.0",
|
|
61
61
|
"@codemirror/view": "^6.0.0",
|
|
62
62
|
"@lezer/highlight": "^1.0.0",
|
|
63
|
-
"@stigmer/protos": "3.12.
|
|
64
|
-
"@stigmer/sdk": "3.12.
|
|
63
|
+
"@stigmer/protos": "3.12.8",
|
|
64
|
+
"@stigmer/sdk": "3.12.8",
|
|
65
65
|
"@tanstack/react-table": "^8.20.0",
|
|
66
66
|
"@xyflow/react": "^12.0.0",
|
|
67
67
|
"elkjs": "^0.9.0",
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Armed-only indicator for the session-scoped auto-approve state, docked
|
|
3
|
+
* above the composer. Renders nothing about approvals until auto-approve is
|
|
4
|
+
* actually ON — the composer stays clean by default — and while ON it is the
|
|
5
|
+
* always-visible safety surface: the user can never be silently
|
|
6
|
+
* auto-approving without seeing this strip and its one-click "Turn off".
|
|
7
|
+
*
|
|
8
|
+
* The way ON lives elsewhere (the Config facet's Run Config switch, the
|
|
9
|
+
* gate-time "Approve & don't ask again", the account's `default_auto_approve`
|
|
10
|
+
* preference, the host's `approvalDefaults`); this strip is deliberately only
|
|
11
|
+
* the way OFF plus the disclosure. Shared by `SessionViewer` and
|
|
12
|
+
* `NewSessionViewer` (DD-016) — a persisted account preference can arm the
|
|
13
|
+
* launcher before the first message, so both surfaces need the disclosure.
|
|
14
|
+
*/
|
|
15
|
+
export declare function AutoApproveIndicator({ onTurnOff }: {
|
|
16
|
+
readonly onTurnOff: () => void;
|
|
17
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
//# sourceMappingURL=AutoApproveIndicator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoApproveIndicator.d.ts","sourceRoot":"","sources":["../../src/session/AutoApproveIndicator.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,IAAI,CAAA;CAAE,2CAmBrF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* Armed-only indicator for the session-scoped auto-approve state, docked
|
|
5
|
+
* above the composer. Renders nothing about approvals until auto-approve is
|
|
6
|
+
* actually ON — the composer stays clean by default — and while ON it is the
|
|
7
|
+
* always-visible safety surface: the user can never be silently
|
|
8
|
+
* auto-approving without seeing this strip and its one-click "Turn off".
|
|
9
|
+
*
|
|
10
|
+
* The way ON lives elsewhere (the Config facet's Run Config switch, the
|
|
11
|
+
* gate-time "Approve & don't ask again", the account's `default_auto_approve`
|
|
12
|
+
* preference, the host's `approvalDefaults`); this strip is deliberately only
|
|
13
|
+
* the way OFF plus the disclosure. Shared by `SessionViewer` and
|
|
14
|
+
* `NewSessionViewer` (DD-016) — a persisted account preference can arm the
|
|
15
|
+
* launcher before the first message, so both surfaces need the disclosure.
|
|
16
|
+
*/
|
|
17
|
+
export function AutoApproveIndicator({ onTurnOff }) {
|
|
18
|
+
return (_jsxs("div", { role: "status", className: "stg:flex stg:items-center stg:gap-2 stg:border-t stg:border-border-muted stg:px-4 stg:py-1.5 stg:text-xs stg:text-muted-foreground", children: [_jsx(ShieldCheckIcon, {}), _jsx("span", { className: "stg:min-w-0 stg:flex-1 stg:truncate", children: "Auto-approving tool calls for this session" }), _jsx("button", { type: "button", onClick: onTurnOff, className: "stg:shrink-0 stg:rounded stg:font-medium stg:text-foreground stg:underline-offset-2 stg:hover:underline stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring", children: "Turn off" })] }));
|
|
19
|
+
}
|
|
20
|
+
function ShieldCheckIcon() {
|
|
21
|
+
return (_jsxs("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "stg:shrink-0 stg:text-success", "aria-hidden": "true", children: [_jsx("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" }), _jsx("path", { d: "m9 12 2 2 4-4" })] }));
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=AutoApproveIndicator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoApproveIndicator.js","sourceRoot":"","sources":["../../src/session/AutoApproveIndicator.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,oBAAoB,CAAC,EAAE,SAAS,EAAsC;IACpF,OAAO,CACL,eACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,oIAAoI,aAE9I,KAAC,eAAe,KAAG,EACnB,eAAM,SAAS,EAAC,qCAAqC,2DAE9C,EACP,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,SAAS,EAClB,SAAS,EAAC,6LAA6L,yBAGhM,IACL,CACP,CAAC;AACJ,CAAC;AAED,SAAS,eAAe;IACtB,OAAO,CACL,eAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,MAAM,EAAC,cAAc,EAAC,WAAW,EAAC,GAAG,EAAC,aAAa,EAAC,OAAO,EAAC,cAAc,EAAC,OAAO,EAAC,SAAS,EAAC,+BAA+B,iBAAa,MAAM,aACzM,eAAM,CAAC,EAAC,6CAA6C,GAAG,EACxD,eAAM,CAAC,EAAC,eAAe,GAAG,IACtB,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NewSessionViewer.d.ts","sourceRoot":"","sources":["../../src/session/NewSessionViewer.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA6C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAClF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AAGzF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAC;
|
|
1
|
+
{"version":3,"file":"NewSessionViewer.d.ts","sourceRoot":"","sources":["../../src/session/NewSessionViewer.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA6C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAClF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,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AW,CAAC,EAAE,MAAM,CAAC;IAC9B,sDAAsD;IACtD,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAE7B;;;;OAIG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,CAAC;IAEnC,yDAAyD;IACzD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,GAAG,EACH,gBAAgB,EAChB,OAAO,EACP,gBAAgB,EAChB,YAAmB,EACnB,WAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,wBAAwB,EACxB,aAAa,EACb,QAAuB,EACvB,SAAS,EACT,iBAAwB,EACxB,KAAK,EAAE,SAAkB,EACzB,gBAAgB,EAChB,SAAS,EACT,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,OAA2C,EAC3C,WAAsD,EACtD,WAAe,EACf,SAAgB,EAChB,aAAa,EACb,SAAS,GACV,EAAE,qBAAqB,2CA2QvB"}
|
|
@@ -9,6 +9,7 @@ import { useNewSessionFlow } from "./useNewSessionFlow.js";
|
|
|
9
9
|
import { useSessionPanel } from "./useSessionPanel.js";
|
|
10
10
|
import { useSessionRailViews } from "./useSessionRailViews.js";
|
|
11
11
|
import { SessionPanelChip } from "./SessionPanelChip.js";
|
|
12
|
+
import { AutoApproveIndicator } from "./AutoApproveIndicator.js";
|
|
12
13
|
/**
|
|
13
14
|
* Full-featured new-session launcher organism — the pre-session analog
|
|
14
15
|
* of `SessionViewer`.
|
|
@@ -121,6 +122,13 @@ export function NewSessionViewer({ org, onSessionCreated, onError, gitHubConnect
|
|
|
121
122
|
harness: flow.harness,
|
|
122
123
|
executionTarget: undefined,
|
|
123
124
|
modelId: flow.modelId,
|
|
125
|
+
// Pre-session arming (#816): the switch covers the session this
|
|
126
|
+
// surface will create — the bootstrap execution carries
|
|
127
|
+
// spec.auto_approve_all. Guests never get it (they never render the
|
|
128
|
+
// panel either — belt and braces for the operator-consent withhold).
|
|
129
|
+
autoApprove: isGuest
|
|
130
|
+
? undefined
|
|
131
|
+
: { armed: flow.autoApproveAll, onChange: flow.setAutoApproveAll },
|
|
124
132
|
// Curated audiences see the configuration but cannot strip it — the
|
|
125
133
|
// Setup tab renders read-only without mutation callbacks (DD-011).
|
|
126
134
|
mutations: isCurated
|
|
@@ -133,6 +141,7 @@ export function NewSessionViewer({ org, onSessionCreated, onError, gitHubConnect
|
|
|
133
141
|
}), [
|
|
134
142
|
flow.agentRef, flow.mcpServerUsages, flow.skillRefs,
|
|
135
143
|
flow.sessionVariables, flow.harness, flow.modelId,
|
|
144
|
+
flow.autoApproveAll, flow.setAutoApproveAll, isGuest,
|
|
136
145
|
isCurated, handleRemoveAgent, handleRemoveMcp, handleRemoveSkill,
|
|
137
146
|
]);
|
|
138
147
|
// Launcher facets: Config only — no executions exist yet, so the
|
|
@@ -162,7 +171,7 @@ export function NewSessionViewer({ org, onSessionCreated, onError, gitHubConnect
|
|
|
162
171
|
_jsx("div", { className: "stg:flex stg:h-full stg:flex-col stg:items-center stg:overflow-y-auto stg:px-4 stg:py-6", children: _jsxs("div", { className: "stg:my-auto stg:w-full stg:max-w-2xl stg:space-y-6", children: [_jsx("h1", { className: "stg:text-center stg:text-lg stg:font-medium stg:text-foreground", children: heading }), _jsx(SessionComposer, { onSubmit: flow.submit, isSubmitting: flow.isSubmitting, org: org, workspace: isGuest ? undefined : flow.workspace, gitHubConnection: enableGitHub && !isGuest ? gitHubConnection : undefined, enableGitHub: enableGitHub && !isGuest, enableLocal: enableLocal && !isGuest, onBrowseLocalFolder: onBrowseLocalFolder, agentRef: flow.agentRef,
|
|
163
172
|
// Guests get no agent machinery at all — the binding is applied
|
|
164
173
|
// by the launcher's pin effect above, not by picker resolution.
|
|
165
|
-
onAgentRefChange: isGuest ? undefined : flow.setAgentRef, onAgentResolutionChange: isGuest ? undefined : flow.setResolution, initialAgentRef: isGuest ? undefined : initialAgentRef, initialInstanceId: isGuest ? undefined : initialInstanceId, initialAttachments: isGuest ? undefined : initialAttachments, lockAgent: isCurated && initialAgentRef != null, mcpServerUsages: isCurated ? undefined : flow.mcpServerUsages, onMcpServerUsagesChange: isCurated ? undefined : flow.setMcpServerUsages, skillRefs: isCurated ? undefined : flow.skillRefs, onSkillRefsChange: isCurated ? undefined : flow.setSkillRefs, sessionVariables: isCurated ? undefined : flow.sessionVariables, showHarnessSelector: !isGuest, harness: flow.harness, onHarnessChange: flow.setHarness, interactionMode: interactionMode, onInteractionModeChange: setInteractionMode, showInteractionModePicker: !isGuest, showModelSelector: modelSelectorVisible, enableAttachments: !isGuest, defaultModelId: flow.modelId, onModelChange: flow.setModelId, placeholder: placeholder, initialRows: initialRows, autoFocus: autoFocus, ariaLabel: "Start a new session" }), footerContent, _jsx("p", { className: "stg:text-center stg:text-[0.65rem] stg:text-muted-foreground", children: "Press Enter to send, Shift+Enter for a new line" })] }) }));
|
|
174
|
+
onAgentRefChange: isGuest ? undefined : flow.setAgentRef, onAgentResolutionChange: isGuest ? undefined : flow.setResolution, initialAgentRef: isGuest ? undefined : initialAgentRef, initialInstanceId: isGuest ? undefined : initialInstanceId, initialAttachments: isGuest ? undefined : initialAttachments, lockAgent: isCurated && initialAgentRef != null, mcpServerUsages: isCurated ? undefined : flow.mcpServerUsages, onMcpServerUsagesChange: isCurated ? undefined : flow.setMcpServerUsages, skillRefs: isCurated ? undefined : flow.skillRefs, onSkillRefsChange: isCurated ? undefined : flow.setSkillRefs, sessionVariables: isCurated ? undefined : flow.sessionVariables, showHarnessSelector: !isGuest, harness: flow.harness, onHarnessChange: flow.setHarness, interactionMode: interactionMode, onInteractionModeChange: setInteractionMode, showInteractionModePicker: !isGuest, showModelSelector: modelSelectorVisible, enableAttachments: !isGuest, defaultModelId: flow.modelId, onModelChange: flow.setModelId, placeholder: placeholder, initialRows: initialRows, autoFocus: autoFocus, ariaLabel: "Start a new session" }), !isGuest && flow.autoApproveAll && (_jsx(AutoApproveIndicator, { onTurnOff: () => flow.setAutoApproveAll(false) })), footerContent, _jsx("p", { className: "stg:text-center stg:text-[0.65rem] stg:text-muted-foreground", children: "Press Enter to send, Shift+Enter for a new line" })] }) }));
|
|
166
175
|
return (
|
|
167
176
|
// The launcher renders the same SessionViewerLayout as SessionViewer
|
|
168
177
|
// (DD-016) — the shared frame is what makes "the two viewers behave
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NewSessionViewer.js","sourceRoot":"","sources":["../../src/session/NewSessionViewer.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AAOlF,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAGvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"NewSessionViewer.js","sourceRoot":"","sources":["../../src/session/NewSessionViewer.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AAOlF,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAGvD,OAAO,EAAE,mBAAmB,EAAE,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AAC,oBAAoB,CAAC,CAAC,CAAC,SAAS,EACtE,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,UAAU,EACxB,UAAU,EAAE,KAAK,CAAC,QAAQ,EAC1B,gBAAgB,EAAE,KAAK,CAAC,cAAc,EACtC,WAAW,EAAE,KAAK,CAAC,SAAS,EAC5B,aAAa,EAAE,KAAK,CAAC,WAAW,EAChC,UAAU,EAAE,KAAK,CAAC,UAAU,EAC5B,MAAM,EAAE,YAAY,EACpB,SAAS,EAAC,YAAY,GACtB,CACH,CAAC,CAAC,CAAC,IAAI,GAEV,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -3,6 +3,7 @@ import type { UseGitHubConnectionReturn } from "../github/useGitHubConnection.js
|
|
|
3
3
|
import type { WorkspaceFileLister } from "../workspace/WorkspaceFileLister.js";
|
|
4
4
|
import type { WorkspaceFileReader } from "../workspace/WorkspaceFileReader.js";
|
|
5
5
|
import type { WorkspaceContentSearcher } from "../workspace/WorkspaceContentSearcher.js";
|
|
6
|
+
import type { AccountExecutionDefaults } from "../identity-account/useAccountExecutionDefaults.js";
|
|
6
7
|
import type { ApplyResourceResult } from "../library/useApplyResource.js";
|
|
7
8
|
import { type MessageThreadSlots } from "../execution/MessageThread.js";
|
|
8
9
|
import type { RuntimeEnvProvider } from "./runtime-env.js";
|
|
@@ -110,6 +111,17 @@ export interface SessionViewerProps {
|
|
|
110
111
|
* server-side share policy owns. See {@link SessionRunConfig}.
|
|
111
112
|
*/
|
|
112
113
|
readonly runConfig?: SessionRunConfig;
|
|
114
|
+
/**
|
|
115
|
+
* The user's account-level execution defaults, typically from
|
|
116
|
+
* `useAccountExecutionDefaults()` — same seam as
|
|
117
|
+
* `NewSessionViewer.accountDefaults` (DD-016). On the session page only
|
|
118
|
+
* the `autoApprove` default applies: it seeds the session-scoped
|
|
119
|
+
* auto-approve state so a declared `default_auto_approve` preference
|
|
120
|
+
* covers follow-ups on existing sessions too. An explicit flip of the
|
|
121
|
+
* Config facet's switch wins for this session. Ignored for the
|
|
122
|
+
* `"guest"` audience.
|
|
123
|
+
*/
|
|
124
|
+
readonly accountDefaults?: AccountExecutionDefaults;
|
|
113
125
|
/**
|
|
114
126
|
* Whether the follow-up composer offers the model picker. `false`
|
|
115
127
|
* hides the picker while keeping the SDK's model sourcing (persisted
|
|
@@ -164,6 +176,19 @@ export interface SessionViewerProps {
|
|
|
164
176
|
* unopinionated about Console auth (DD-004).
|
|
165
177
|
*/
|
|
166
178
|
readonly headerActions?: ReactNode;
|
|
179
|
+
/**
|
|
180
|
+
* Whether the viewer offers its built-in whole-conversation export
|
|
181
|
+
* (stigmer/stigmer#814). Placement is panel-aware: viewers with the
|
|
182
|
+
* session panel export from the Config facet's Transcript section, and
|
|
183
|
+
* panel-less viewers (guests, `panel="none"`) render the header
|
|
184
|
+
* {@link TranscriptExportMenu} instead — so wherever a conversation can
|
|
185
|
+
* be viewed, its transcript stays reachable. The export carries only
|
|
186
|
+
* what the current caller can already read (`can_view`-scoped). Hosts
|
|
187
|
+
* that own their export surface (or inert demo scenes) opt out.
|
|
188
|
+
*
|
|
189
|
+
* @default true
|
|
190
|
+
*/
|
|
191
|
+
readonly transcriptExport?: boolean;
|
|
167
192
|
/**
|
|
168
193
|
* Host-injected access management control (e.g. the Console's
|
|
169
194
|
* `ManageAccessButton` with its own permission gating). Rendered inside
|
|
@@ -225,5 +250,5 @@ export interface SessionViewerProps {
|
|
|
225
250
|
* />
|
|
226
251
|
* ```
|
|
227
252
|
*/
|
|
228
|
-
export declare function SessionViewer({ sessionId, org, gitHubConnection, enableGitHub, enableLocal, onBrowseLocalFolder, workspaceFileLister, workspaceFileReader, workspaceContentSearcher, getRuntimeEnv, audience, runConfig, showModelSelector, panel: panelMode, defaultPanelOpen, panelOpen, onPanelOpenChange, headerActions, accessSlot, onApplied, threadSlots, className, }: SessionViewerProps): import("react/jsx-runtime").JSX.Element;
|
|
253
|
+
export declare function SessionViewer({ sessionId, org, gitHubConnection, enableGitHub, enableLocal, onBrowseLocalFolder, workspaceFileLister, workspaceFileReader, workspaceContentSearcher, getRuntimeEnv, audience, runConfig, accountDefaults, showModelSelector, panel: panelMode, defaultPanelOpen, panelOpen, onPanelOpenChange, headerActions, transcriptExport, accessSlot, onApplied, threadSlots, className, }: SessionViewerProps): import("react/jsx-runtime").JSX.Element;
|
|
229
254
|
//# sourceMappingURL=SessionViewer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionViewer.d.ts","sourceRoot":"","sources":["../../src/session/SessionViewer.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA2D,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAQhG,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AAOzF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAI1E,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"SessionViewer.d.ts","sourceRoot":"","sources":["../../src/session/SessionViewer.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA2D,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAQhG,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AAOzF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAC;AACnG,OAAO,KAAK,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EACV,SAAS,EACT,WAAW,EACX,SAAS,GACV,EAAE,kBAAkB,2CA6WpB"}
|
package/session/SessionViewer.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { memo, useCallback, useMemo, useRef, useState } from "react";
|
|
4
4
|
import { create } from "@bufbuild/protobuf";
|
|
5
5
|
import { cn } from "@stigmer/theme";
|
|
@@ -32,6 +32,8 @@ import { ArtifactDocument } from "../execution/ArtifactDocument.js";
|
|
|
32
32
|
import { useSessionRailViews } from "./useSessionRailViews.js";
|
|
33
33
|
import { useSessionPanel } from "./useSessionPanel.js";
|
|
34
34
|
import { SessionPanelChip } from "./SessionPanelChip.js";
|
|
35
|
+
import { TranscriptExportMenu } from "./TranscriptExportMenu.js";
|
|
36
|
+
import { AutoApproveIndicator } from "./AutoApproveIndicator.js";
|
|
35
37
|
import { useSessionWriteBacks } from "./useSessionWriteBacks.js";
|
|
36
38
|
import { useWorkspaceReadRefs } from "./useWorkspaceReadRefs.js";
|
|
37
39
|
import { useSessionArtifacts, artifactKey, } from "./useSessionArtifacts.js";
|
|
@@ -126,13 +128,14 @@ const CONVERSATION_COLUMN_CLASS = "stg:mx-auto stg:w-full stg:max-w-3xl";
|
|
|
126
128
|
* />
|
|
127
129
|
* ```
|
|
128
130
|
*/
|
|
129
|
-
export function SessionViewer({ sessionId, org, gitHubConnection, enableGitHub = true, enableLocal = false, onBrowseLocalFolder, workspaceFileLister, workspaceFileReader, workspaceContentSearcher, getRuntimeEnv, audience = "integrator", runConfig, showModelSelector = true, panel: panelMode = "auto", defaultPanelOpen, panelOpen, onPanelOpenChange, headerActions, accessSlot, onApplied, threadSlots, className, }) {
|
|
131
|
+
export function SessionViewer({ sessionId, org, gitHubConnection, enableGitHub = true, enableLocal = false, onBrowseLocalFolder, workspaceFileLister, workspaceFileReader, workspaceContentSearcher, getRuntimeEnv, audience = "integrator", runConfig, accountDefaults, showModelSelector = true, panel: panelMode = "auto", defaultPanelOpen, panelOpen, onPanelOpenChange, headerActions, transcriptExport = true, accessSlot, onApplied, threadSlots, className, }) {
|
|
130
132
|
const flow = useSessionPageFlow({
|
|
131
133
|
sessionId,
|
|
132
134
|
org,
|
|
133
135
|
getRuntimeEnv,
|
|
134
136
|
audience,
|
|
135
137
|
runConfig,
|
|
138
|
+
accountDefaults,
|
|
136
139
|
});
|
|
137
140
|
const { conv } = flow;
|
|
138
141
|
const isGuest = audience === "guest";
|
|
@@ -348,9 +351,13 @@ export function SessionViewer({ sessionId, org, gitHubConnection, enableGitHub =
|
|
|
348
351
|
// panel's always-mounted toggle; while collapsed it carries only the
|
|
349
352
|
// pending-item count. Execution status is never surfaced as header
|
|
350
353
|
// chrome — the thread itself communicates run state. A viewer without
|
|
351
|
-
// a panel (guests — session configuration is not a visitor's business
|
|
352
|
-
//
|
|
353
|
-
|
|
354
|
+
// a panel (guests — session configuration is not a visitor's business —
|
|
355
|
+
// or a host's panel="none") has no toggle: it is simply absent.
|
|
356
|
+
//
|
|
357
|
+
// Transcript export lives in the panel's Config facet; the header menu
|
|
358
|
+
// renders ONLY for panel-less viewers, so no audience loses export
|
|
359
|
+
// (guests and panel="none" hosts have no facet to reach it through).
|
|
360
|
+
headerActions: transcriptExport && !panelEnabled ? (_jsxs(_Fragment, { children: [headerActions, _jsx(TranscriptExportMenu, { sessionId: sessionId })] })) : (headerActions), chip: panelEnabled ? (_jsx(SessionPanelChip, { isOpen: panel.isOpen, onToggle: panel.isOpen ? panel.closePanel : panel.openPanel, badgeCount: writeBackCount + artifactCount })) : undefined, splitStorageKey: "stgm-session-chat-width", conversation: _jsx(ConversationColumn, { flow: flow, modelId: modelId, setModelId: setModelId, interactionMode: interactionMode, setInteractionMode: setInteractionMode, composerRef: composerRef, org: org, gitHubConnection: gitHubConnection, enableGitHub: enableGitHub, enableLocal: enableLocal, onBrowseLocalFolder: onBrowseLocalFolder, onBuildFromPlan: handleBuildFromPlan, onOpenPlan: handleOpenPlan, isBuildingFromPlan: isBuildingFromPlan, planAttachFailed: planAttachFailed, onDismissPlanAttachFailed: () => setPlanAttachFailed(false), onFilePathClick: handleTranscriptFilePathClick, isCurated: isCurated, isGuest: isGuest, isObserver: isObserver, modelSelectorVisible: modelSelectorVisible, threadSlots: threadSlots }), panel: panel.isOpen && panelEnabled ? (_jsx(SessionPanelRegion, { flow: flow, org: org, panel: panel,
|
|
354
361
|
// Observers cannot manage access (no can_grant_access /
|
|
355
362
|
// can_view_access on a channel session) — the control is
|
|
356
363
|
// withheld rather than left to fail server-side.
|
|
@@ -358,7 +365,10 @@ export function SessionViewer({ sessionId, org, gitHubConnection, enableGitHub =
|
|
|
358
365
|
// Implementing a plan submits an execution — a write an
|
|
359
366
|
// observer cannot make (can_create_execution_in is
|
|
360
367
|
// owner/viewer-only).
|
|
361
|
-
onImplementPlan: isObserver ? undefined : handleBuildFromPlan, implementPlanDisabled: isObserver || !conv.canSendFollowUp || isBuildingFromPlan, sessionPlan: sessionPlan, streamingPlan: streamingPlan, planDraft: planDraft, openPlanExecutionId: openPlanExecutionId, onOpenPlan: handleOpenPlan, onOpenArtifact: handleOpenArtifact, onActivateArtifact: handleActivateArtifact, enableLocal: enableLocal, onBrowseLocalFolder: onBrowseLocalFolder, workspaceFileLister: workspaceFileLister, workspaceFileReader: workspaceFileReader, workspaceContentSearcher: workspaceContentSearcher, isCurated: isCurated
|
|
368
|
+
onImplementPlan: isObserver ? undefined : handleBuildFromPlan, implementPlanDisabled: isObserver || !conv.canSendFollowUp || isBuildingFromPlan, sessionPlan: sessionPlan, streamingPlan: streamingPlan, planDraft: planDraft, openPlanExecutionId: openPlanExecutionId, onOpenPlan: handleOpenPlan, onOpenArtifact: handleOpenArtifact, onActivateArtifact: handleActivateArtifact, enableLocal: enableLocal, onBrowseLocalFolder: onBrowseLocalFolder, workspaceFileLister: workspaceFileLister, workspaceFileReader: workspaceFileReader, workspaceContentSearcher: workspaceContentSearcher, isCurated: isCurated, isObserver: isObserver,
|
|
369
|
+
// Drives the Config facet's Transcript section only — a host
|
|
370
|
+
// that opted out of export gets no facet section either.
|
|
371
|
+
exportSessionId: transcriptExport ? sessionId : null })) : null }));
|
|
362
372
|
}
|
|
363
373
|
const ConversationColumn = memo(function ConversationColumn({ flow, modelId, setModelId, interactionMode, setInteractionMode, composerRef, org, gitHubConnection, enableGitHub, enableLocal, onBrowseLocalFolder, onBuildFromPlan, onOpenPlan, isBuildingFromPlan, planAttachFailed, onDismissPlanAttachFailed, onFilePathClick, isCurated, isGuest, isObserver, modelSelectorVisible, threadSlots, }) {
|
|
364
374
|
const { conv } = flow;
|
|
@@ -437,7 +447,7 @@ const ConversationColumn = memo(function ConversationColumn({ flow, modelId, set
|
|
|
437
447
|
// org reads a guest token cannot make.
|
|
438
448
|
onAgentRefChange: isGuest ? undefined : flow.setAgentRef, onAgentResolutionChange: isGuest ? undefined : flow.setResolution, isDefaultAgent: flow.isDefaultAgent, lockAgent: isCurated, mcpServerUsages: isCurated ? undefined : flow.mcpServerUsages, onMcpServerUsagesChange: isCurated ? undefined : flow.setMcpServerUsages, skillRefs: isCurated ? undefined : flow.skillRefs, onSkillRefsChange: isCurated ? undefined : flow.setSkillRefs, sessionVariables: isCurated ? undefined : flow.sessionVariables, className: "stg:px-4 stg:py-3" }))] })] }));
|
|
439
449
|
});
|
|
440
|
-
function SessionPanelRegion({ flow, org, panel, accessSlot, onApplied, onImplementPlan, implementPlanDisabled, sessionPlan, streamingPlan, planDraft, openPlanExecutionId, onOpenPlan, onOpenArtifact, onActivateArtifact, enableLocal, onBrowseLocalFolder, workspaceFileLister, workspaceFileReader, workspaceContentSearcher, isCurated, }) {
|
|
450
|
+
function SessionPanelRegion({ flow, org, panel, accessSlot, onApplied, onImplementPlan, implementPlanDisabled, sessionPlan, streamingPlan, planDraft, openPlanExecutionId, onOpenPlan, onOpenArtifact, onActivateArtifact, enableLocal, onBrowseLocalFolder, workspaceFileLister, workspaceFileReader, workspaceContentSearcher, isCurated, isObserver, exportSessionId, }) {
|
|
441
451
|
const { editors, activeKey, activeFile, reveal } = useWorkspaceEditors(panel.editorsStore);
|
|
442
452
|
// Session artifacts, deduped by identity — the source both the Artifacts
|
|
443
453
|
// rail-view badge and the open artifact document tabs resolve against.
|
|
@@ -533,6 +543,16 @@ function SessionPanelRegion({ flow, org, panel, accessSlot, onApplied, onImpleme
|
|
|
533
543
|
harness: flow.harness,
|
|
534
544
|
executionTarget: flow.executionTarget,
|
|
535
545
|
modelId: flow.model[0],
|
|
546
|
+
// Arming auto-approve is an operator decision — withheld from
|
|
547
|
+
// observers with the same gate as approval submission (guests never
|
|
548
|
+
// render the panel). The switch stays interactive mid-run: flipping
|
|
549
|
+
// it ON releases the in-flight run's gates via the flow's standing
|
|
550
|
+
// responder (#816).
|
|
551
|
+
autoApprove: isObserver
|
|
552
|
+
? undefined
|
|
553
|
+
: { armed: flow.autoApproveAll, onChange: flow.setAutoApproveAll },
|
|
554
|
+
// Transcript export is view-scoped, so observers keep it (#814).
|
|
555
|
+
sessionId: exportSessionId,
|
|
536
556
|
// Curated audiences see the configuration but cannot strip it — the
|
|
537
557
|
// Config facet renders read-only without mutation callbacks (DD-011).
|
|
538
558
|
mutations: isCurated
|
|
@@ -546,6 +566,7 @@ function SessionPanelRegion({ flow, org, panel, accessSlot, onApplied, onImpleme
|
|
|
546
566
|
}), [
|
|
547
567
|
flow.agentRef, flow.isDefaultAgent, flow.mcpServerUsages, flow.skillRefs,
|
|
548
568
|
flow.sessionVariables, flow.harness, flow.executionTarget, flow.model,
|
|
569
|
+
flow.autoApproveAll, flow.setAutoApproveAll, isObserver, exportSessionId,
|
|
549
570
|
isCurated, handleRemoveAgent, handleRemoveMcp, handleRemoveSkill,
|
|
550
571
|
accessSlot,
|
|
551
572
|
]);
|
|
@@ -597,18 +618,6 @@ function SessionLoadError({ error }) {
|
|
|
597
618
|
function SessionStarting() {
|
|
598
619
|
return (_jsx("div", { className: "stg:flex stg:h-full stg:items-center stg:justify-center", children: _jsxs("div", { className: "stg:space-y-2 stg:text-center", children: [_jsx(LoaderIcon, {}), _jsx("p", { className: "stg:text-sm stg:text-muted-foreground", children: "Starting session\u2026" })] }) }));
|
|
599
620
|
}
|
|
600
|
-
/**
|
|
601
|
-
* Low-weight, always-visible indicator shown while the session-scoped
|
|
602
|
-
* auto-approve preference is active. The "Turn off" control reverts the
|
|
603
|
-
* preference in one click — the safety affordance for "Approve & don't ask
|
|
604
|
-
* again". Visible from the first render when the host pre-armed the
|
|
605
|
-
* preference via `StigmerProvider`'s `approvalDefaults` (#302); otherwise
|
|
606
|
-
* nothing about approvals appears until the user opts in at a gate. Either
|
|
607
|
-
* way the user keeps the last word.
|
|
608
|
-
*/
|
|
609
|
-
function AutoApproveIndicator({ onTurnOff }) {
|
|
610
|
-
return (_jsxs("div", { role: "status", className: "stg:flex stg:items-center stg:gap-2 stg:border-t stg:border-border-muted stg:px-4 stg:py-1.5 stg:text-xs stg:text-muted-foreground", children: [_jsx(ShieldCheckIcon, {}), _jsx("span", { className: "stg:min-w-0 stg:flex-1 stg:truncate", children: "Auto-approving tool calls for this session" }), _jsx("button", { type: "button", onClick: onTurnOff, className: "stg:shrink-0 stg:rounded stg:font-medium stg:text-foreground stg:underline-offset-2 stg:hover:underline stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring", children: "Turn off" })] }));
|
|
611
|
-
}
|
|
612
621
|
/**
|
|
613
622
|
* The plan document tab's empty state — reachable only when a streaming plan
|
|
614
623
|
* auto-opened the tab and its turn then ended without publishing (stopped or
|
|
@@ -675,7 +684,4 @@ function ErrorTriangleIcon() {
|
|
|
675
684
|
function LoaderIcon() {
|
|
676
685
|
return (_jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", stroke: "currentColor", strokeWidth: "2", className: "stg:mx-auto stg:animate-spin stg:text-muted-foreground", children: _jsx("path", { d: "M10 2a8 8 0 0 1 0 16", strokeLinecap: "round" }) }));
|
|
677
686
|
}
|
|
678
|
-
function ShieldCheckIcon() {
|
|
679
|
-
return (_jsxs("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "stg:shrink-0 stg:text-success", "aria-hidden": "true", children: [_jsx("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" }), _jsx("path", { d: "m9 12 2 2 4-4" })] }));
|
|
680
|
-
}
|
|
681
687
|
//# sourceMappingURL=SessionViewer.js.map
|