@parhelia/core 0.3.12831 → 0.4.12784
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents-view/AgentCard.js +1 -1
- package/dist/agents-view/AgentsWorkspaceView.js +8 -1
- package/dist/agents-view/AgentsWorkspaceView.js.map +1 -1
- package/dist/components/ui/checkbox.js +3 -2
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/context-menu.d.ts +9 -1
- package/dist/components/ui/context-menu.js +59 -12
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/select.js +16 -2
- package/dist/components/ui/select.js.map +1 -1
- package/dist/config/config.d.ts +2 -0
- package/dist/config/config.js +36 -4
- package/dist/config/config.js.map +1 -1
- package/dist/config/types.d.ts +24 -0
- package/dist/config/types.js.map +1 -1
- package/dist/editor/ContextMenu.js +59 -6
- package/dist/editor/ContextMenu.js.map +1 -1
- package/dist/editor/Editor.js +9 -2
- package/dist/editor/Editor.js.map +1 -1
- package/dist/editor/EditorWarning.d.ts +3 -1
- package/dist/editor/EditorWarning.js +24 -7
- package/dist/editor/EditorWarning.js.map +1 -1
- package/dist/editor/FieldList.js +1 -1
- package/dist/editor/FieldList.js.map +1 -1
- package/dist/editor/ai/AgentSharingSection.d.ts +1 -1
- package/dist/editor/ai/AgentSharingSection.js +7 -0
- package/dist/editor/ai/AgentSharingSection.js.map +1 -1
- package/dist/editor/ai/Agents.js +1 -1
- package/dist/editor/ai/Agents.js.map +1 -1
- package/dist/editor/ai/InlineAiDialog.d.ts +7 -1
- package/dist/editor/ai/InlineAiDialog.js +27 -7
- package/dist/editor/ai/InlineAiDialog.js.map +1 -1
- package/dist/editor/ai/InlineAiTrigger.js +63 -1
- package/dist/editor/ai/InlineAiTrigger.js.map +1 -1
- package/dist/editor/ai/terminal/activeReasoningModel.d.ts +9 -0
- package/dist/editor/ai/terminal/activeReasoningModel.js +20 -0
- package/dist/editor/ai/terminal/activeReasoningModel.js.map +1 -0
- package/dist/editor/ai/terminal/agentDurations.d.ts +27 -0
- package/dist/editor/ai/terminal/agentDurations.js +89 -0
- package/dist/editor/ai/terminal/agentDurations.js.map +1 -0
- package/dist/editor/ai/terminal/agentStartRequest.d.ts +1 -0
- package/dist/editor/ai/terminal/agentStartRequest.js +1 -0
- package/dist/editor/ai/terminal/agentStartRequest.js.map +1 -1
- package/dist/editor/ai/terminal/agentTurnTiming.d.ts +33 -0
- package/dist/editor/ai/terminal/agentTurnTiming.js +103 -0
- package/dist/editor/ai/terminal/agentTurnTiming.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentCostDisplay.d.ts +4 -1
- package/dist/editor/ai/terminal/components/AgentCostDisplay.js +17 -25
- package/dist/editor/ai/terminal/components/AgentCostDisplay.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentProfileModelSettingsSection.d.ts +5 -1
- package/dist/editor/ai/terminal/components/AgentProfileModelSettingsSection.js +7 -2
- package/dist/editor/ai/terminal/components/AgentProfileModelSettingsSection.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentProfileRecovery.d.ts +10 -0
- package/dist/editor/ai/terminal/components/AgentProfileRecovery.js +12 -0
- package/dist/editor/ai/terminal/components/AgentProfileRecovery.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentPromptComposer.js +1 -1
- package/dist/editor/ai/terminal/components/AgentSettingsContent.d.ts +5 -1
- package/dist/editor/ai/terminal/components/AgentSettingsContent.js +2 -2
- package/dist/editor/ai/terminal/components/AgentSettingsContent.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalFullLayout.d.ts +2 -1
- package/dist/editor/ai/terminal/components/AgentTerminalFullLayout.js +2 -2
- package/dist/editor/ai/terminal/components/AgentTerminalFullLayout.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalFullPromptControls.d.ts +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalFullPromptControls.js +2 -2
- package/dist/editor/ai/terminal/components/AgentTerminalFullPromptControls.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalFullUpperContent.js +10 -1
- package/dist/editor/ai/terminal/components/AgentTerminalFullUpperContent.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalMessageGroups.js +2 -1
- package/dist/editor/ai/terminal/components/AgentTerminalMessageGroups.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.d.ts +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.js +67 -6
- package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalSummaryLayout.d.ts +2 -1
- package/dist/editor/ai/terminal/components/AgentTerminalSummaryLayout.js +2 -2
- package/dist/editor/ai/terminal/components/AgentTerminalSummaryLayout.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentThinkingIndicator.d.ts +8 -1
- package/dist/editor/ai/terminal/components/AgentThinkingIndicator.js +8 -4
- package/dist/editor/ai/terminal/components/AgentThinkingIndicator.js.map +1 -1
- package/dist/editor/ai/terminal/components/AiResponseMessage.d.ts +3 -1
- package/dist/editor/ai/terminal/components/AiResponseMessage.js +66 -48
- package/dist/editor/ai/terminal/components/AiResponseMessage.js.map +1 -1
- package/dist/editor/ai/terminal/components/ApprovalCard.js +5 -6
- package/dist/editor/ai/terminal/components/ApprovalCard.js.map +1 -1
- package/dist/editor/ai/terminal/components/InitialThinkingSplash.js +2 -2
- package/dist/editor/ai/terminal/components/InitialThinkingSplash.js.map +1 -1
- package/dist/editor/ai/terminal/components/QueuedPromptsPanel.js +2 -2
- package/dist/editor/ai/terminal/components/ResponseTurnDuration.d.ts +15 -0
- package/dist/editor/ai/terminal/components/ResponseTurnDuration.js +52 -0
- package/dist/editor/ai/terminal/components/ResponseTurnDuration.js.map +1 -0
- package/dist/editor/ai/terminal/components/ToolCallDisplay.js +32 -56
- package/dist/editor/ai/terminal/components/ToolCallDisplay.js.map +1 -1
- package/dist/editor/ai/terminal/components/UserMessage.js +1 -1
- package/dist/editor/ai/terminal/components/UserMessage.js.map +1 -1
- package/dist/editor/ai/terminal/components/agentThinkingStyles.d.ts +5 -1
- package/dist/editor/ai/terminal/components/agentThinkingStyles.js +5 -1
- package/dist/editor/ai/terminal/components/agentThinkingStyles.js.map +1 -1
- package/dist/editor/ai/terminal/reasoningEffortLevels.d.ts +8 -0
- package/dist/editor/ai/terminal/reasoningEffortLevels.js +54 -0
- package/dist/editor/ai/terminal/reasoningEffortLevels.js.map +1 -0
- package/dist/editor/ai/terminal/requestUsage.d.ts +3 -0
- package/dist/editor/ai/terminal/requestUsage.js +22 -0
- package/dist/editor/ai/terminal/requestUsage.js.map +1 -0
- package/dist/editor/ai/terminal/types.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentModeState.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentProfileSelection.d.ts +10 -0
- package/dist/editor/ai/terminal/useAgentProfileSelection.js +10 -2
- package/dist/editor/ai/terminal/useAgentProfileSelection.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentReasoningEffortState.d.ts +5 -0
- package/dist/editor/ai/terminal/useAgentReasoningEffortState.js +10 -0
- package/dist/editor/ai/terminal/useAgentReasoningEffortState.js.map +1 -0
- package/dist/editor/ai/terminal/useAgentSessionSync.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentSettingsCommands.d.ts +9 -0
- package/dist/editor/ai/terminal/useAgentSettingsCommands.js +63 -6
- package/dist/editor/ai/terminal/useAgentSettingsCommands.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSettingsPanel.d.ts +5 -0
- package/dist/editor/ai/terminal/useAgentSettingsPanel.js +8 -0
- package/dist/editor/ai/terminal/useAgentSettingsPanel.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentSkillActions.d.ts +1 -0
- package/dist/editor/ai/terminal/useAgentSkillActions.js +1 -0
- package/dist/editor/ai/terminal/useAgentSkillActions.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentTerminalController.d.ts +1 -1
- package/dist/editor/ai/terminal/useAgentTerminalController.js +20 -4
- package/dist/editor/ai/terminal/useAgentTerminalController.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentTerminalControls.d.ts +4 -0
- package/dist/editor/ai/terminal/useAgentTerminalControls.js +5 -1
- package/dist/editor/ai/terminal/useAgentTerminalControls.js.map +1 -1
- package/dist/editor/ai-image-editor/AiImageEditorDialog.d.ts +6 -0
- package/dist/editor/ai-image-editor/AiImageEditorDialog.js +202 -64
- package/dist/editor/ai-image-editor/AiImageEditorDialog.js.map +1 -1
- package/dist/editor/client/EditorShell.js +30 -33
- package/dist/editor/client/EditorShell.js.map +1 -1
- package/dist/editor/client/SandboxWelcomeOverlay.d.ts +4 -1
- package/dist/editor/client/SandboxWelcomeOverlay.js +6 -5
- package/dist/editor/client/SandboxWelcomeOverlay.js.map +1 -1
- package/dist/editor/client/SessionsDialog.d.ts +2 -0
- package/dist/editor/client/SessionsDialog.js +27 -0
- package/dist/editor/client/SessionsDialog.js.map +1 -0
- package/dist/editor/client/hooks/useSocketMessageHandler.js +4 -0
- package/dist/editor/client/hooks/useSocketMessageHandler.js.map +1 -1
- package/dist/editor/client/ui/DevModeIndicator.js +6 -4
- package/dist/editor/client/ui/DevModeIndicator.js.map +1 -1
- package/dist/editor/editor-warnings/ItemLocked.js +1 -1
- package/dist/editor/editor-warnings/ItemLocked.js.map +1 -1
- package/dist/editor/editor-warnings/NoLanguageWriteAccess.js +1 -1
- package/dist/editor/editor-warnings/NoLanguageWriteAccess.js.map +1 -1
- package/dist/editor/editor-warnings/NoWorkflowWriteAccess.js +1 -1
- package/dist/editor/editor-warnings/NoWorkflowWriteAccess.js.map +1 -1
- package/dist/editor/editor-warnings/NoWriteAccess.js +1 -1
- package/dist/editor/editor-warnings/NoWriteAccess.js.map +1 -1
- package/dist/editor/media-selector/MediaFolderBrowser.js +1 -1
- package/dist/editor/menubar/ActiveUsers.js +4 -1
- package/dist/editor/menubar/ActiveUsers.js.map +1 -1
- package/dist/editor/menubar/OpenPublishedPageButton.d.ts +1 -0
- package/dist/editor/menubar/OpenPublishedPageButton.js +22 -0
- package/dist/editor/menubar/OpenPublishedPageButton.js.map +1 -0
- package/dist/editor/menubar/WorkflowButton.js +77 -22
- package/dist/editor/menubar/WorkflowButton.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/PreviewModeControl.js +1 -1
- package/dist/editor/menubar/toolbar-sections/PreviewModeControl.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/ViewportControls.js +8 -4
- package/dist/editor/menubar/toolbar-sections/ViewportControls.js.map +1 -1
- package/dist/editor/page-editor-chrome/BridgeInlineFormatOverlay.js +36 -1
- package/dist/editor/page-editor-chrome/BridgeInlineFormatOverlay.js.map +1 -1
- package/dist/editor/page-editor-chrome/bridgeInlineFormatToolbarLayout.d.ts +19 -0
- package/dist/editor/page-editor-chrome/bridgeInlineFormatToolbarLayout.js +14 -0
- package/dist/editor/page-editor-chrome/bridgeInlineFormatToolbarLayout.js.map +1 -1
- package/dist/editor/page-editor-chrome/overlay/IframeOverlayProvider.d.ts +3 -0
- package/dist/editor/page-editor-chrome/overlay/IframeOverlayProvider.js +18 -0
- package/dist/editor/page-editor-chrome/overlay/IframeOverlayProvider.js.map +1 -1
- package/dist/editor/page-viewer/DeviceToolbar.js +20 -8
- package/dist/editor/page-viewer/DeviceToolbar.js.map +1 -1
- package/dist/editor/page-viewer/EditorForm.js +8 -7
- package/dist/editor/page-viewer/EditorForm.js.map +1 -1
- package/dist/editor/page-viewer/PageViewerFrame.js +10 -0
- package/dist/editor/page-viewer/PageViewerFrame.js.map +1 -1
- package/dist/editor/page-viewer/PreviewModeNotice.d.ts +7 -0
- package/dist/editor/page-viewer/PreviewModeNotice.js +19 -0
- package/dist/editor/page-viewer/PreviewModeNotice.js.map +1 -0
- package/dist/editor/page-viewer/pageViewContext.d.ts +5 -1
- package/dist/editor/page-viewer/pageViewContext.js +59 -2
- package/dist/editor/page-viewer/pageViewContext.js.map +1 -1
- package/dist/editor/page-viewer/previewEditAttempt.d.ts +31 -0
- package/dist/editor/page-viewer/previewEditAttempt.js +68 -0
- package/dist/editor/page-viewer/previewEditAttempt.js.map +1 -0
- package/dist/editor/pageModel.d.ts +1 -0
- package/dist/editor/services/agentService.d.ts +67 -0
- package/dist/editor/services/agentService.js +2 -0
- package/dist/editor/services/agentService.js.map +1 -1
- package/dist/editor/services/aiService.d.ts +5 -0
- package/dist/editor/services/aiService.js.map +1 -1
- package/dist/editor/services/contentService.d.ts +9 -0
- package/dist/editor/services/contentService.js.map +1 -1
- package/dist/editor/services/editService.d.ts +13 -0
- package/dist/editor/services/editService.js +8 -0
- package/dist/editor/services/editService.js.map +1 -1
- package/dist/editor/services/migrationService.d.ts +31 -0
- package/dist/editor/services/migrationService.js +22 -0
- package/dist/editor/services/migrationService.js.map +1 -0
- package/dist/editor/services/publicSiteService.d.ts +40 -0
- package/dist/editor/services/publicSiteService.js +5 -0
- package/dist/editor/services/publicSiteService.js.map +1 -0
- package/dist/editor/settings/About.js +71 -32
- package/dist/editor/settings/About.js.map +1 -1
- package/dist/editor/settings/MigrationJournalCard.d.ts +12 -0
- package/dist/editor/settings/MigrationJournalCard.js +114 -0
- package/dist/editor/settings/MigrationJournalCard.js.map +1 -0
- package/dist/editor/settings/QuotaUserPicker.js +1 -1
- package/dist/editor/settings/SettingsView.js +18 -5
- package/dist/editor/settings/SettingsView.js.map +1 -1
- package/dist/editor/settings/panels/ModelConfigPanel.js +2 -0
- package/dist/editor/settings/panels/ModelConfigPanel.js.map +1 -1
- package/dist/editor/settings/panels/PublicSiteEntryDialog.d.ts +8 -0
- package/dist/editor/settings/panels/PublicSiteEntryDialog.js +113 -0
- package/dist/editor/settings/panels/PublicSiteEntryDialog.js.map +1 -0
- package/dist/editor/settings/panels/PublicSitesPanel.d.ts +1 -0
- package/dist/editor/settings/panels/PublicSitesPanel.js +153 -0
- package/dist/editor/settings/panels/PublicSitesPanel.js.map +1 -0
- package/dist/editor/settings/panels/StatusPanel.js +2 -1
- package/dist/editor/settings/panels/StatusPanel.js.map +1 -1
- package/dist/editor/settings/panels/UserPreferencesPanel.js +4 -4
- package/dist/editor/settings/panels/UserPreferencesPanel.js.map +1 -1
- package/dist/editor/settings/panels/index.d.ts +1 -0
- package/dist/editor/settings/panels/index.js +1 -0
- package/dist/editor/settings/panels/index.js.map +1 -1
- package/dist/editor/settings/panels/publicSiteHelpers.d.ts +6 -0
- package/dist/editor/settings/panels/publicSiteHelpers.js +30 -0
- package/dist/editor/settings/panels/publicSiteHelpers.js.map +1 -0
- package/dist/editor/settings/status/coreStatusChecks.js +4 -0
- package/dist/editor/settings/status/coreStatusChecks.js.map +1 -1
- package/dist/editor/sidebar/Sessions.d.ts +3 -1
- package/dist/editor/sidebar/Sessions.js +2 -1
- package/dist/editor/sidebar/Sessions.js.map +1 -1
- package/dist/editor/sidebar/Workbox.js +22 -7
- package/dist/editor/sidebar/Workbox.js.map +1 -1
- package/dist/editor/ui/PerfectTree.js +10 -6
- package/dist/editor/ui/PerfectTree.js.map +1 -1
- package/dist/editor/ui/PublishDialog.d.ts +5 -2
- package/dist/editor/ui/PublishDialog.js +48 -31
- package/dist/editor/ui/PublishDialog.js.map +1 -1
- package/dist/editor/ui/PublishItemDialog.js +31 -20
- package/dist/editor/ui/PublishItemDialog.js.map +1 -1
- package/dist/editor/ui/PublishReadinessSummary.d.ts +12 -0
- package/dist/editor/ui/PublishReadinessSummary.js +34 -0
- package/dist/editor/ui/PublishReadinessSummary.js.map +1 -0
- package/dist/editor/ui/TemplateSelectorDialog.js +27 -1
- package/dist/editor/ui/TemplateSelectorDialog.js.map +1 -1
- package/dist/editor/ui/publishReadiness.d.ts +65 -0
- package/dist/editor/ui/publishReadiness.js +211 -0
- package/dist/editor/ui/publishReadiness.js.map +1 -0
- package/dist/editor/ui/usePublishingItem.d.ts +8 -0
- package/dist/editor/ui/usePublishingItem.js +47 -0
- package/dist/editor/ui/usePublishingItem.js.map +1 -0
- package/dist/editor/views/ItemEditor.js +15 -23
- package/dist/editor/views/ItemEditor.js.map +1 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/viewportClip.d.ts +18 -0
- package/dist/lib/viewportClip.js +22 -0
- package/dist/lib/viewportClip.js.map +1 -0
- package/dist/revision.d.ts +2 -2
- package/dist/revision.js +2 -2
- package/dist/setup/wizard/steps/ImportModelDialog.js +238 -176
- package/dist/setup/wizard/steps/ImportModelDialog.js.map +1 -1
- package/dist/task-board/components/ProjectSettingsDialog.js +4 -1
- package/dist/task-board/components/ProjectSettingsDialog.js.map +1 -1
- package/dist/tour/Tour.d.ts +10 -2
- package/dist/tour/Tour.js +136 -31
- package/dist/tour/Tour.js.map +1 -1
- package/dist/tour/default-tour.js +1 -12
- package/dist/tour/default-tour.js.map +1 -1
- package/dist/tour/sandbox-tour.js +3 -2
- package/dist/tour/sandbox-tour.js.map +1 -1
- package/dist/tour/tour-utils.d.ts +6 -0
- package/dist/tour/tour-utils.js +10 -0
- package/dist/tour/tour-utils.js.map +1 -1
- package/dist/types.d.ts +7 -0
- package/package.json +1 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { AgentChatMessage } from "../../services/agentService";
|
|
2
|
+
import type { MessageGroup } from "../agentMessageGrouping";
|
|
3
|
+
/**
|
|
4
|
+
* Wall-clock timing of one response turn: from the prompt that opened it to
|
|
5
|
+
* the last persisted activity of the closing assistant response.
|
|
6
|
+
*/
|
|
7
|
+
export interface AgentTurnTiming {
|
|
8
|
+
/** Epoch ms of the prompt that opened the turn. */
|
|
9
|
+
startedAt: number;
|
|
10
|
+
/**
|
|
11
|
+
* Epoch ms of the last persisted activity in the turn. Null while the turn
|
|
12
|
+
* is still running, or when only stream-time copies of its messages exist.
|
|
13
|
+
*/
|
|
14
|
+
endedAt: number | null;
|
|
15
|
+
/** True while the run is still working on this turn. */
|
|
16
|
+
isLive: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Timing for the assistant group at `groupIndex`, or null when that group is
|
|
20
|
+
* not the closing response of its turn (another assistant group follows
|
|
21
|
+
* before the next prompt) or no prompt precedes it.
|
|
22
|
+
*/
|
|
23
|
+
export declare function resolveAssistantGroupTurnTiming(groups: readonly MessageGroup[], groupIndex: number, isExecuting: boolean): AgentTurnTiming | null;
|
|
24
|
+
/**
|
|
25
|
+
* Prompt timestamp of the turn that is currently open, i.e. of the last user
|
|
26
|
+
* message in the transcript.
|
|
27
|
+
*/
|
|
28
|
+
export declare function resolveOpenTurnStartedAt(messages: readonly AgentChatMessage[]): number | null;
|
|
29
|
+
/**
|
|
30
|
+
* True when an assistant message already follows the last prompt, i.e. the
|
|
31
|
+
* open turn renders a response group that carries its own live clock.
|
|
32
|
+
*/
|
|
33
|
+
export declare function openTurnHasAssistantResponse(messages: readonly AgentChatMessage[]): boolean;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { parseTimestampMs } from "./agentDurations";
|
|
2
|
+
const later = (a, b) => {
|
|
3
|
+
if (a === null)
|
|
4
|
+
return b;
|
|
5
|
+
if (b === null)
|
|
6
|
+
return a;
|
|
7
|
+
return Math.max(a, b);
|
|
8
|
+
};
|
|
9
|
+
const findTurnStartedAt = (groups, groupIndex) => {
|
|
10
|
+
for (let index = groupIndex - 1; index >= 0; index--) {
|
|
11
|
+
const earlier = groups[index];
|
|
12
|
+
if (earlier?.type === "user") {
|
|
13
|
+
return parseTimestampMs(earlier.messages[0]?.createdDate);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return null;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Rows that came from the server carry a message index; stream-time copies
|
|
20
|
+
* are minted on the client with -1 and keep it even after run settle relabels
|
|
21
|
+
* them as completed, so the index is the reliable persisted-row signal.
|
|
22
|
+
*/
|
|
23
|
+
const isPersistedRow = (message) => message.messageIndex >= 0 && message.messageType !== "streaming";
|
|
24
|
+
const resolveTurnEndedAt = (messages) => {
|
|
25
|
+
let endedAt = null;
|
|
26
|
+
for (const message of messages) {
|
|
27
|
+
// Assistant rows are persisted once their response has completed, so the
|
|
28
|
+
// persisted timestamp marks completion. Stream-time copies only carry the
|
|
29
|
+
// client's creation time and must not be read as an end.
|
|
30
|
+
if (isPersistedRow(message)) {
|
|
31
|
+
endedAt = later(endedAt, parseTimestampMs(message.createdDate));
|
|
32
|
+
}
|
|
33
|
+
for (const toolCall of message.toolCalls ?? []) {
|
|
34
|
+
endedAt = later(endedAt, parseTimestampMs(toolCall.executionCompletedAt));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return endedAt;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Timing for the assistant group at `groupIndex`, or null when that group is
|
|
41
|
+
* not the closing response of its turn (another assistant group follows
|
|
42
|
+
* before the next prompt) or no prompt precedes it.
|
|
43
|
+
*/
|
|
44
|
+
export function resolveAssistantGroupTurnTiming(groups, groupIndex, isExecuting) {
|
|
45
|
+
const group = groups[groupIndex];
|
|
46
|
+
if (!group || group.type !== "assistant-group") {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
let nextPromptFollows = false;
|
|
50
|
+
for (let index = groupIndex + 1; index < groups.length; index++) {
|
|
51
|
+
const laterGroup = groups[index];
|
|
52
|
+
if (!laterGroup)
|
|
53
|
+
continue;
|
|
54
|
+
if (laterGroup.type === "user") {
|
|
55
|
+
nextPromptFollows = true;
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
if (laterGroup.type === "assistant-group") {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
const startedAt = findTurnStartedAt(groups, groupIndex);
|
|
63
|
+
if (startedAt === null) {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
const isLive = isExecuting && !nextPromptFollows;
|
|
67
|
+
return {
|
|
68
|
+
startedAt,
|
|
69
|
+
endedAt: isLive ? null : resolveTurnEndedAt(group.messages),
|
|
70
|
+
isLive,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Prompt timestamp of the turn that is currently open, i.e. of the last user
|
|
75
|
+
* message in the transcript.
|
|
76
|
+
*/
|
|
77
|
+
export function resolveOpenTurnStartedAt(messages) {
|
|
78
|
+
for (let index = messages.length - 1; index >= 0; index--) {
|
|
79
|
+
const message = messages[index];
|
|
80
|
+
if (message?.role === "user") {
|
|
81
|
+
return parseTimestampMs(message.createdDate);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* True when an assistant message already follows the last prompt, i.e. the
|
|
88
|
+
* open turn renders a response group that carries its own live clock.
|
|
89
|
+
*/
|
|
90
|
+
export function openTurnHasAssistantResponse(messages) {
|
|
91
|
+
for (let index = messages.length - 1; index >= 0; index--) {
|
|
92
|
+
const message = messages[index];
|
|
93
|
+
if (!message)
|
|
94
|
+
continue;
|
|
95
|
+
if (message.role === "user")
|
|
96
|
+
return false;
|
|
97
|
+
if (message.role === "assistant" && message.messageType !== "heartbeat") {
|
|
98
|
+
return true;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=agentTurnTiming.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentTurnTiming.js","sourceRoot":"","sources":["../../../../src/editor/ai/terminal/agentTurnTiming.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAkBpD,MAAM,KAAK,GAAG,CAAC,CAAgB,EAAE,CAAgB,EAAiB,EAAE;IAClE,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,CAAC,CAAC;IACzB,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,CAAC,CAAC;IACzB,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC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;QAChC,IAAI,OAAO,EAAE,IAAI,KAAK,MAAM,EAAE,CAAC;YAC7B,OAAO,gBAAgB,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QAC/C,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,4BAA4B,CAC1C,QAAqC;IAErC,KAAK,IAAI,KAAK,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC;QAC1D,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAChC,IAAI,CAAC,OAAO;YAAE,SAAS;QACvB,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM;YAAE,OAAO,KAAK,CAAC;QAC1C,IAAI,OAAO,CAAC,IAAI,KAAK,WAAW,IAAI,OAAO,CAAC,WAAW,KAAK,WAAW,EAAE,CAAC;YACxE,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import type { RequestUsageSnapshot, ConversationUsageSnapshot } from "../../../services/agentService";
|
|
1
2
|
interface AgentCostDisplayProps {
|
|
3
|
+
requestUsage?: RequestUsageSnapshot;
|
|
4
|
+
conversationUsage?: ConversationUsageSnapshot;
|
|
2
5
|
/** Optional className for styling */
|
|
3
6
|
className?: string;
|
|
4
7
|
/** Current response data with token usage */
|
|
@@ -41,5 +44,5 @@ interface AgentCostDisplayProps {
|
|
|
41
44
|
/** Cost limit for the agent (in USD) */
|
|
42
45
|
costLimit?: number | null;
|
|
43
46
|
}
|
|
44
|
-
export declare function AgentCostDisplay({ className, response, totalTokens, costLimit, }: AgentCostDisplayProps): import("react").JSX.Element | null;
|
|
47
|
+
export declare function AgentCostDisplay({ requestUsage, conversationUsage, className, response, totalTokens, costLimit, }: AgentCostDisplayProps): import("react").JSX.Element | null;
|
|
45
48
|
export {};
|
|
@@ -1,30 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useEffect,
|
|
3
|
+
import { useEffect, useState } from "react";
|
|
4
4
|
import { Popover, PopoverContent, PopoverTrigger, } from "../../../../components/ui/popover";
|
|
5
5
|
import { useParheliaSettings } from "../../../hooks/useParheliaSettings";
|
|
6
6
|
import { formatAgentCost, formatSignedAgentCost, reconcileAgentCostTotal, } from "../agentCost";
|
|
7
|
-
export function AgentCostDisplay({ className = "", response, totalTokens, costLimit, }) {
|
|
7
|
+
export function AgentCostDisplay({ requestUsage, conversationUsage, className = "", response, totalTokens, costLimit, }) {
|
|
8
8
|
const [showCostPopover, setShowCostPopover] = useState(false);
|
|
9
|
-
const costPopoverRef = useRef(null);
|
|
10
9
|
const parheliaSettings = useParheliaSettings();
|
|
11
10
|
const currency = parheliaSettings?.currency || "USD";
|
|
12
11
|
const limit = costLimit != null ? Number(costLimit) : null;
|
|
13
|
-
// Handle click outside for cost popover
|
|
14
|
-
useEffect(() => {
|
|
15
|
-
function handleClickOutside(event) {
|
|
16
|
-
if (costPopoverRef.current &&
|
|
17
|
-
!costPopoverRef.current.contains(event.target)) {
|
|
18
|
-
setShowCostPopover(false);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
if (showCostPopover) {
|
|
22
|
-
document.addEventListener("click", handleClickOutside);
|
|
23
|
-
return () => {
|
|
24
|
-
document.removeEventListener("click", handleClickOutside);
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
}, [showCostPopover]);
|
|
28
12
|
// Calculate estimated cost based on typical pricing (rough estimates)
|
|
29
13
|
// Claude 3.5 Sonnet pricing: ~$3/MTok input, ~$15/MTok output
|
|
30
14
|
const calculateEstimatedCost = (inputTokens, outputTokens, cachedTokens, cacheWriteTokens = 0) => {
|
|
@@ -55,9 +39,10 @@ export function AgentCostDisplay({ className = "", response, totalTokens, costLi
|
|
|
55
39
|
: calculateEstimatedCost(response.numInputTokens, response.numOutputTokens, response.numCachedTokens, response.numCacheWriteTokens ?? 0)
|
|
56
40
|
: null;
|
|
57
41
|
const declaredTotalCost = totalTokens?.totalCost ?? currentCost?.totalCost ?? 0;
|
|
58
|
-
const displayTotalCost =
|
|
59
|
-
|
|
60
|
-
|
|
42
|
+
const displayTotalCost = conversationUsage?.totalCost ??
|
|
43
|
+
(totalTokens
|
|
44
|
+
? reconcileAgentCostTotal(declaredTotalCost, totalTokens)
|
|
45
|
+
: declaredTotalCost);
|
|
61
46
|
// Dev-mode invariant: visible rows should sum to the displayed total within rounding tolerance.
|
|
62
47
|
// Warn (don't throw) so a regression like "header 0.63 vs rows 0.12" surfaces in the console
|
|
63
48
|
// before the user notices it in the UI.
|
|
@@ -89,7 +74,12 @@ export function AgentCostDisplay({ className = "", response, totalTokens, costLi
|
|
|
89
74
|
(totalTokens.input > 0 || totalTokens.output > 0 || totalTokens.cached > 0);
|
|
90
75
|
const hasCostData = (response && response.totalCost && response.totalCost > 0) ||
|
|
91
76
|
(totalTokens && totalTokens.totalCost && totalTokens.totalCost > 0);
|
|
92
|
-
if (!hasTokenData &&
|
|
77
|
+
if (!hasTokenData &&
|
|
78
|
+
!hasTotalData &&
|
|
79
|
+
!hasCostData &&
|
|
80
|
+
!requestUsage &&
|
|
81
|
+
!conversationUsage &&
|
|
82
|
+
!(limit && limit > 0)) {
|
|
93
83
|
return null;
|
|
94
84
|
}
|
|
95
85
|
// Calculate percentage of limit used
|
|
@@ -106,7 +96,9 @@ export function AgentCostDisplay({ className = "", response, totalTokens, costLi
|
|
|
106
96
|
return "text-feedback-orange";
|
|
107
97
|
return "text-neutral-grey-50";
|
|
108
98
|
};
|
|
109
|
-
return (_jsx("div", { className: `relative ${className}`,
|
|
99
|
+
return (_jsx("div", { className: `relative ${className}`, "data-testid": "agent-cost-display", children: _jsxs(Popover, { open: showCostPopover, onOpenChange: setShowCostPopover, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs("button", { type: "button", className: `hover:text-neutral-grey-50 cursor-pointer text-right text-[10px] ${getColorClass()}`, "data-testid": "agent-cost-display-trigger", children: ["Total cost:", " ", _jsx("span", { className: "font-medium", children: formatAgentCost(displayTotalCost, currency) }), limit && limit > 0 && ` / ${formatAgentCost(limit, currency)}`] }) }), _jsx(PopoverContent, { className: "max-h-[var(--radix-popover-content-available-height)] w-80 max-w-[calc(100vw-24px)] overflow-y-auto p-4 text-xs tabular-nums", align: "end", side: "bottom", "data-testid": "agent-cost-display-popover", children: _jsxs("div", { className: "space-y-3", children: [requestUsage && (_jsx("section", { className: "border-border-default border-b pb-3", "data-testid": "request-usage", children: _jsxs("div", { className: "flex items-center justify-between gap-4", children: [_jsx("h4", { className: "text-sm font-medium", children: requestUsage.completedAt
|
|
100
|
+
? "Last request"
|
|
101
|
+
: "Current request" }), _jsx("span", { className: "shrink-0 text-sm font-semibold", children: formatAgentCost(requestUsage.usage.totalCost, currency) })] }) })), _jsx("div", { children: _jsxs("h4", { className: "flex items-center justify-between gap-3 text-sm font-medium", children: [_jsx("span", { children: requestUsage || totalTokens ? "Conversation" : "Response" }), _jsxs("span", { className: "shrink-0 text-sm font-semibold", children: [formatAgentCost(conversationUsage?.totalCost ?? displayTotalCost, currency), limit && limit > 0 && (_jsxs("span", { className: "text-neutral-grey-50 ml-1 text-xs", children: ["/ ", formatAgentCost(limit, currency)] }))] })] }) }), limit && limit > 0 && (_jsxs("div", { className: "space-y-2", children: [_jsxs("div", { className: "flex items-center justify-between gap-3 text-xs", children: [_jsx("span", { className: "text-neutral-grey-50", children: "Budget used" }), _jsxs("span", { className: `font-medium ${getColorClass()}`, children: [percentUsed?.toFixed(1), "%"] })] }), _jsx("div", { className: "bg-neutral-grey-10 h-1 w-full overflow-hidden rounded-full", children: _jsx("div", { className: `h-full transition-all ${percentUsed && percentUsed >= 100
|
|
110
102
|
? "bg-feedback-red"
|
|
111
103
|
: percentUsed && percentUsed >= 80
|
|
112
104
|
? "bg-component-shared"
|
|
@@ -114,7 +106,7 @@ export function AgentCostDisplay({ className = "", response, totalTokens, costLi
|
|
|
114
106
|
? "bg-feedback-orange"
|
|
115
107
|
: "bg-highlight-100"}`, style: { width: `${Math.min(percentUsed || 0, 100)}%` } }) }), percentUsed != null && percentUsed >= 90 && (_jsx("p", { className: "text-neutral-grey-50 mt-2 text-xs", children: percentUsed >= 100
|
|
116
108
|
? "Cost limit reached. Execution will stop on next API call."
|
|
117
|
-
: "Approaching cost limit. Consider extending if needed." }))] })), _jsx("div", { className: "space-y-3", children: (hasTotalData || hasTokenData) && (_jsx(_Fragment, { children: _jsx("div", { className: "space-y-2", children: hasTotalData ? (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-neutral-grey-50 text-xs", children: "Input tokens:" }), _jsxs("span", { className: "text-xs", children: [totalTokens.input.toLocaleString(), " (", totalTokens.inputCost.toFixed(2), " ", currency, ")"] })] }), (totalTokens.inputAudio ?? 0) > 0 && (_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-neutral-grey-50 text-xs", children: "Input audio tokens:" }), _jsxs("span", { className: "text-xs", children: [(totalTokens.inputAudio ?? 0).toLocaleString(), " (", (totalTokens.inputAudioCost ?? 0).toFixed(2), " ", currency, ")"] })] })), _jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-neutral-grey-50 text-xs", children: "Output tokens:" }), _jsxs("span", { className: "text-xs", children: [totalTokens.output.toLocaleString(), " (", totalTokens.outputCost.toFixed(2), " ", currency, ")"] })] }), (totalTokens.reasoning ?? 0) > 0 && (_jsxs("div", { className: "flex items-center justify-between pl-3", "data-testid": "reasoning-tokens-row", title: "Reasoning tokens are a subset of output tokens \u2014 already counted in the Output cost above.", children: [_jsx("span", { className: "text-neutral-grey-50 text-xs italic", children: "\u21B3 of which reasoning:" }), _jsx("span", { className: "text-neutral-grey-50 text-xs italic", children: (totalTokens.reasoning ?? 0).toLocaleString() })] })), (totalTokens.outputImage ?? 0) > 0 && (_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-neutral-grey-50 text-xs", children: "Output image tokens:" }), _jsxs("span", { className: "text-xs", children: [(totalTokens.outputImage ?? 0).toLocaleString(), " ", "(", (totalTokens.outputImageCost ?? 0).toFixed(2), " ", currency, ")"] })] })), (totalTokens.outputAudio ?? 0) > 0 && (_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-neutral-grey-50 text-xs", children: "Output audio tokens:" }), _jsxs("span", { className: "text-xs", children: [(totalTokens.outputAudio ?? 0).toLocaleString(), " ", "(", (totalTokens.outputAudioCost ?? 0).toFixed(2), " ", currency, ")"] })] })), totalTokens.cached > 0 && (_jsxs("div", { className: "flex items-center justify-between", "data-testid": "cached-tokens-row", children: [_jsx("span", { className: "text-neutral-grey-50 text-xs", children: "Cached tokens:" }), _jsxs("span", { className: "text-xs", "data-testid": "cached-tokens-value", children: [totalTokens.cached.toLocaleString(), " (", totalTokens.cachedCost.toFixed(2), " ", currency, ")"] })] })), totalTokens.cacheWrite > 0 && (_jsxs("div", { className: "flex items-center justify-between", "data-testid": "cache-write-tokens-row", children: [_jsx("span", { className: "text-neutral-grey-50 text-xs", children: "Cache write tokens:" }), _jsxs("span", { className: "text-xs", "data-testid": "cache-write-tokens-value", children: [totalTokens.cacheWrite.toLocaleString(), " (", (totalTokens.cacheWriteCost ?? 0).toFixed(2), " ", currency, ")"] })] })), totalTokens.imageCost > 0 && (_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-neutral-grey-50 text-xs", children: "Image generation:" }), _jsxs("span", { className: "text-xs", children: [totalTokens.imageCost.toFixed(2), " ", currency] })] })), (totalTokens.markupCost ?? 0) !== 0 && (_jsxs("div", { className: "mt-1 flex items-center justify-between border-t border-dashed pt-2", "data-testid": "provider-adjustment-row", title: "Difference between the provider-billed total and the itemized cost rows.", children: [_jsx("span", { className: "text-neutral-grey-50 text-xs", children: "Provider adjustment:" }), _jsx("span", { className: "text-xs", children: formatSignedAgentCost(totalTokens.markupCost ?? 0, currency) })] }))] })) : (_jsx(_Fragment, { children: response && currentCost && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-neutral-grey-50 text-xs", children: "Input tokens:" }), _jsxs("span", { className: "text-xs", children: [response.numInputTokens.toLocaleString(), "(", currentCost.inputCost.toFixed(2), " ", currency, ")"] })] }), _jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-neutral-grey-50 text-xs", children: "Output tokens:" }), _jsxs("span", { className: "text-xs", children: [response.numOutputTokens.toLocaleString(), "(", currentCost.outputCost.toFixed(2), " ", currency, ")"] })] }), response.numCachedTokens > 0 && (_jsxs("div", { className: "flex items-center justify-between", "data-testid": "cached-tokens-row", children: [_jsx("span", { className: "text-neutral-grey-50 text-xs", children: "Cached tokens:" }), _jsxs("span", { className: "text-xs", "data-testid": "cached-tokens-value", children: [response.numCachedTokens.toLocaleString(), "(", currentCost.cachedCost.toFixed(2), " ", currency, ")"] })] })), response.numCacheWriteTokens &&
|
|
118
|
-
response.numCacheWriteTokens > 0 && (_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-neutral-grey-50 text-xs", children: "Cache write tokens:" }), _jsxs("span", { className: "text-xs", children: [response.numCacheWriteTokens.toLocaleString(), "(", currentCost.cacheWriteCost.toFixed(2), " ", currency, ")"] })] })), _jsx("div", { className: "text-neutral-grey-50 mt-2 text-xs", children: "* Estimated costs based on typical Claude 3.5 pricing" })] })) })) }) })) })] }) })] }) }));
|
|
109
|
+
: "Approaching cost limit. Consider extending if needed." }))] })), _jsx("div", { className: "space-y-3", children: (hasTotalData || hasTokenData) && (_jsx(_Fragment, { children: _jsx("div", { className: "space-y-2", children: hasTotalData ? (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "text-neutral-grey-50 text-xs", children: "Input tokens:" }), _jsxs("span", { className: "text-xs", children: [totalTokens.input.toLocaleString(), " (", totalTokens.inputCost.toFixed(2), " ", currency, ")"] })] }), (totalTokens.inputAudio ?? 0) > 0 && (_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "text-neutral-grey-50 text-xs", children: "Input audio tokens:" }), _jsxs("span", { className: "text-xs", children: [(totalTokens.inputAudio ?? 0).toLocaleString(), " (", (totalTokens.inputAudioCost ?? 0).toFixed(2), " ", currency, ")"] })] })), _jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "text-neutral-grey-50 text-xs", children: "Output tokens:" }), _jsxs("span", { className: "text-xs", children: [totalTokens.output.toLocaleString(), " (", totalTokens.outputCost.toFixed(2), " ", currency, ")"] })] }), (totalTokens.reasoning ?? 0) > 0 && (_jsxs("div", { className: "flex items-center justify-between gap-3 pl-3", "data-testid": "reasoning-tokens-row", title: "Reasoning tokens are a subset of output tokens \u2014 already counted in the Output cost above.", children: [_jsx("span", { className: "text-neutral-grey-50 text-xs italic", children: "\u21B3 of which reasoning:" }), _jsx("span", { className: "text-neutral-grey-50 text-xs italic", children: (totalTokens.reasoning ?? 0).toLocaleString() })] })), (totalTokens.outputImage ?? 0) > 0 && (_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "text-neutral-grey-50 text-xs", children: "Output image tokens:" }), _jsxs("span", { className: "text-xs", children: [(totalTokens.outputImage ?? 0).toLocaleString(), " ", "(", (totalTokens.outputImageCost ?? 0).toFixed(2), " ", currency, ")"] })] })), (totalTokens.outputAudio ?? 0) > 0 && (_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "text-neutral-grey-50 text-xs", children: "Output audio tokens:" }), _jsxs("span", { className: "text-xs", children: [(totalTokens.outputAudio ?? 0).toLocaleString(), " ", "(", (totalTokens.outputAudioCost ?? 0).toFixed(2), " ", currency, ")"] })] })), totalTokens.cached > 0 && (_jsxs("div", { className: "flex items-center justify-between gap-3", "data-testid": "cached-tokens-row", children: [_jsx("span", { className: "text-neutral-grey-50 text-xs", children: "Cached tokens:" }), _jsxs("span", { className: "text-xs", "data-testid": "cached-tokens-value", children: [totalTokens.cached.toLocaleString(), " (", totalTokens.cachedCost.toFixed(2), " ", currency, ")"] })] })), totalTokens.cacheWrite > 0 && (_jsxs("div", { className: "flex items-center justify-between gap-3", "data-testid": "cache-write-tokens-row", children: [_jsx("span", { className: "text-neutral-grey-50 text-xs", children: "Cache write tokens:" }), _jsxs("span", { className: "text-xs", "data-testid": "cache-write-tokens-value", children: [totalTokens.cacheWrite.toLocaleString(), " (", (totalTokens.cacheWriteCost ?? 0).toFixed(2), " ", currency, ")"] })] })), totalTokens.imageCost > 0 && (_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "text-neutral-grey-50 text-xs", children: "Image generation:" }), _jsxs("span", { className: "text-xs", children: [totalTokens.imageCost.toFixed(2), " ", currency] })] })), (totalTokens.markupCost ?? 0) !== 0 && (_jsxs("div", { className: "mt-1 flex items-center justify-between gap-3 border-t border-dashed pt-2", "data-testid": "provider-adjustment-row", title: "Difference between the provider-billed total and the itemized cost rows.", children: [_jsx("span", { className: "text-neutral-grey-50 text-xs", children: "Provider adjustment:" }), _jsx("span", { className: "text-xs", children: formatSignedAgentCost(totalTokens.markupCost ?? 0, currency) })] }))] })) : (_jsx(_Fragment, { children: response && currentCost && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "text-neutral-grey-50 text-xs", children: "Input tokens:" }), _jsxs("span", { className: "text-xs", children: [response.numInputTokens.toLocaleString(), "(", currentCost.inputCost.toFixed(2), " ", currency, ")"] })] }), _jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "text-neutral-grey-50 text-xs", children: "Output tokens:" }), _jsxs("span", { className: "text-xs", children: [response.numOutputTokens.toLocaleString(), "(", currentCost.outputCost.toFixed(2), " ", currency, ")"] })] }), response.numCachedTokens > 0 && (_jsxs("div", { className: "flex items-center justify-between gap-3", "data-testid": "cached-tokens-row", children: [_jsx("span", { className: "text-neutral-grey-50 text-xs", children: "Cached tokens:" }), _jsxs("span", { className: "text-xs", "data-testid": "cached-tokens-value", children: [response.numCachedTokens.toLocaleString(), "(", currentCost.cachedCost.toFixed(2), " ", currency, ")"] })] })), response.numCacheWriteTokens &&
|
|
110
|
+
response.numCacheWriteTokens > 0 && (_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "text-neutral-grey-50 text-xs", children: "Cache write tokens:" }), _jsxs("span", { className: "text-xs", children: [response.numCacheWriteTokens.toLocaleString(), "(", currentCost.cacheWriteCost.toFixed(2), " ", currency, ")"] })] })), _jsx("div", { className: "text-neutral-grey-50 mt-2 text-xs", children: "* Estimated costs based on typical Claude 3.5 pricing" })] })) })) }) })) })] }) })] }) }));
|
|
119
111
|
}
|
|
120
112
|
//# sourceMappingURL=AgentCostDisplay.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentCostDisplay.js","sourceRoot":"","sources":["../../../../../src/editor/ai/terminal/components/AgentCostDisplay.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;
|
|
1
|
+
{"version":3,"file":"AgentCostDisplay.js","sourceRoot":"","sources":["../../../../../src/editor/ai/terminal/components/AgentCostDisplay.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAOb,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EACL,OAAO,EACP,cAAc,EACd,cAAc,GACf,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAEzE,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,cAAc,CAAC;AAgDtB,MAAM,UAAU,gBAAgB,CAAC,EAC/B,YAAY,EACZ,iBAAiB,E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AG,QAAQ,SACxC,IACH,EAEL,QAAQ,CAAC,eAAe,GAAG,CAAC,IAAI,CAC/B,eACE,SAAS,EAAC,yCAAyC,iBACvC,mBAAmB,aAE/B,eAAM,SAAS,EAAC,8BAA8B,+BAEvC,EACP,gBACE,SAAS,EAAC,SAAS,iBACP,qBAAqB,aAEhC,QAAQ,CAAC,eAAe,CAAC,cAAc,EAAE,OACzC,WAAW,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,OAAG,QAAQ,SAExC,IACH,CACP,EAEA,QAAQ,CAAC,mBAAmB;wDAC3B,QAAQ,CAAC,mBAAmB,GAAG,CAAC,IAAI,CAClC,eAAK,SAAS,EAAC,yCAAyC,aACtD,eAAM,SAAS,EAAC,8BAA8B,oCAEvC,EACP,gBAAM,SAAS,EAAC,SAAS,aACtB,QAAQ,CAAC,mBAAmB,CAAC,cAAc,EAAE,OAC5C,WAAW,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,EAC3C,QAAQ,SACJ,IACH,CACP,EAEH,cAAK,SAAS,EAAC,mCAAmC,sEAG5C,IACL,CACJ,GACA,CACJ,GACG,GACL,CACJ,GACG,IACF,GACS,IACT,GACN,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -4,6 +4,10 @@ export interface AgentProfileModelSettingsSectionProps {
|
|
|
4
4
|
profiles: AiProfile[];
|
|
5
5
|
activeProfile?: AiProfile;
|
|
6
6
|
profileOptions: SelectOption[];
|
|
7
|
+
reasoningEffort?: string;
|
|
8
|
+
onReasoningEffortChange?: (value: string) => Promise<void> | void;
|
|
9
|
+
reasoningEffortError?: string | null;
|
|
10
|
+
activeReasoningModel?: import("../../../services/aiService").AiModel;
|
|
7
11
|
selectedModelId?: string;
|
|
8
12
|
modelOptions: SelectOption[];
|
|
9
13
|
readOnly: boolean;
|
|
@@ -13,4 +17,4 @@ export interface AgentProfileModelSettingsSectionProps {
|
|
|
13
17
|
openInNewSlot?: boolean;
|
|
14
18
|
}) => Promise<void> | void;
|
|
15
19
|
}
|
|
16
|
-
export declare function AgentProfileModelSettingsSection({ profiles, activeProfile, profileOptions, selectedModelId, modelOptions, readOnly, onProfileChange, onModelChange, onOpenProfileSettings, }: AgentProfileModelSettingsSectionProps): import("react").JSX.Element;
|
|
20
|
+
export declare function AgentProfileModelSettingsSection({ profiles, activeProfile, profileOptions, reasoningEffort, onReasoningEffortChange, reasoningEffortError, activeReasoningModel, selectedModelId, modelOptions, readOnly, onProfileChange, onModelChange, onOpenProfileSettings, }: AgentProfileModelSettingsSectionProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { getReasoningEffortOptions, getReasoningEffortHint, } from "../reasoningEffortLevels";
|
|
2
3
|
import { ExternalLink } from "lucide-react";
|
|
3
4
|
import { Select } from "../../../../components/ui/select";
|
|
4
|
-
export function AgentProfileModelSettingsSection({ profiles, activeProfile, profileOptions, selectedModelId, modelOptions, readOnly, onProfileChange, onModelChange, onOpenProfileSettings, }) {
|
|
5
|
+
export function AgentProfileModelSettingsSection({ profiles, activeProfile, profileOptions, reasoningEffort = "", onReasoningEffortChange, reasoningEffortError, activeReasoningModel, selectedModelId, modelOptions, readOnly, onProfileChange, onModelChange, onOpenProfileSettings, }) {
|
|
6
|
+
const model = activeProfile?.models?.find((m) => m.id === (selectedModelId || activeProfile.defaultModelId));
|
|
7
|
+
const hint = getReasoningEffortHint(reasoningEffort, model, activeReasoningModel);
|
|
5
8
|
return (_jsxs(_Fragment, { children: [profiles.length > 0 ? (_jsxs("div", { children: [_jsx("div", { className: "text-neutral-grey-100 mb-1 text-[11px] font-medium", children: "Agent profile" }), _jsx(Select, { size: "xs", maxWidth: 300, searchable: profiles.length > 5, searchPlaceholder: "Filter profiles...", className: "text-neutral-grey-50 h-6 w-full rounded border px-1.5 text-[11px]", value: activeProfile?.id || "", options: profileOptions, disabled: readOnly, "data-testid": "agent-profile-selector", onValueChange: (value) => {
|
|
6
9
|
void onProfileChange(value);
|
|
7
10
|
} }), activeProfile ? (_jsx("div", { className: "mt-1 flex flex-wrap items-center gap-2", children: _jsxs("button", { type: "button", className: "text-neutral-grey-50 hover:text-neutral-grey-100 inline-flex items-center gap-1 text-[10px]", title: "Open profile settings. Alt+click to open in a new slot.", onClick: (event) => {
|
|
@@ -10,6 +13,8 @@ export function AgentProfileModelSettingsSection({ profiles, activeProfile, prof
|
|
|
10
13
|
});
|
|
11
14
|
}, children: ["Open profile settings", _jsx(ExternalLink, { className: "h-2.5 w-2.5", strokeWidth: 1 })] }) })) : null] })) : null, activeProfile?.models?.length ? (_jsxs("div", { children: [_jsx("div", { className: "text-neutral-grey-100 mb-1 text-[11px] font-medium", children: "Model" }), _jsx(Select, { "data-testid": "agent-model-selector", size: "xs", maxWidth: 300, searchable: activeProfile.models.length > 5, searchPlaceholder: "Filter models...", className: "text-neutral-grey-50 h-6 w-full rounded border px-1.5 text-[11px]", value: selectedModelId || "", options: modelOptions, disabled: readOnly, onValueChange: (value) => {
|
|
12
15
|
void onModelChange(value);
|
|
13
|
-
} })] })) : null] }))
|
|
16
|
+
} })] })) : null, _jsxs("div", { children: [_jsx("div", { className: "text-neutral-grey-100 mb-1 text-[11px] font-medium", children: "Reasoning effort" }), _jsx(Select, { size: "xs", maxWidth: 300, className: "text-neutral-grey-50 h-6 w-full rounded border px-1.5 text-[11px]", "data-testid": "agent-reasoning-effort-selector", value: reasoningEffort, options: getReasoningEffortOptions(model), disabled: readOnly || !!model?.reasoningEffortLocked, onValueChange: (value) => {
|
|
17
|
+
void onReasoningEffortChange?.(value);
|
|
18
|
+
} }), hint ? (_jsx("div", { className: "text-neutral-grey-50 mt-1 text-[10px]", "data-testid": "agent-reasoning-effort-effective", children: hint })) : null, reasoningEffortError ? (_jsx("div", { role: "alert", className: "mt-1 text-[10px]", children: reasoningEffortError })) : null] })] }));
|
|
14
19
|
}
|
|
15
20
|
//# sourceMappingURL=AgentProfileModelSettingsSection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentProfileModelSettingsSection.js","sourceRoot":"","sources":["../../../../../src/editor/ai/terminal/components/AgentProfileModelSettingsSection.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAE,MAAM,EAAqB,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"AgentProfileModelSettingsSection.js","sourceRoot":"","sources":["../../../../../src/editor/ai/terminal/components/AgentProfileModelSettingsSection.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAE,MAAM,EAAqB,MAAM,kCAAkC,CAAC;AAoB7E,MAAM,UAAU,gCAAgC,CAAC,EAC/C,QAAQ,EACR,aAAa,EACb,cAAc,EACd,eAAe,GAAG,EAAE,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,YAAY,EACZ,QAAQ,EACR,eAAe,EACf,aAAa,EACb,qBAAqB,GACiB;IACtC,MAAM,KAAK,GAAG,aAAa,EAAE,MAAM,EAAE,IAAI,CACvC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,eAAe,IAAI,aAAa,CAAC,cAAc,CAAC,CAClE,CAAC;IACF,MAAM,IAAI,GAAG,sBAAsB,CACjC,eAAe,EACf,KAAK,EACL,oBAAoB,CACrB,CAAC;IACF,OAAO,CACL,8BACG,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CACrB,0BACE,cAAK,SAAS,EAAC,oDAAoD,8BAE7D,EACN,KAAC,MAAM,IACL,IAAI,EAAC,IAAI,EACT,QAAQ,EAAE,GAAG,EACb,UAAU,EAAE,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E,CACP,CAAC,CAAC,CAAC,IAAI,EACR,0BACE,cAAK,SAAS,EAAC,oDAAoD,iCAE7D,EACN,KAAC,MAAM,IACL,IAAI,EAAC,IAAI,EACT,QAAQ,EAAE,GAAG,EACb,SAAS,EAAC,mEAAmE,iBACjE,iCAAiC,EAC7C,KAAK,EAAE,eAAe,EACtB,OAAO,EAAE,yBAAyB,CAAC,KAAK,CAAC,EACzC,QAAQ,EAAE,QAAQ,IAAI,CAAC,CAAC,KAAK,EAAE,qBAAqB,EACpD,aAAa,EAAE,CAAC,KAAK,EAAE,EAAE;4BACvB,KAAK,uBAAuB,EAAE,CAAC,KAAK,CAAC,CAAC;wBACxC,CAAC,GACD,EACD,IAAI,CAAC,CAAC,CAAC,CACN,cACE,SAAS,EAAC,uCAAuC,iBACrC,kCAAkC,YAE7C,IAAI,GACD,CACP,CAAC,CAAC,CAAC,IAAI,EACP,oBAAoB,CAAC,CAAC,CAAC,CACtB,cAAK,IAAI,EAAC,OAAO,EAAC,SAAS,EAAC,kBAAkB,YAC3C,oBAAoB,GACjB,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,IACL,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type SelectOption } from "../../../../components/ui/select";
|
|
2
|
+
export interface AgentProfileRecoveryProps {
|
|
3
|
+
options: SelectOption[];
|
|
4
|
+
readOnly: boolean;
|
|
5
|
+
isExecuting: boolean;
|
|
6
|
+
isChangingProfile: boolean;
|
|
7
|
+
error: string | null;
|
|
8
|
+
onProfileChange: (profileId: string) => void | Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
export declare function AgentProfileRecovery({ options, readOnly, isExecuting, isChangingProfile, error, onProfileChange, }: AgentProfileRecoveryProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Select } from "../../../../components/ui/select";
|
|
3
|
+
export function AgentProfileRecovery({ options, readOnly, isExecuting, isChangingProfile, error, onProfileChange, }) {
|
|
4
|
+
return (_jsxs("div", { className: "border-border-default mx-4 my-3 shrink-0 rounded-xl border bg-white p-4", "data-testid": "agent-profile-recovery", children: [_jsx("p", { className: "text-neutral-grey-100 text-sm font-medium", children: "Agent profile unavailable" }), _jsx("p", { className: "text-neutral-grey-50 mt-1 text-xs", children: readOnly
|
|
5
|
+
? "This chat's profile is no longer available. Someone with edit access can select another profile."
|
|
6
|
+
: isExecuting
|
|
7
|
+
? "This chat's profile is no longer available. You can select another profile when the current run finishes."
|
|
8
|
+
: options.length === 0
|
|
9
|
+
? "This chat's profile is no longer available, and there are no replacement profiles available to you."
|
|
10
|
+
: "This chat's profile is no longer available. Select another profile to continue the conversation." }), !readOnly && options.length > 0 ? (_jsx(Select, { value: "", options: options, placeholder: isChangingProfile ? "Changing profile..." : "Select another profile", disabled: isExecuting || isChangingProfile, searchable: options.length > 5, searchPlaceholder: "Filter profiles...", className: "mt-3 w-full", "data-testid": "agent-replacement-profile-selector", onValueChange: (value) => void onProfileChange(value) })) : null, error ? (_jsx("p", { role: "alert", className: "text-feedback-red mt-2 text-xs", children: error })) : null] }));
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=AgentProfileRecovery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgentProfileRecovery.js","sourceRoot":"","sources":["../../../../../src/editor/ai/terminal/components/AgentProfileRecovery.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAqB,MAAM,kCAAkC,CAAC;AAW7E,MAAM,UAAU,oBAAoB,CAAC,EACnC,OAAO,EACP,QAAQ,EACR,WAAW,EACX,iBAAiB,EACjB,KAAK,EACL,eAAe,GACW;IAC1B,OAAO,CACL,eACE,SAAS,EAAC,yEAAyE,iBACvE,wBAAwB,aAEpC,YAAG,SAAS,EAAC,2CAA2C,0CAEpD,EACJ,YAAG,SAAS,EAAC,mCAAmC,YAC7C,QAAQ;oBACP,CAAC,CAAC,kGAAkG;oBACpG,CAAC,CAAC,WAAW;wBACX,CAAC,CAAC,2GAA2G;wBAC7G,CAAC,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC;4BACpB,CAAC,CAAC,qGAAqG;4BACvG,CAAC,CAAC,kGAAkG,GACxG,EACH,CAAC,QAAQ,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CACjC,KAAC,MAAM,IACL,KAAK,EAAC,EAAE,EACR,OAAO,EAAE,OAAO,EAChB,WAAW,EACT,iBAAiB,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,wBAAwB,EAEtE,QAAQ,EAAE,WAAW,IAAI,iBAAiB,EAC1C,UAAU,EAAE,OAAO,CAAC,MAAM,GAAG,CAAC,EAC9B,iBAAiB,EAAC,oBAAoB,EACtC,SAAS,EAAC,aAAa,iBACX,oCAAoC,EAChD,aAAa,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,eAAe,CAAC,KAAK,CAAC,GACrD,CACH,CAAC,CAAC,CAAC,IAAI,EACP,KAAK,CAAC,CAAC,CAAC,CACP,YAAG,IAAI,EAAC,OAAO,EAAC,SAAS,EAAC,gCAAgC,YACvD,KAAK,GACJ,CACL,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { AgentPromptInputArea, } from "./AgentPromptInputArea";
|
|
|
4
4
|
export function AgentPromptComposer({ className, children, surface = "default", inputSurface, ...inputProps }) {
|
|
5
5
|
const isProjectSurface = surface === "project";
|
|
6
6
|
return (_jsxs("div", { className: cn(isProjectSurface
|
|
7
|
-
? "bg-neutral-grey-5 px-
|
|
7
|
+
? "bg-neutral-grey-5 px-3 pt-3 pb-2"
|
|
8
8
|
: "border-border-default border-t bg-white/95 px-4 pt-3 pb-2", className), children: [_jsx(AgentPromptInputArea, { ...inputProps, inputSurface: isProjectSurface ? "flat" : inputSurface }), children] }));
|
|
9
9
|
}
|
|
10
10
|
//# sourceMappingURL=AgentPromptComposer.js.map
|
|
@@ -10,6 +10,10 @@ export interface AgentSettingsContentProps {
|
|
|
10
10
|
profiles: AiProfile[];
|
|
11
11
|
activeProfile?: AiProfile;
|
|
12
12
|
profileOptions: SelectOption[];
|
|
13
|
+
reasoningEffort?: string;
|
|
14
|
+
onReasoningEffortChange?: (value: string) => Promise<void> | void;
|
|
15
|
+
reasoningEffortError?: string | null;
|
|
16
|
+
activeReasoningModel?: import("../../../services/aiService").AiModel;
|
|
13
17
|
selectedModelId?: string;
|
|
14
18
|
modelOptions: SelectOption[];
|
|
15
19
|
onProfileChange: (profileId: string) => Promise<void> | void;
|
|
@@ -51,4 +55,4 @@ export interface AgentSettingsContentProps {
|
|
|
51
55
|
triggerSubscriptionsLoading: boolean;
|
|
52
56
|
triggerSubscriptionsError: string | null;
|
|
53
57
|
}
|
|
54
|
-
export declare function AgentSettingsContent({ agentId, isLocalOnlyDraftAgent, readOnly, profiles, activeProfile, profileOptions, selectedModelId, modelOptions, onProfileChange, onModelChange, onOpenProfileSettings, showSkillPicker, onShowSkillPickerChange, skillRootIds, selectedSkillIds, selectableTemplateIdSet, manuallyAssignableSkillIdSet, selectedSkills, autoAssignedSkillSet, skillsLoading, skillsError, skillActionError, profileFilteredSkills, onSkillActionErrorChange, onAddSkill, onOpenSkillItem, onRemoveSkill, toolsSectionExpanded, onToolsSectionExpandedChange, tools, toolsLoading, toolsError, allowancesSectionExpanded, onAllowancesSectionExpandedChange, allowancesTotalCount, allowancesLoading, allowancesError, hasAnyAllowances, allowanceGroups, subscribedTriggersSectionExpanded, onSubscribedTriggersSectionExpandedChange, activeTriggerSubscriptions, triggerSubscriptionsLoading, triggerSubscriptionsError, }: AgentSettingsContentProps): import("react").JSX.Element;
|
|
58
|
+
export declare function AgentSettingsContent({ agentId, isLocalOnlyDraftAgent, readOnly, profiles, activeProfile, profileOptions, reasoningEffort, onReasoningEffortChange, reasoningEffortError, activeReasoningModel, selectedModelId, modelOptions, onProfileChange, onModelChange, onOpenProfileSettings, showSkillPicker, onShowSkillPickerChange, skillRootIds, selectedSkillIds, selectableTemplateIdSet, manuallyAssignableSkillIdSet, selectedSkills, autoAssignedSkillSet, skillsLoading, skillsError, skillActionError, profileFilteredSkills, onSkillActionErrorChange, onAddSkill, onOpenSkillItem, onRemoveSkill, toolsSectionExpanded, onToolsSectionExpandedChange, tools, toolsLoading, toolsError, allowancesSectionExpanded, onAllowancesSectionExpandedChange, allowancesTotalCount, allowancesLoading, allowancesError, hasAnyAllowances, allowanceGroups, subscribedTriggersSectionExpanded, onSubscribedTriggersSectionExpandedChange, activeTriggerSubscriptions, triggerSubscriptionsLoading, triggerSubscriptionsError, }: AgentSettingsContentProps): import("react").JSX.Element;
|
|
@@ -3,7 +3,7 @@ import { AgentSharingSection } from "../../AgentSharingSection";
|
|
|
3
3
|
import { AgentProfileModelSettingsSection } from "./AgentProfileModelSettingsSection";
|
|
4
4
|
import { AgentSkillSettingsSection } from "./AgentSkillSettingsSection";
|
|
5
5
|
import { AgentAllowancesSection, AgentAvailableToolsSection, AgentSubscribedTriggersSection, } from "./AgentSettingsSections";
|
|
6
|
-
export function AgentSettingsContent({ agentId, isLocalOnlyDraftAgent, readOnly, profiles, activeProfile, profileOptions, selectedModelId, modelOptions, onProfileChange, onModelChange, onOpenProfileSettings, showSkillPicker, onShowSkillPickerChange, skillRootIds, selectedSkillIds, selectableTemplateIdSet, manuallyAssignableSkillIdSet, selectedSkills, autoAssignedSkillSet, skillsLoading, skillsError, skillActionError, profileFilteredSkills, onSkillActionErrorChange, onAddSkill, onOpenSkillItem, onRemoveSkill, toolsSectionExpanded, onToolsSectionExpandedChange, tools, toolsLoading, toolsError, allowancesSectionExpanded, onAllowancesSectionExpandedChange, allowancesTotalCount, allowancesLoading, allowancesError, hasAnyAllowances, allowanceGroups, subscribedTriggersSectionExpanded, onSubscribedTriggersSectionExpandedChange, activeTriggerSubscriptions, triggerSubscriptionsLoading, triggerSubscriptionsError, }) {
|
|
7
|
-
return (_jsxs(_Fragment, { children: [_jsx(AgentProfileModelSettingsSection, { profiles: profiles, activeProfile: activeProfile, profileOptions: profileOptions, selectedModelId: selectedModelId, modelOptions: modelOptions, readOnly: readOnly, onProfileChange: onProfileChange, onModelChange: onModelChange, onOpenProfileSettings: onOpenProfileSettings }), _jsx(AgentSkillSettingsSection, { showSkillPicker: showSkillPicker, onShowSkillPickerChange: onShowSkillPickerChange, readOnly: readOnly, skillRootIds: skillRootIds, selectedSkillIds: selectedSkillIds, selectableTemplateIdSet: selectableTemplateIdSet, manuallyAssignableSkillIdSet: manuallyAssignableSkillIdSet, selectedSkills: selectedSkills, autoAssignedSkillSet: autoAssignedSkillSet, skillsLoading: skillsLoading, skillsError: skillsError, skillActionError: skillActionError, profileFilteredSkills: profileFilteredSkills, onSkillActionErrorChange: onSkillActionErrorChange, onAddSkill: onAddSkill, onOpenSkillItem: onOpenSkillItem, onRemoveSkill: onRemoveSkill }), _jsx(AgentAvailableToolsSection, { expanded: toolsSectionExpanded, onExpandedChange: onToolsSectionExpandedChange, tools: tools, loading: toolsLoading, error: toolsError, isLocalOnlyDraftAgent: isLocalOnlyDraftAgent }), _jsx(AgentAllowancesSection, { expanded: allowancesSectionExpanded, onExpandedChange: onAllowancesSectionExpandedChange, totalCount: allowancesTotalCount, loading: allowancesLoading, error: allowancesError, hasAnyAllowances: hasAnyAllowances, groups: allowanceGroups, isLocalOnlyDraftAgent: isLocalOnlyDraftAgent }), _jsx(AgentSubscribedTriggersSection, { expanded: subscribedTriggersSectionExpanded, onExpandedChange: onSubscribedTriggersSectionExpandedChange, subscriptions: activeTriggerSubscriptions, loading: triggerSubscriptionsLoading, error: triggerSubscriptionsError, isLocalOnlyDraftAgent: isLocalOnlyDraftAgent }), agentId && !isLocalOnlyDraftAgent ? (_jsx("div", { className: "border-border-default border-t pt-2", children: _jsx(AgentSharingSection, { agentId: agentId, canManage: !readOnly }) })) : null] }));
|
|
6
|
+
export function AgentSettingsContent({ agentId, isLocalOnlyDraftAgent, readOnly, profiles, activeProfile, profileOptions, reasoningEffort = "", onReasoningEffortChange, reasoningEffortError, activeReasoningModel, selectedModelId, modelOptions, onProfileChange, onModelChange, onOpenProfileSettings, showSkillPicker, onShowSkillPickerChange, skillRootIds, selectedSkillIds, selectableTemplateIdSet, manuallyAssignableSkillIdSet, selectedSkills, autoAssignedSkillSet, skillsLoading, skillsError, skillActionError, profileFilteredSkills, onSkillActionErrorChange, onAddSkill, onOpenSkillItem, onRemoveSkill, toolsSectionExpanded, onToolsSectionExpandedChange, tools, toolsLoading, toolsError, allowancesSectionExpanded, onAllowancesSectionExpandedChange, allowancesTotalCount, allowancesLoading, allowancesError, hasAnyAllowances, allowanceGroups, subscribedTriggersSectionExpanded, onSubscribedTriggersSectionExpandedChange, activeTriggerSubscriptions, triggerSubscriptionsLoading, triggerSubscriptionsError, }) {
|
|
7
|
+
return (_jsxs(_Fragment, { children: [_jsx(AgentProfileModelSettingsSection, { profiles: profiles, activeProfile: activeProfile, profileOptions: profileOptions, reasoningEffort: reasoningEffort, onReasoningEffortChange: onReasoningEffortChange, reasoningEffortError: reasoningEffortError, activeReasoningModel: activeReasoningModel, selectedModelId: selectedModelId, modelOptions: modelOptions, readOnly: readOnly, onProfileChange: onProfileChange, onModelChange: onModelChange, onOpenProfileSettings: onOpenProfileSettings }), _jsx(AgentSkillSettingsSection, { showSkillPicker: showSkillPicker, onShowSkillPickerChange: onShowSkillPickerChange, readOnly: readOnly, skillRootIds: skillRootIds, selectedSkillIds: selectedSkillIds, selectableTemplateIdSet: selectableTemplateIdSet, manuallyAssignableSkillIdSet: manuallyAssignableSkillIdSet, selectedSkills: selectedSkills, autoAssignedSkillSet: autoAssignedSkillSet, skillsLoading: skillsLoading, skillsError: skillsError, skillActionError: skillActionError, profileFilteredSkills: profileFilteredSkills, onSkillActionErrorChange: onSkillActionErrorChange, onAddSkill: onAddSkill, onOpenSkillItem: onOpenSkillItem, onRemoveSkill: onRemoveSkill }), _jsx(AgentAvailableToolsSection, { expanded: toolsSectionExpanded, onExpandedChange: onToolsSectionExpandedChange, tools: tools, loading: toolsLoading, error: toolsError, isLocalOnlyDraftAgent: isLocalOnlyDraftAgent }), _jsx(AgentAllowancesSection, { expanded: allowancesSectionExpanded, onExpandedChange: onAllowancesSectionExpandedChange, totalCount: allowancesTotalCount, loading: allowancesLoading, error: allowancesError, hasAnyAllowances: hasAnyAllowances, groups: allowanceGroups, isLocalOnlyDraftAgent: isLocalOnlyDraftAgent }), _jsx(AgentSubscribedTriggersSection, { expanded: subscribedTriggersSectionExpanded, onExpandedChange: onSubscribedTriggersSectionExpandedChange, subscriptions: activeTriggerSubscriptions, loading: triggerSubscriptionsLoading, error: triggerSubscriptionsError, isLocalOnlyDraftAgent: isLocalOnlyDraftAgent }), agentId && !isLocalOnlyDraftAgent ? (_jsx("div", { className: "border-border-default border-t pt-2", children: _jsx(AgentSharingSection, { agentId: agentId, canManage: !readOnly }) })) : null] }));
|
|
8
8
|
}
|
|
9
9
|
//# sourceMappingURL=AgentSettingsContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentSettingsContent.js","sourceRoot":"","sources":["../../../../../src/editor/ai/terminal/components/AgentSettingsContent.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AACtF,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,8BAA8B,GAE/B,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"AgentSettingsContent.js","sourceRoot":"","sources":["../../../../../src/editor/ai/terminal/components/AgentSettingsContent.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO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,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,QAAQ,GAAI,GAC3D,CACP,CAAC,CAAC,CAAC,IAAI,IACP,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -22,5 +22,6 @@ export interface AgentTerminalFullLayoutProps {
|
|
|
22
22
|
dropHandlers?: AgentPromptComposerProps["dropHandlers"];
|
|
23
23
|
/** Keeps the composer out of the DOM until its agent profile is authoritative. */
|
|
24
24
|
showPromptComposer?: boolean;
|
|
25
|
+
profileRecoveryContent?: ReactNode;
|
|
25
26
|
}
|
|
26
|
-
export declare function AgentTerminalFullLayout({ className, parentAgentId, simpleMode, isInitialGreetingMode, onBackToParent, readOnlyAccessNotice, upperContent, inlineDialog, aboveComposer, promptComposerProps, promptControls, attachmentsContent, dropHandlers, showPromptComposer, }: AgentTerminalFullLayoutProps): import("react").JSX.Element;
|
|
27
|
+
export declare function AgentTerminalFullLayout({ className, parentAgentId, simpleMode, isInitialGreetingMode, onBackToParent, readOnlyAccessNotice, upperContent, inlineDialog, aboveComposer, promptComposerProps, promptControls, attachmentsContent, dropHandlers, showPromptComposer, profileRecoveryContent, }: AgentTerminalFullLayoutProps): import("react").JSX.Element;
|
|
@@ -3,7 +3,7 @@ import { useLayoutEffect, useRef, useState } from "react";
|
|
|
3
3
|
import { cn } from "../../../../lib/utils";
|
|
4
4
|
import { AgentParentLink } from "./AgentParentLink";
|
|
5
5
|
import { AgentPromptComposer, } from "./AgentPromptComposer";
|
|
6
|
-
export function AgentTerminalFullLayout({ className, parentAgentId, simpleMode, isInitialGreetingMode, onBackToParent, readOnlyAccessNotice, upperContent, inlineDialog, aboveComposer, promptComposerProps, promptControls, attachmentsContent, dropHandlers, showPromptComposer = true, }) {
|
|
6
|
+
export function AgentTerminalFullLayout({ className, parentAgentId, simpleMode, isInitialGreetingMode, onBackToParent, readOnlyAccessNotice, upperContent, inlineDialog, aboveComposer, promptComposerProps, promptControls, attachmentsContent, dropHandlers, showPromptComposer = true, profileRecoveryContent, }) {
|
|
7
7
|
const previousInitialGreetingModeRef = useRef(isInitialGreetingMode);
|
|
8
8
|
const [isGreetingHeightAnimating, setIsGreetingHeightAnimating] = useState(false);
|
|
9
9
|
useLayoutEffect(() => {
|
|
@@ -19,6 +19,6 @@ export function AgentTerminalFullLayout({ className, parentAgentId, simpleMode,
|
|
|
19
19
|
const keepGreetingStackPosition = isInitialGreetingMode || isGreetingHeightAnimating;
|
|
20
20
|
const content = (_jsxs(_Fragment, { children: [upperContent, inlineDialog] }));
|
|
21
21
|
const promptComposer = (_jsx(AgentPromptComposer, { ...promptComposerProps, reserveBottomControlsSpace: !!promptControls, attachmentsContent: attachmentsContent, dropHandlers: dropHandlers, className: cn("shrink-0", simpleMode ? "pb-10" : undefined, !aboveComposer && keepGreetingStackPosition ? "mt-6" : undefined), surface: aboveComposer ? "project" : "default", children: aboveComposer ? null : promptControls }));
|
|
22
|
-
return (_jsxs("div", { "data-agent-terminal-root": "true", className: cn("mx-auto flex h-full min-h-0 w-full max-w-[750px] min-w-0 flex-col", keepGreetingStackPosition ? "justify-center" : undefined, className), children: [_jsx(AgentParentLink, { parentAgentId: parentAgentId, simpleMode: simpleMode, onBack: onBackToParent }), readOnlyAccessNotice, content, !showPromptComposer ? null : aboveComposer ? (_jsxs(_Fragment, { children: [_jsxs("div", { className: cn("border-border-default mx-3 shrink-0 overflow-hidden rounded-[16px] border bg-white sm:mx-4", keepGreetingStackPosition ? "mt-6" : undefined), children: [aboveComposer, promptComposer] }), _jsx("div", { className: "shrink-0 px-4 pb-2", children: promptControls })] })) : (promptComposer)] }));
|
|
22
|
+
return (_jsxs("div", { "data-agent-terminal-root": "true", className: cn("mx-auto flex h-full min-h-0 w-full max-w-[750px] min-w-0 flex-col", keepGreetingStackPosition ? "justify-center" : undefined, className), children: [_jsx(AgentParentLink, { parentAgentId: parentAgentId, simpleMode: simpleMode, onBack: onBackToParent }), readOnlyAccessNotice, content, !showPromptComposer ? profileRecoveryContent : null, !showPromptComposer ? null : aboveComposer ? (_jsxs(_Fragment, { children: [_jsxs("div", { className: cn("border-border-default mx-3 shrink-0 overflow-hidden rounded-[16px] border bg-white sm:mx-4", keepGreetingStackPosition ? "mt-6" : undefined), children: [aboveComposer, promptComposer] }), _jsx("div", { className: "shrink-0 px-4 pb-2", children: promptControls })] })) : (promptComposer)] }));
|
|
23
23
|
}
|
|
24
24
|
//# sourceMappingURL=AgentTerminalFullLayout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentTerminalFullLayout.js","sourceRoot":"","sources":["../../../../../src/editor/ai/terminal/components/AgentTerminalFullLayout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AAC1E,OAAO,EAAE,EAAE,EAAE,MAAM,uBAAuB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EACL,mBAAmB,GAEpB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"AgentTerminalFullLayout.js","sourceRoot":"","sources":["../../../../../src/editor/ai/terminal/components/AgentTerminalFullLayout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AAC1E,OAAO,EAAE,EAAE,EAAE,MAAM,uBAAuB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EACL,mBAAmB,GAEpB,MAAM,uBAAuB,CAAC;AA2B/B,MAAM,UAAU,uBAAuB,CAAC,EACtC,SAAS,EACT,aAAa,EACb,UAAU,EACV,qBAAqB,EACrB,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,kBAAkB,GAAG,IAAI,EACzB,sBAAsB,GACO;IAC7B,MAAM,8BA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AO,CACL,2CAC2B,MAAM,EAC/B,SAAS,EAAE,EAAE,CACX,mEAAmE,EACnE,yBAAyB,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS,EACxD,SAAS,CACV,aAED,KAAC,eAAe,IACd,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,cAAc,GACtB,EACD,oBAAoB,EACpB,OAAO,EACP,CAAC,kBAAkB,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,IAAI,EACnD,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAC5C,8BACE,eACE,SAAS,EAAE,EAAE,CACX,4FAA4F,EAC5F,yBAAyB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAC/C,aAEA,aAAa,EACb,cAAc,IACX,EACN,cAAK,SAAS,EAAC,oBAAoB,YAAE,cAAc,GAAO,IACzD,CACJ,CAAC,CAAC,CAAC,CACF,cAAc,CACf,IACG,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -2,4 +2,4 @@ import { type AgentFullPromptControlsProps } from "./AgentFullPromptControls";
|
|
|
2
2
|
import { type AgentSettingsContentProps } from "./AgentSettingsContent";
|
|
3
3
|
export interface AgentTerminalFullPromptControlsProps extends Omit<AgentFullPromptControlsProps, "settingsContent">, AgentSettingsContentProps {
|
|
4
4
|
}
|
|
5
|
-
export declare function AgentTerminalFullPromptControls({ agentId, isLocalOnlyDraftAgent, readOnly, profiles, activeProfile, profileOptions, selectedModelId, modelOptions, onProfileChange, onModelChange, onOpenProfileSettings, showSkillPicker, onShowSkillPickerChange, skillRootIds, selectedSkillIds, selectableTemplateIdSet, manuallyAssignableSkillIdSet, selectedSkills, autoAssignedSkillSet, skillsLoading, skillsError, skillActionError, profileFilteredSkills, onSkillActionErrorChange, onAddSkill, onOpenSkillItem, onRemoveSkill, toolsSectionExpanded, onToolsSectionExpandedChange, tools, toolsLoading, toolsError, allowancesSectionExpanded, onAllowancesSectionExpandedChange, allowancesTotalCount, allowancesLoading, allowancesError, hasAnyAllowances, allowanceGroups, subscribedTriggersSectionExpanded, onSubscribedTriggersSectionExpandedChange, activeTriggerSubscriptions, triggerSubscriptionsLoading, triggerSubscriptionsError, ...promptControlsProps }: AgentTerminalFullPromptControlsProps): import("react").JSX.Element;
|
|
5
|
+
export declare function AgentTerminalFullPromptControls({ agentId, isLocalOnlyDraftAgent, readOnly, profiles, activeProfile, profileOptions, reasoningEffort, onReasoningEffortChange, reasoningEffortError, activeReasoningModel, selectedModelId, modelOptions, onProfileChange, onModelChange, onOpenProfileSettings, showSkillPicker, onShowSkillPickerChange, skillRootIds, selectedSkillIds, selectableTemplateIdSet, manuallyAssignableSkillIdSet, selectedSkills, autoAssignedSkillSet, skillsLoading, skillsError, skillActionError, profileFilteredSkills, onSkillActionErrorChange, onAddSkill, onOpenSkillItem, onRemoveSkill, toolsSectionExpanded, onToolsSectionExpandedChange, tools, toolsLoading, toolsError, allowancesSectionExpanded, onAllowancesSectionExpandedChange, allowancesTotalCount, allowancesLoading, allowancesError, hasAnyAllowances, allowanceGroups, subscribedTriggersSectionExpanded, onSubscribedTriggersSectionExpandedChange, activeTriggerSubscriptions, triggerSubscriptionsLoading, triggerSubscriptionsError, ...promptControlsProps }: AgentTerminalFullPromptControlsProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { AgentFullPromptControls, } from "./AgentFullPromptControls";
|
|
3
3
|
import { AgentSettingsContent, } from "./AgentSettingsContent";
|
|
4
|
-
export function AgentTerminalFullPromptControls({ agentId, isLocalOnlyDraftAgent, readOnly, profiles, activeProfile, profileOptions, selectedModelId, modelOptions, onProfileChange, onModelChange, onOpenProfileSettings, showSkillPicker, onShowSkillPickerChange, skillRootIds, selectedSkillIds, selectableTemplateIdSet, manuallyAssignableSkillIdSet, selectedSkills, autoAssignedSkillSet, skillsLoading, skillsError, skillActionError, profileFilteredSkills, onSkillActionErrorChange, onAddSkill, onOpenSkillItem, onRemoveSkill, toolsSectionExpanded, onToolsSectionExpandedChange, tools, toolsLoading, toolsError, allowancesSectionExpanded, onAllowancesSectionExpandedChange, allowancesTotalCount, allowancesLoading, allowancesError, hasAnyAllowances, allowanceGroups, subscribedTriggersSectionExpanded, onSubscribedTriggersSectionExpandedChange, activeTriggerSubscriptions, triggerSubscriptionsLoading, triggerSubscriptionsError, ...promptControlsProps }) {
|
|
5
|
-
return (_jsx(AgentFullPromptControls, { ...promptControlsProps, readOnly: readOnly, settingsContent: _jsx(AgentSettingsContent, { agentId: agentId, isLocalOnlyDraftAgent: isLocalOnlyDraftAgent, readOnly: readOnly, profiles: profiles, activeProfile: activeProfile, profileOptions: profileOptions, selectedModelId: selectedModelId, modelOptions: modelOptions, onProfileChange: onProfileChange, onModelChange: onModelChange, onOpenProfileSettings: onOpenProfileSettings, showSkillPicker: showSkillPicker, onShowSkillPickerChange: onShowSkillPickerChange, skillRootIds: skillRootIds, selectedSkillIds: selectedSkillIds, selectableTemplateIdSet: selectableTemplateIdSet, manuallyAssignableSkillIdSet: manuallyAssignableSkillIdSet, selectedSkills: selectedSkills, autoAssignedSkillSet: autoAssignedSkillSet, skillsLoading: skillsLoading, skillsError: skillsError, skillActionError: skillActionError, profileFilteredSkills: profileFilteredSkills, onSkillActionErrorChange: onSkillActionErrorChange, onAddSkill: onAddSkill, onOpenSkillItem: onOpenSkillItem, onRemoveSkill: onRemoveSkill, toolsSectionExpanded: toolsSectionExpanded, onToolsSectionExpandedChange: onToolsSectionExpandedChange, tools: tools, toolsLoading: toolsLoading, toolsError: toolsError, allowancesSectionExpanded: allowancesSectionExpanded, onAllowancesSectionExpandedChange: onAllowancesSectionExpandedChange, allowancesTotalCount: allowancesTotalCount, allowancesLoading: allowancesLoading, allowancesError: allowancesError, hasAnyAllowances: hasAnyAllowances, allowanceGroups: allowanceGroups, subscribedTriggersSectionExpanded: subscribedTriggersSectionExpanded, onSubscribedTriggersSectionExpandedChange: onSubscribedTriggersSectionExpandedChange, activeTriggerSubscriptions: activeTriggerSubscriptions, triggerSubscriptionsLoading: triggerSubscriptionsLoading, triggerSubscriptionsError: triggerSubscriptionsError }) }));
|
|
4
|
+
export function AgentTerminalFullPromptControls({ agentId, isLocalOnlyDraftAgent, readOnly, profiles, activeProfile, profileOptions, reasoningEffort = "", onReasoningEffortChange, reasoningEffortError, activeReasoningModel, selectedModelId, modelOptions, onProfileChange, onModelChange, onOpenProfileSettings, showSkillPicker, onShowSkillPickerChange, skillRootIds, selectedSkillIds, selectableTemplateIdSet, manuallyAssignableSkillIdSet, selectedSkills, autoAssignedSkillSet, skillsLoading, skillsError, skillActionError, profileFilteredSkills, onSkillActionErrorChange, onAddSkill, onOpenSkillItem, onRemoveSkill, toolsSectionExpanded, onToolsSectionExpandedChange, tools, toolsLoading, toolsError, allowancesSectionExpanded, onAllowancesSectionExpandedChange, allowancesTotalCount, allowancesLoading, allowancesError, hasAnyAllowances, allowanceGroups, subscribedTriggersSectionExpanded, onSubscribedTriggersSectionExpandedChange, activeTriggerSubscriptions, triggerSubscriptionsLoading, triggerSubscriptionsError, ...promptControlsProps }) {
|
|
5
|
+
return (_jsx(AgentFullPromptControls, { ...promptControlsProps, readOnly: readOnly, settingsContent: _jsx(AgentSettingsContent, { agentId: agentId, isLocalOnlyDraftAgent: isLocalOnlyDraftAgent, readOnly: readOnly, profiles: profiles, activeProfile: activeProfile, profileOptions: profileOptions, reasoningEffort: reasoningEffort, onReasoningEffortChange: onReasoningEffortChange, reasoningEffortError: reasoningEffortError, activeReasoningModel: activeReasoningModel, selectedModelId: selectedModelId, modelOptions: modelOptions, onProfileChange: onProfileChange, onModelChange: onModelChange, onOpenProfileSettings: onOpenProfileSettings, showSkillPicker: showSkillPicker, onShowSkillPickerChange: onShowSkillPickerChange, skillRootIds: skillRootIds, selectedSkillIds: selectedSkillIds, selectableTemplateIdSet: selectableTemplateIdSet, manuallyAssignableSkillIdSet: manuallyAssignableSkillIdSet, selectedSkills: selectedSkills, autoAssignedSkillSet: autoAssignedSkillSet, skillsLoading: skillsLoading, skillsError: skillsError, skillActionError: skillActionError, profileFilteredSkills: profileFilteredSkills, onSkillActionErrorChange: onSkillActionErrorChange, onAddSkill: onAddSkill, onOpenSkillItem: onOpenSkillItem, onRemoveSkill: onRemoveSkill, toolsSectionExpanded: toolsSectionExpanded, onToolsSectionExpandedChange: onToolsSectionExpandedChange, tools: tools, toolsLoading: toolsLoading, toolsError: toolsError, allowancesSectionExpanded: allowancesSectionExpanded, onAllowancesSectionExpandedChange: onAllowancesSectionExpandedChange, allowancesTotalCount: allowancesTotalCount, allowancesLoading: allowancesLoading, allowancesError: allowancesError, hasAnyAllowances: hasAnyAllowances, allowanceGroups: allowanceGroups, subscribedTriggersSectionExpanded: subscribedTriggersSectionExpanded, onSubscribedTriggersSectionExpandedChange: onSubscribedTriggersSectionExpandedChange, activeTriggerSubscriptions: activeTriggerSubscriptions, triggerSubscriptionsLoading: triggerSubscriptionsLoading, triggerSubscriptionsError: triggerSubscriptionsError }) }));
|
|
6
6
|
}
|
|
7
7
|
//# sourceMappingURL=AgentTerminalFullPromptControls.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentTerminalFullPromptControls.js","sourceRoot":"","sources":["../../../../../src/editor/ai/terminal/components/AgentTerminalFullPromptControls.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,uBAAuB,GAExB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,oBAAoB,GAErB,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"AgentTerminalFullPromptControls.js","sourceRoot":"","sources":["../../../../../src/editor/ai/terminal/components/AgentTerminalFullPromptControls.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,uBAAuB,GAExB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,oBAAoB,GAEr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