@flanksource/clicky-ui 0.3.16 → 0.3.18
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/ai.cjs +12 -6
- package/dist/ai.cjs.map +1 -1
- package/dist/ai.js +10 -4
- package/dist/ai.js.map +1 -1
- package/dist/chat.cjs +36 -0
- package/dist/chat.cjs.map +1 -1
- package/dist/chat.js +37 -1
- package/dist/chat.js.map +1 -1
- package/dist/components/Combobox.cjs +122 -153
- package/dist/components/Combobox.cjs.map +1 -1
- package/dist/components/Combobox.d.ts.map +1 -1
- package/dist/components/Combobox.js +124 -155
- package/dist/components/Combobox.js.map +1 -1
- package/dist/components/ComboboxControl.cjs +145 -0
- package/dist/components/ComboboxControl.cjs.map +1 -0
- package/dist/components/ComboboxControl.d.ts +37 -0
- package/dist/components/ComboboxControl.d.ts.map +1 -0
- package/dist/components/ComboboxControl.js +145 -0
- package/dist/components/ComboboxControl.js.map +1 -0
- package/dist/components/ComboboxMenu.cjs +31 -14
- package/dist/components/ComboboxMenu.cjs.map +1 -1
- package/dist/components/ComboboxMenu.d.ts.map +1 -1
- package/dist/components/ComboboxMenu.js +31 -14
- package/dist/components/ComboboxMenu.js.map +1 -1
- package/dist/components/ComboboxTags.cjs +40 -0
- package/dist/components/ComboboxTags.cjs.map +1 -0
- package/dist/components/ComboboxTags.d.ts +8 -0
- package/dist/components/ComboboxTags.d.ts.map +1 -0
- package/dist/components/ComboboxTags.js +40 -0
- package/dist/components/ComboboxTags.js.map +1 -0
- package/dist/components/ErrorWrapper.cjs +168 -0
- package/dist/components/ErrorWrapper.cjs.map +1 -0
- package/dist/components/ErrorWrapper.d.ts +19 -0
- package/dist/components/ErrorWrapper.d.ts.map +1 -0
- package/dist/components/ErrorWrapper.js +168 -0
- package/dist/components/ErrorWrapper.js.map +1 -0
- package/dist/components/FilterBar.cjs +64 -2
- package/dist/components/FilterBar.cjs.map +1 -1
- package/dist/components/FilterBar.d.ts +18 -1
- package/dist/components/FilterBar.d.ts.map +1 -1
- package/dist/components/FilterBar.js +64 -2
- package/dist/components/FilterBar.js.map +1 -1
- package/dist/components/JSONPathField.cjs +91 -0
- package/dist/components/JSONPathField.cjs.map +1 -0
- package/dist/components/JSONPathField.d.ts +19 -0
- package/dist/components/JSONPathField.d.ts.map +1 -0
- package/dist/components/JSONPathField.js +91 -0
- package/dist/components/JSONPathField.js.map +1 -0
- package/dist/components/JsonSchemaForm.cjs +8 -4
- package/dist/components/JsonSchemaForm.cjs.map +1 -1
- package/dist/components/JsonSchemaForm.d.ts.map +1 -1
- package/dist/components/JsonSchemaForm.js +8 -4
- package/dist/components/JsonSchemaForm.js.map +1 -1
- package/dist/components/TreePickerField.cjs +22 -4
- package/dist/components/TreePickerField.cjs.map +1 -1
- package/dist/components/TreePickerField.d.ts +22 -2
- package/dist/components/TreePickerField.d.ts.map +1 -1
- package/dist/components/TreePickerField.js +22 -4
- package/dist/components/TreePickerField.js.map +1 -1
- package/dist/components/TriStateToggle.cjs +53 -0
- package/dist/components/TriStateToggle.cjs.map +1 -0
- package/dist/components/TriStateToggle.d.ts +27 -0
- package/dist/components/TriStateToggle.d.ts.map +1 -0
- package/dist/components/TriStateToggle.js +53 -0
- package/dist/components/TriStateToggle.js.map +1 -0
- package/dist/components/combobox-types.d.ts +16 -1
- package/dist/components/combobox-types.d.ts.map +1 -1
- package/dist/components/combobox-utils.cjs +26 -0
- package/dist/components/combobox-utils.cjs.map +1 -1
- package/dist/components/combobox-utils.d.ts +10 -0
- package/dist/components/combobox-utils.d.ts.map +1 -1
- package/dist/components/combobox-utils.js +26 -0
- package/dist/components/combobox-utils.js.map +1 -1
- package/dist/components/filter-bar-utils.cjs +5 -0
- package/dist/components/filter-bar-utils.cjs.map +1 -1
- package/dist/components/filter-bar-utils.d.ts.map +1 -1
- package/dist/components/filter-bar-utils.js +5 -0
- package/dist/components/filter-bar-utils.js.map +1 -1
- package/dist/components/json-schema-form-accordion-array.cjs +290 -0
- package/dist/components/json-schema-form-accordion-array.cjs.map +1 -0
- package/dist/components/json-schema-form-accordion-array.d.ts +7 -0
- package/dist/components/json-schema-form-accordion-array.d.ts.map +1 -0
- package/dist/components/json-schema-form-accordion-array.js +290 -0
- package/dist/components/json-schema-form-accordion-array.js.map +1 -0
- package/dist/components/json-schema-form-array.cjs +99 -110
- package/dist/components/json-schema-form-array.cjs.map +1 -1
- package/dist/components/json-schema-form-array.d.ts +1 -1
- package/dist/components/json-schema-form-array.d.ts.map +1 -1
- package/dist/components/json-schema-form-array.js +98 -109
- package/dist/components/json-schema-form-array.js.map +1 -1
- package/dist/components/json-schema-form-error-display.cjs +4 -2
- package/dist/components/json-schema-form-error-display.cjs.map +1 -1
- package/dist/components/json-schema-form-error-display.d.ts +4 -2
- package/dist/components/json-schema-form-error-display.d.ts.map +1 -1
- package/dist/components/json-schema-form-error-display.js +4 -2
- package/dist/components/json-schema-form-error-display.js.map +1 -1
- package/dist/components/json-schema-form-extensions.cjs +10 -0
- package/dist/components/json-schema-form-extensions.cjs.map +1 -0
- package/dist/components/json-schema-form-extensions.d.ts +8 -0
- package/dist/components/json-schema-form-extensions.d.ts.map +1 -0
- package/dist/components/json-schema-form-extensions.js +10 -0
- package/dist/components/json-schema-form-extensions.js.map +1 -0
- package/dist/components/json-schema-form-fields.cjs +25 -101
- package/dist/components/json-schema-form-fields.cjs.map +1 -1
- package/dist/components/json-schema-form-fields.d.ts +1 -32
- package/dist/components/json-schema-form-fields.d.ts.map +1 -1
- package/dist/components/json-schema-form-fields.js +28 -104
- package/dist/components/json-schema-form-fields.js.map +1 -1
- package/dist/components/json-schema-form-item-summary.cjs +131 -0
- package/dist/components/json-schema-form-item-summary.cjs.map +1 -0
- package/dist/components/json-schema-form-item-summary.d.ts +13 -0
- package/dist/components/json-schema-form-item-summary.d.ts.map +1 -0
- package/dist/components/json-schema-form-item-summary.js +131 -0
- package/dist/components/json-schema-form-item-summary.js.map +1 -0
- package/dist/components/json-schema-form-layout.cjs +156 -0
- package/dist/components/json-schema-form-layout.cjs.map +1 -0
- package/dist/components/json-schema-form-layout.d.ts +43 -0
- package/dist/components/json-schema-form-layout.d.ts.map +1 -0
- package/dist/components/json-schema-form-layout.js +156 -0
- package/dist/components/json-schema-form-layout.js.map +1 -0
- package/dist/components/json-schema-form-lookup-tree.cjs +149 -0
- package/dist/components/json-schema-form-lookup-tree.cjs.map +1 -0
- package/dist/components/json-schema-form-lookup-tree.d.ts +22 -0
- package/dist/components/json-schema-form-lookup-tree.d.ts.map +1 -0
- package/dist/components/json-schema-form-lookup-tree.js +149 -0
- package/dist/components/json-schema-form-lookup-tree.js.map +1 -0
- package/dist/components/json-schema-form-object.cjs +11 -4
- package/dist/components/json-schema-form-object.cjs.map +1 -1
- package/dist/components/json-schema-form-object.d.ts.map +1 -1
- package/dist/components/json-schema-form-object.js +11 -4
- package/dist/components/json-schema-form-object.js.map +1 -1
- package/dist/components/json-schema-form-render.cjs +51 -28
- package/dist/components/json-schema-form-render.cjs.map +1 -1
- package/dist/components/json-schema-form-render.d.ts.map +1 -1
- package/dist/components/json-schema-form-render.js +51 -28
- package/dist/components/json-schema-form-render.js.map +1 -1
- package/dist/components/json-schema-form-resolve.cjs +62 -13
- package/dist/components/json-schema-form-resolve.cjs.map +1 -1
- package/dist/components/json-schema-form-resolve.d.ts +1 -0
- package/dist/components/json-schema-form-resolve.d.ts.map +1 -1
- package/dist/components/json-schema-form-resolve.js +62 -13
- package/dist/components/json-schema-form-resolve.js.map +1 -1
- package/dist/components/json-schema-form-table-array.cjs +123 -0
- package/dist/components/json-schema-form-table-array.cjs.map +1 -0
- package/dist/components/json-schema-form-table-array.d.ts +7 -0
- package/dist/components/json-schema-form-table-array.d.ts.map +1 -0
- package/dist/components/json-schema-form-table-array.js +123 -0
- package/dist/components/json-schema-form-table-array.js.map +1 -0
- package/dist/components/json-schema-form-tone.cjs +34 -0
- package/dist/components/json-schema-form-tone.cjs.map +1 -0
- package/dist/components/json-schema-form-tone.d.ts +8 -0
- package/dist/components/json-schema-form-tone.d.ts.map +1 -0
- package/dist/components/json-schema-form-tone.js +34 -0
- package/dist/components/json-schema-form-tone.js.map +1 -0
- package/dist/components/json-schema-form-types.d.ts +79 -10
- package/dist/components/json-schema-form-types.d.ts.map +1 -1
- package/dist/components/json-schema-form-utils.cjs +47 -4
- package/dist/components/json-schema-form-utils.cjs.map +1 -1
- package/dist/components/json-schema-form-utils.d.ts +19 -4
- package/dist/components/json-schema-form-utils.d.ts.map +1 -1
- package/dist/components/json-schema-form-utils.js +47 -4
- package/dist/components/json-schema-form-utils.js.map +1 -1
- package/dist/components/tri-state.cjs +8 -0
- package/dist/components/tri-state.cjs.map +1 -0
- package/dist/components/tri-state.d.ts +5 -0
- package/dist/components/tri-state.d.ts.map +1 -0
- package/dist/components/tri-state.js +8 -0
- package/dist/components/tri-state.js.map +1 -0
- package/dist/components/useComboboxLayout.cjs +59 -0
- package/dist/components/useComboboxLayout.cjs.map +1 -0
- package/dist/components/useComboboxLayout.d.ts +5 -0
- package/dist/components/useComboboxLayout.d.ts.map +1 -0
- package/dist/components/useComboboxLayout.js +59 -0
- package/dist/components/useComboboxLayout.js.map +1 -0
- package/dist/components.cjs +21 -0
- package/dist/components.cjs.map +1 -1
- package/dist/components.d.ts +14 -4
- package/dist/components.d.ts.map +1 -1
- package/dist/components.js +22 -1
- package/dist/components.js.map +1 -1
- package/dist/data/Clicky.cjs +51 -2
- package/dist/data/Clicky.cjs.map +1 -1
- package/dist/data/Clicky.d.ts +10 -1
- package/dist/data/Clicky.d.ts.map +1 -1
- package/dist/data/Clicky.js +51 -2
- package/dist/data/Clicky.js.map +1 -1
- package/dist/data/DataTable.cjs +215 -63
- package/dist/data/DataTable.cjs.map +1 -1
- package/dist/data/DataTable.d.ts +65 -3
- package/dist/data/DataTable.d.ts.map +1 -1
- package/dist/data/DataTable.js +215 -63
- package/dist/data/DataTable.js.map +1 -1
- package/dist/data/LogsTable.cjs +10 -1
- package/dist/data/LogsTable.cjs.map +1 -1
- package/dist/data/LogsTable.d.ts +3 -1
- package/dist/data/LogsTable.d.ts.map +1 -1
- package/dist/data/LogsTable.js +10 -1
- package/dist/data/LogsTable.js.map +1 -1
- package/dist/data/ServerTimingBadge.cjs +64 -0
- package/dist/data/ServerTimingBadge.cjs.map +1 -0
- package/dist/data/ServerTimingBadge.d.ts +9 -0
- package/dist/data/ServerTimingBadge.d.ts.map +1 -0
- package/dist/data/ServerTimingBadge.js +64 -0
- package/dist/data/ServerTimingBadge.js.map +1 -0
- package/dist/data/TaskManager.cjs +99 -14
- package/dist/data/TaskManager.cjs.map +1 -1
- package/dist/data/TaskManager.d.ts.map +1 -1
- package/dist/data/TaskManager.js +100 -15
- package/dist/data/TaskManager.js.map +1 -1
- package/dist/data/TaskProgress.cjs +50 -11
- package/dist/data/TaskProgress.cjs.map +1 -1
- package/dist/data/TaskProgress.d.ts +2 -1
- package/dist/data/TaskProgress.d.ts.map +1 -1
- package/dist/data/TaskProgress.js +50 -11
- package/dist/data/TaskProgress.js.map +1 -1
- package/dist/data/ai/AdvancedChatConfig.cjs +289 -0
- package/dist/data/ai/AdvancedChatConfig.cjs.map +1 -0
- package/dist/data/ai/AdvancedChatConfig.d.ts +21 -0
- package/dist/data/ai/AdvancedChatConfig.d.ts.map +1 -0
- package/dist/data/ai/AdvancedChatConfig.js +289 -0
- package/dist/data/ai/AdvancedChatConfig.js.map +1 -0
- package/dist/data/ai/AdvancedCostsPanel.cjs +120 -0
- package/dist/data/ai/AdvancedCostsPanel.cjs.map +1 -0
- package/dist/data/ai/AdvancedCostsPanel.d.ts +16 -0
- package/dist/data/ai/AdvancedCostsPanel.d.ts.map +1 -0
- package/dist/data/ai/AdvancedCostsPanel.js +120 -0
- package/dist/data/ai/AdvancedCostsPanel.js.map +1 -0
- package/dist/data/ai/ChatWindow.catalogs.cjs +74 -0
- package/dist/data/ai/ChatWindow.catalogs.cjs.map +1 -0
- package/dist/data/ai/ChatWindow.catalogs.d.ts +16 -0
- package/dist/data/ai/ChatWindow.catalogs.d.ts.map +1 -0
- package/dist/data/ai/ChatWindow.catalogs.js +74 -0
- package/dist/data/ai/ChatWindow.catalogs.js.map +1 -0
- package/dist/data/ai/ChatWindow.cjs +86 -100
- package/dist/data/ai/ChatWindow.cjs.map +1 -1
- package/dist/data/ai/ChatWindow.d.ts +1 -1
- package/dist/data/ai/ChatWindow.d.ts.map +1 -1
- package/dist/data/ai/ChatWindow.js +88 -102
- package/dist/data/ai/ChatWindow.js.map +1 -1
- package/dist/data/ai/ChatWindow.preferences.cjs.map +1 -1
- package/dist/data/ai/ChatWindow.preferences.d.ts +2 -4
- package/dist/data/ai/ChatWindow.preferences.d.ts.map +1 -1
- package/dist/data/ai/ChatWindow.preferences.js.map +1 -1
- package/dist/data/ai/ChatWindow.runtime.cjs +120 -0
- package/dist/data/ai/ChatWindow.runtime.cjs.map +1 -0
- package/dist/data/ai/ChatWindow.runtime.d.ts +20 -0
- package/dist/data/ai/ChatWindow.runtime.d.ts.map +1 -0
- package/dist/data/ai/ChatWindow.runtime.js +120 -0
- package/dist/data/ai/ChatWindow.runtime.js.map +1 -0
- package/dist/data/ai/ChatWindow.thread-status.cjs +14 -0
- package/dist/data/ai/ChatWindow.thread-status.cjs.map +1 -0
- package/dist/data/ai/ChatWindow.thread-status.d.ts +5 -0
- package/dist/data/ai/ChatWindow.thread-status.d.ts.map +1 -0
- package/dist/data/ai/ChatWindow.thread-status.js +14 -0
- package/dist/data/ai/ChatWindow.thread-status.js.map +1 -0
- package/dist/data/ai/ChatWindow.thread.cjs +68 -0
- package/dist/data/ai/ChatWindow.thread.cjs.map +1 -0
- package/dist/data/ai/ChatWindow.thread.d.ts +16 -0
- package/dist/data/ai/ChatWindow.thread.d.ts.map +1 -0
- package/dist/data/ai/ChatWindow.thread.js +68 -0
- package/dist/data/ai/ChatWindow.thread.js.map +1 -0
- package/dist/data/ai/ChatWindow.tool-catalog.cjs +20 -0
- package/dist/data/ai/ChatWindow.tool-catalog.cjs.map +1 -1
- package/dist/data/ai/ChatWindow.tool-catalog.d.ts +17 -1
- package/dist/data/ai/ChatWindow.tool-catalog.d.ts.map +1 -1
- package/dist/data/ai/ChatWindow.tool-catalog.js +20 -0
- package/dist/data/ai/ChatWindow.tool-catalog.js.map +1 -1
- package/dist/data/ai/ChatWindow.types.d.ts +13 -5
- package/dist/data/ai/ChatWindow.types.d.ts.map +1 -1
- package/dist/data/ai/ChatWindowManager.cjs +3 -1
- package/dist/data/ai/ChatWindowManager.cjs.map +1 -1
- package/dist/data/ai/ChatWindowManager.d.ts.map +1 -1
- package/dist/data/ai/ChatWindowManager.js +3 -1
- package/dist/data/ai/ChatWindowManager.js.map +1 -1
- package/dist/data/ai/PromptPicker/PromptPicker.cjs +1 -1
- package/dist/data/ai/PromptPicker/PromptPicker.cjs.map +1 -1
- package/dist/data/ai/PromptPicker/PromptPicker.d.ts +1 -1
- package/dist/data/ai/PromptPicker/PromptPicker.d.ts.map +1 -1
- package/dist/data/ai/PromptPicker/PromptPicker.js +1 -1
- package/dist/data/ai/PromptPicker/PromptPicker.js.map +1 -1
- package/dist/data/ai/PromptRunEditor/index.cjs +101 -89
- package/dist/data/ai/PromptRunEditor/index.cjs.map +1 -1
- package/dist/data/ai/PromptRunEditor/index.d.ts +6 -10
- package/dist/data/ai/PromptRunEditor/index.d.ts.map +1 -1
- package/dist/data/ai/PromptRunEditor/index.js +103 -91
- package/dist/data/ai/PromptRunEditor/index.js.map +1 -1
- package/dist/data/ai/PromptRunEditor/model.cjs +47 -0
- package/dist/data/ai/PromptRunEditor/model.cjs.map +1 -0
- package/dist/data/ai/PromptRunEditor/model.d.ts +17 -0
- package/dist/data/ai/PromptRunEditor/model.d.ts.map +1 -0
- package/dist/data/ai/PromptRunEditor/model.js +47 -0
- package/dist/data/ai/PromptRunEditor/model.js.map +1 -0
- package/dist/data/ai/RuntimeModePicker.cjs +1 -1
- package/dist/data/ai/RuntimeModePicker.cjs.map +1 -1
- package/dist/data/ai/RuntimeModePicker.d.ts +1 -1
- package/dist/data/ai/RuntimeModePicker.d.ts.map +1 -1
- package/dist/data/ai/RuntimeModePicker.js +1 -1
- package/dist/data/ai/RuntimeModePicker.js.map +1 -1
- package/dist/data/ai/SessionInspector.files.cjs +26 -43
- package/dist/data/ai/SessionInspector.files.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.files.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.files.js +26 -43
- package/dist/data/ai/SessionInspector.files.js.map +1 -1
- package/dist/data/ai/SessionInspector.hierarchy.cjs +1 -1
- package/dist/data/ai/SessionInspector.hierarchy.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.hierarchy.js +1 -1
- package/dist/data/ai/SessionInspector.hierarchy.js.map +1 -1
- package/dist/data/ai/SessionInspector.model.cjs +1 -1
- package/dist/data/ai/SessionInspector.model.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.model.js +1 -1
- package/dist/data/ai/SessionInspector.model.js.map +1 -1
- package/dist/data/ai/SessionViewer.header.cjs +17 -9
- package/dist/data/ai/SessionViewer.header.cjs.map +1 -1
- package/dist/data/ai/SessionViewer.header.d.ts.map +1 -1
- package/dist/data/ai/SessionViewer.header.js +17 -9
- package/dist/data/ai/SessionViewer.header.js.map +1 -1
- package/dist/data/ai/SessionViewer.model.cjs +2 -0
- package/dist/data/ai/SessionViewer.model.cjs.map +1 -1
- package/dist/data/ai/SessionViewer.model.d.ts +4 -0
- package/dist/data/ai/SessionViewer.model.d.ts.map +1 -1
- package/dist/data/ai/SessionViewer.model.js +2 -0
- package/dist/data/ai/SessionViewer.model.js.map +1 -1
- package/dist/data/ai/SessionViewer.rows.cjs +4 -16
- package/dist/data/ai/SessionViewer.rows.cjs.map +1 -1
- package/dist/data/ai/SessionViewer.rows.d.ts.map +1 -1
- package/dist/data/ai/SessionViewer.rows.js +4 -16
- package/dist/data/ai/SessionViewer.rows.js.map +1 -1
- package/dist/data/ai/SessionViewer.unified.d.ts +1 -0
- package/dist/data/ai/SessionViewer.unified.d.ts.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/ModelSection.cjs +12 -3
- package/dist/data/ai/SpecRuntimeEditor/ModelSection.cjs.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/ModelSection.d.ts +1 -1
- package/dist/data/ai/SpecRuntimeEditor/ModelSection.d.ts.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/ModelSection.js +12 -3
- package/dist/data/ai/SpecRuntimeEditor/ModelSection.js.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/VerifySection.cjs.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/VerifySection.d.ts +1 -1
- package/dist/data/ai/SpecRuntimeEditor/VerifySection.d.ts.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/VerifySection.js.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/index.cjs.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/index.d.ts +2 -2
- package/dist/data/ai/SpecRuntimeEditor/index.d.ts.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/index.js.map +1 -1
- package/dist/data/ai/ThreadPicker.cjs +65 -3
- package/dist/data/ai/ThreadPicker.cjs.map +1 -1
- package/dist/data/ai/ThreadPicker.d.ts +13 -5
- package/dist/data/ai/ThreadPicker.d.ts.map +1 -1
- package/dist/data/ai/ThreadPicker.js +65 -3
- package/dist/data/ai/ThreadPicker.js.map +1 -1
- package/dist/data/ai/ToolPreferences.cjs +65 -685
- package/dist/data/ai/ToolPreferences.cjs.map +1 -1
- package/dist/data/ai/ToolPreferences.d.ts +15 -17
- package/dist/data/ai/ToolPreferences.d.ts.map +1 -1
- package/dist/data/ai/ToolPreferences.js +64 -683
- package/dist/data/ai/ToolPreferences.js.map +1 -1
- package/dist/data/ai/ToolPreferences.model.cjs +148 -0
- package/dist/data/ai/ToolPreferences.model.cjs.map +1 -0
- package/dist/data/ai/ToolPreferences.model.d.ts +31 -0
- package/dist/data/ai/ToolPreferences.model.d.ts.map +1 -0
- package/dist/data/ai/ToolPreferences.model.js +148 -0
- package/dist/data/ai/ToolPreferences.model.js.map +1 -0
- package/dist/data/ai/ToolPreferencesList.cjs +270 -0
- package/dist/data/ai/ToolPreferencesList.cjs.map +1 -0
- package/dist/data/ai/ToolPreferencesList.d.ts +18 -0
- package/dist/data/ai/ToolPreferencesList.d.ts.map +1 -0
- package/dist/data/ai/ToolPreferencesList.js +270 -0
- package/dist/data/ai/ToolPreferencesList.js.map +1 -0
- package/dist/data/ai/agent-action-icons.cjs.map +1 -1
- package/dist/data/ai/agent-action-icons.js.map +1 -1
- package/dist/data/ai/chat-window-context.cjs +4 -1
- package/dist/data/ai/chat-window-context.cjs.map +1 -1
- package/dist/data/ai/chat-window-context.d.ts +7 -0
- package/dist/data/ai/chat-window-context.d.ts.map +1 -1
- package/dist/data/ai/chat-window-context.js +4 -1
- package/dist/data/ai/chat-window-context.js.map +1 -1
- package/dist/data/ai/index.d.ts +7 -3
- package/dist/data/ai/index.d.ts.map +1 -1
- package/dist/data/ai/session-tones.cjs +67 -0
- package/dist/data/ai/session-tones.cjs.map +1 -0
- package/dist/data/ai/session-tones.d.ts +34 -0
- package/dist/data/ai/session-tones.d.ts.map +1 -0
- package/dist/data/ai/session-tones.js +67 -0
- package/dist/data/ai/session-tones.js.map +1 -0
- package/dist/data/ai/thread-costs.cjs +39 -0
- package/dist/data/ai/thread-costs.cjs.map +1 -0
- package/dist/data/ai/thread-costs.d.ts +62 -0
- package/dist/data/ai/thread-costs.d.ts.map +1 -0
- package/dist/data/ai/thread-costs.js +39 -0
- package/dist/data/ai/thread-costs.js.map +1 -0
- package/dist/data/cells/CellFilterActions.cjs +68 -0
- package/dist/data/cells/CellFilterActions.cjs.map +1 -0
- package/dist/data/cells/CellFilterActions.d.ts +15 -0
- package/dist/data/cells/CellFilterActions.d.ts.map +1 -0
- package/dist/data/cells/CellFilterActions.js +68 -0
- package/dist/data/cells/CellFilterActions.js.map +1 -0
- package/dist/data/chat/Chat.cjs +192 -80
- package/dist/data/chat/Chat.cjs.map +1 -1
- package/dist/data/chat/Chat.d.ts +24 -4
- package/dist/data/chat/Chat.d.ts.map +1 -1
- package/dist/data/chat/Chat.fixtures.cjs +48 -3
- package/dist/data/chat/Chat.fixtures.cjs.map +1 -1
- package/dist/data/chat/Chat.fixtures.d.ts +1 -1
- package/dist/data/chat/Chat.fixtures.d.ts.map +1 -1
- package/dist/data/chat/Chat.fixtures.js +48 -3
- package/dist/data/chat/Chat.fixtures.js.map +1 -1
- package/dist/data/chat/Chat.js +195 -83
- package/dist/data/chat/Chat.js.map +1 -1
- package/dist/data/chat/Chat.runtime.cjs +63 -0
- package/dist/data/chat/Chat.runtime.cjs.map +1 -0
- package/dist/data/chat/Chat.runtime.d.ts +16 -0
- package/dist/data/chat/Chat.runtime.d.ts.map +1 -0
- package/dist/data/chat/Chat.runtime.js +63 -0
- package/dist/data/chat/Chat.runtime.js.map +1 -0
- package/dist/data/chat/ChatRuntimeToolbar.cjs +62 -0
- package/dist/data/chat/ChatRuntimeToolbar.cjs.map +1 -0
- package/dist/data/chat/ChatRuntimeToolbar.d.ts +14 -0
- package/dist/data/chat/ChatRuntimeToolbar.d.ts.map +1 -0
- package/dist/data/chat/ChatRuntimeToolbar.js +62 -0
- package/dist/data/chat/ChatRuntimeToolbar.js.map +1 -0
- package/dist/data/chat/ContextMeter.cjs +144 -73
- package/dist/data/chat/ContextMeter.cjs.map +1 -1
- package/dist/data/chat/ContextMeter.d.ts +8 -3
- package/dist/data/chat/ContextMeter.d.ts.map +1 -1
- package/dist/data/chat/ContextMeter.js +144 -73
- package/dist/data/chat/ContextMeter.js.map +1 -1
- package/dist/data/chat/ToolCall.cjs +86 -24
- package/dist/data/chat/ToolCall.cjs.map +1 -1
- package/dist/data/chat/ToolCall.d.ts +12 -5
- package/dist/data/chat/ToolCall.d.ts.map +1 -1
- package/dist/data/chat/ToolCall.js +86 -24
- package/dist/data/chat/ToolCall.js.map +1 -1
- package/dist/data/chat/approval.cjs +64 -0
- package/dist/data/chat/approval.cjs.map +1 -0
- package/dist/data/chat/approval.d.ts +18 -0
- package/dist/data/chat/approval.d.ts.map +1 -0
- package/dist/data/chat/approval.js +64 -0
- package/dist/data/chat/approval.js.map +1 -0
- package/dist/data/chat/index.d.ts +5 -3
- package/dist/data/chat/index.d.ts.map +1 -1
- package/dist/data/chat/tool-render/ToolArgs.cjs +50 -0
- package/dist/data/chat/tool-render/ToolArgs.cjs.map +1 -0
- package/dist/data/chat/tool-render/ToolArgs.d.ts +7 -0
- package/dist/data/chat/tool-render/ToolArgs.d.ts.map +1 -0
- package/dist/data/chat/tool-render/ToolArgs.js +50 -0
- package/dist/data/chat/tool-render/ToolArgs.js.map +1 -0
- package/dist/data/chat/tool-render/ToolParams.cjs +155 -0
- package/dist/data/chat/tool-render/ToolParams.cjs.map +1 -0
- package/dist/data/chat/tool-render/ToolParams.d.ts +20 -0
- package/dist/data/chat/tool-render/ToolParams.d.ts.map +1 -0
- package/dist/data/chat/tool-render/ToolParams.js +155 -0
- package/dist/data/chat/tool-render/ToolParams.js.map +1 -0
- package/dist/data/chat/tool-render/ToolValue.cjs +140 -0
- package/dist/data/chat/tool-render/ToolValue.cjs.map +1 -0
- package/dist/data/chat/tool-render/ToolValue.d.ts +16 -0
- package/dist/data/chat/tool-render/ToolValue.d.ts.map +1 -0
- package/dist/data/chat/tool-render/ToolValue.js +140 -0
- package/dist/data/chat/tool-render/ToolValue.js.map +1 -0
- package/dist/data/chat/tool-render/adapter.cjs +48 -0
- package/dist/data/chat/tool-render/adapter.cjs.map +1 -0
- package/dist/data/chat/tool-render/adapter.d.ts +57 -0
- package/dist/data/chat/tool-render/adapter.d.ts.map +1 -0
- package/dist/data/chat/tool-render/adapter.js +48 -0
- package/dist/data/chat/tool-render/adapter.js.map +1 -0
- package/dist/data/chat/tool-render/context.cjs +16 -0
- package/dist/data/chat/tool-render/context.cjs.map +1 -0
- package/dist/data/chat/tool-render/context.d.ts +6 -0
- package/dist/data/chat/tool-render/context.d.ts.map +1 -0
- package/dist/data/chat/tool-render/context.js +16 -0
- package/dist/data/chat/tool-render/context.js.map +1 -0
- package/dist/data/chat/tool-render/defaults.cjs +45 -0
- package/dist/data/chat/tool-render/defaults.cjs.map +1 -0
- package/dist/data/chat/tool-render/defaults.d.ts +11 -0
- package/dist/data/chat/tool-render/defaults.d.ts.map +1 -0
- package/dist/data/chat/tool-render/defaults.js +45 -0
- package/dist/data/chat/tool-render/defaults.js.map +1 -0
- package/dist/data/chat/tool-render/index.d.ts +13 -0
- package/dist/data/chat/tool-render/index.d.ts.map +1 -0
- package/dist/data/chat/tool-render/known-tool-views.cjs +208 -0
- package/dist/data/chat/tool-render/known-tool-views.cjs.map +1 -0
- package/dist/data/chat/tool-render/known-tool-views.d.ts +10 -0
- package/dist/data/chat/tool-render/known-tool-views.d.ts.map +1 -0
- package/dist/data/chat/tool-render/known-tool-views.js +208 -0
- package/dist/data/chat/tool-render/known-tool-views.js.map +1 -0
- package/dist/data/chat/tool-render/known-tools.cjs +58 -0
- package/dist/data/chat/tool-render/known-tools.cjs.map +1 -0
- package/dist/data/chat/tool-render/known-tools.d.ts +4 -0
- package/dist/data/chat/tool-render/known-tools.d.ts.map +1 -0
- package/dist/data/chat/tool-render/known-tools.js +58 -0
- package/dist/data/chat/tool-render/known-tools.js.map +1 -0
- package/dist/data/chat/tool-render/normalize.cjs +42 -0
- package/dist/data/chat/tool-render/normalize.cjs.map +1 -0
- package/dist/data/chat/tool-render/normalize.d.ts +13 -0
- package/dist/data/chat/tool-render/normalize.d.ts.map +1 -0
- package/dist/data/chat/tool-render/normalize.js +42 -0
- package/dist/data/chat/tool-render/normalize.js.map +1 -0
- package/dist/data/chat/tool-render/registry.cjs +14 -0
- package/dist/data/chat/tool-render/registry.cjs.map +1 -0
- package/dist/data/chat/tool-render/registry.d.ts +7 -0
- package/dist/data/chat/tool-render/registry.d.ts.map +1 -0
- package/dist/data/chat/tool-render/registry.js +14 -0
- package/dist/data/chat/tool-render/registry.js.map +1 -0
- package/dist/data/chat/tool-render/schema.cjs +57 -0
- package/dist/data/chat/tool-render/schema.cjs.map +1 -0
- package/dist/data/chat/tool-render/schema.d.ts +28 -0
- package/dist/data/chat/tool-render/schema.d.ts.map +1 -0
- package/dist/data/chat/tool-render/schema.js +57 -0
- package/dist/data/chat/tool-render/schema.js.map +1 -0
- package/dist/data/chat/tool-render/shape.cjs +94 -0
- package/dist/data/chat/tool-render/shape.cjs.map +1 -0
- package/dist/data/chat/tool-render/shape.d.ts +39 -0
- package/dist/data/chat/tool-render/shape.d.ts.map +1 -0
- package/dist/data/chat/tool-render/shape.js +94 -0
- package/dist/data/chat/tool-render/shape.js.map +1 -0
- package/dist/data/chat/tool-render/summary.cjs +34 -0
- package/dist/data/chat/tool-render/summary.cjs.map +1 -0
- package/dist/data/chat/tool-render/summary.d.ts +8 -0
- package/dist/data/chat/tool-render/summary.d.ts.map +1 -0
- package/dist/data/chat/tool-render/summary.js +34 -0
- package/dist/data/chat/tool-render/summary.js.map +1 -0
- package/dist/data/chat/types.cjs.map +1 -1
- package/dist/data/chat/types.d.ts +19 -0
- package/dist/data/chat/types.d.ts.map +1 -1
- package/dist/data/chat/types.js.map +1 -1
- package/dist/data/chat/usage-snapshot.cjs +17 -0
- package/dist/data/chat/usage-snapshot.cjs.map +1 -0
- package/dist/data/chat/usage-snapshot.d.ts +21 -0
- package/dist/data/chat/usage-snapshot.d.ts.map +1 -0
- package/dist/data/chat/usage-snapshot.js +17 -0
- package/dist/data/chat/usage-snapshot.js.map +1 -0
- package/dist/data/data-table-filter-values.cjs +83 -0
- package/dist/data/data-table-filter-values.cjs.map +1 -0
- package/dist/data/data-table-filter-values.d.ts +18 -0
- package/dist/data/data-table-filter-values.d.ts.map +1 -0
- package/dist/data/data-table-filter-values.js +83 -0
- package/dist/data/data-table-filter-values.js.map +1 -0
- package/dist/data/data-table-server-filters.cjs +171 -0
- package/dist/data/data-table-server-filters.cjs.map +1 -0
- package/dist/data/data-table-server-filters.d.ts +128 -0
- package/dist/data/data-table-server-filters.d.ts.map +1 -0
- package/dist/data/data-table-server-filters.js +171 -0
- package/dist/data/data-table-server-filters.js.map +1 -0
- package/dist/data/query-browser/QueryBrowser.cjs +96 -19
- package/dist/data/query-browser/QueryBrowser.cjs.map +1 -1
- package/dist/data/query-browser/QueryBrowser.d.ts +37 -6
- package/dist/data/query-browser/QueryBrowser.d.ts.map +1 -1
- package/dist/data/query-browser/QueryBrowser.js +96 -19
- package/dist/data/query-browser/QueryBrowser.js.map +1 -1
- package/dist/data/query-browser/index.d.ts +1 -1
- package/dist/data/query-browser/index.d.ts.map +1 -1
- package/dist/data/runtime/ProviderStatusPanel.cjs +187 -0
- package/dist/data/runtime/ProviderStatusPanel.cjs.map +1 -0
- package/dist/data/runtime/ProviderStatusPanel.d.ts +10 -0
- package/dist/data/runtime/ProviderStatusPanel.d.ts.map +1 -0
- package/dist/data/runtime/ProviderStatusPanel.js +187 -0
- package/dist/data/runtime/ProviderStatusPanel.js.map +1 -0
- package/dist/data/runtime/RuntimeBar.cjs +147 -0
- package/dist/data/runtime/RuntimeBar.cjs.map +1 -0
- package/dist/data/runtime/RuntimeBar.d.ts +22 -0
- package/dist/data/runtime/RuntimeBar.d.ts.map +1 -0
- package/dist/data/runtime/RuntimeBar.js +147 -0
- package/dist/data/runtime/RuntimeBar.js.map +1 -0
- package/dist/data/runtime/RuntimeBar.model.cjs +14 -0
- package/dist/data/runtime/RuntimeBar.model.cjs.map +1 -0
- package/dist/data/runtime/RuntimeBar.model.d.ts +10 -0
- package/dist/data/runtime/RuntimeBar.model.d.ts.map +1 -0
- package/dist/data/runtime/RuntimeBar.model.js +14 -0
- package/dist/data/runtime/RuntimeBar.model.js.map +1 -0
- package/dist/data/runtime/RuntimeBarCombo.cjs +354 -0
- package/dist/data/runtime/RuntimeBarCombo.cjs.map +1 -0
- package/dist/data/runtime/RuntimeBarCombo.d.ts +23 -0
- package/dist/data/runtime/RuntimeBarCombo.d.ts.map +1 -0
- package/dist/data/runtime/RuntimeBarCombo.js +354 -0
- package/dist/data/runtime/RuntimeBarCombo.js.map +1 -0
- package/dist/data/{ai/RuntimeBar.cjs → runtime/RuntimeBarSegments.cjs} +93 -87
- package/dist/data/runtime/RuntimeBarSegments.cjs.map +1 -0
- package/dist/data/runtime/RuntimeBarSegments.d.ts +25 -0
- package/dist/data/runtime/RuntimeBarSegments.d.ts.map +1 -0
- package/dist/data/{ai/RuntimeBar.js → runtime/RuntimeBarSegments.js} +96 -90
- package/dist/data/runtime/RuntimeBarSegments.js.map +1 -0
- package/dist/data/runtime/availability.cjs +11 -0
- package/dist/data/runtime/availability.cjs.map +1 -0
- package/dist/data/runtime/availability.d.ts +6 -0
- package/dist/data/runtime/availability.d.ts.map +1 -0
- package/dist/data/runtime/availability.js +11 -0
- package/dist/data/runtime/availability.js.map +1 -0
- package/dist/data/{ai → runtime}/model-capabilities.cjs +12 -1
- package/dist/data/runtime/model-capabilities.cjs.map +1 -0
- package/dist/data/{ai → runtime}/model-capabilities.d.ts +2 -6
- package/dist/data/runtime/model-capabilities.d.ts.map +1 -0
- package/dist/data/{ai → runtime}/model-capabilities.js +12 -1
- package/dist/data/runtime/model-capabilities.js.map +1 -0
- package/dist/data/runtime/provider-status.cjs +106 -0
- package/dist/data/runtime/provider-status.cjs.map +1 -0
- package/dist/data/runtime/provider-status.d.ts +24 -0
- package/dist/data/runtime/provider-status.d.ts.map +1 -0
- package/dist/data/runtime/provider-status.js +106 -0
- package/dist/data/runtime/provider-status.js.map +1 -0
- package/dist/data/{ai → runtime}/runtime-mode.cjs +123 -22
- package/dist/data/runtime/runtime-mode.cjs.map +1 -0
- package/dist/data/{ai → runtime}/runtime-mode.d.ts +8 -1
- package/dist/data/runtime/runtime-mode.d.ts.map +1 -0
- package/dist/data/{ai → runtime}/runtime-mode.js +123 -22
- package/dist/data/runtime/runtime-mode.js.map +1 -0
- package/dist/data/server-timing.cjs +120 -0
- package/dist/data/server-timing.cjs.map +1 -0
- package/dist/data/server-timing.d.ts +11 -0
- package/dist/data/server-timing.d.ts.map +1 -0
- package/dist/data/server-timing.js +120 -0
- package/dist/data/server-timing.js.map +1 -0
- package/dist/data/task-query-keys.cjs +26 -0
- package/dist/data/task-query-keys.cjs.map +1 -0
- package/dist/data/task-query-keys.d.ts +27 -0
- package/dist/data/task-query-keys.d.ts.map +1 -0
- package/dist/data/task-query-keys.js +26 -0
- package/dist/data/task-query-keys.js.map +1 -0
- package/dist/data/version-info.cjs +3 -3
- package/dist/data/version-info.js +3 -3
- package/dist/data.cjs +23 -0
- package/dist/data.cjs.map +1 -1
- package/dist/data.d.ts +8 -2
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +23 -0
- package/dist/data.js.map +1 -1
- package/dist/hooks/use-hotkey.cjs +6 -1
- package/dist/hooks/use-hotkey.cjs.map +1 -1
- package/dist/hooks/use-hotkey.d.ts.map +1 -1
- package/dist/hooks/use-hotkey.js +6 -1
- package/dist/hooks/use-hotkey.js.map +1 -1
- package/dist/hooks/use-task-run.cjs +7 -4
- package/dist/hooks/use-task-run.cjs.map +1 -1
- package/dist/hooks/use-task-run.d.ts +12 -0
- package/dist/hooks/use-task-run.d.ts.map +1 -1
- package/dist/hooks/use-task-run.js +7 -4
- package/dist/hooks/use-task-run.js.map +1 -1
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.d.ts.map +1 -1
- package/dist/icons/registry.cjs +692 -0
- package/dist/icons/registry.cjs.map +1 -0
- package/dist/icons/registry.d.ts +21 -0
- package/dist/icons/registry.d.ts.map +1 -0
- package/dist/icons/registry.js +692 -0
- package/dist/icons/registry.js.map +1 -0
- package/dist/icons.cjs +3 -0
- package/dist/icons.cjs.map +1 -1
- package/dist/icons.js +4 -1
- package/dist/icons.js.map +1 -1
- package/dist/index.cjs +54 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +56 -2
- package/dist/index.js.map +1 -1
- package/dist/layout/AppShell.cjs +93 -57
- package/dist/layout/AppShell.cjs.map +1 -1
- package/dist/layout/AppShell.d.ts +49 -1
- package/dist/layout/AppShell.d.ts.map +1 -1
- package/dist/layout/AppShell.js +93 -57
- package/dist/layout/AppShell.js.map +1 -1
- package/dist/layout/AppShell.nav.cjs +144 -19
- package/dist/layout/AppShell.nav.cjs.map +1 -1
- package/dist/layout/AppShell.nav.d.ts +6 -1
- package/dist/layout/AppShell.nav.d.ts.map +1 -1
- package/dist/layout/AppShell.nav.js +144 -19
- package/dist/layout/AppShell.nav.js.map +1 -1
- package/dist/layout/SplitPane.cjs +23 -7
- package/dist/layout/SplitPane.cjs.map +1 -1
- package/dist/layout/SplitPane.d.ts +3 -1
- package/dist/layout/SplitPane.d.ts.map +1 -1
- package/dist/layout/SplitPane.js +23 -7
- package/dist/layout/SplitPane.js.map +1 -1
- package/dist/lib/format.cjs +86 -4
- package/dist/lib/format.cjs.map +1 -1
- package/dist/lib/format.d.ts +69 -0
- package/dist/lib/format.d.ts.map +1 -1
- package/dist/lib/format.js +86 -4
- package/dist/lib/format.js.map +1 -1
- package/dist/lib/path-tree.cjs +69 -0
- package/dist/lib/path-tree.cjs.map +1 -0
- package/dist/lib/path-tree.d.ts +54 -0
- package/dist/lib/path-tree.d.ts.map +1 -0
- package/dist/lib/path-tree.js +69 -0
- package/dist/lib/path-tree.js.map +1 -0
- package/dist/monaco.d.ts +1 -0
- package/dist/monaco.d.ts.map +1 -1
- package/dist/overlay/DropdownMenuSubmenu.cjs +13 -7
- package/dist/overlay/DropdownMenuSubmenu.cjs.map +1 -1
- package/dist/overlay/DropdownMenuSubmenu.d.ts.map +1 -1
- package/dist/overlay/DropdownMenuSubmenu.js +13 -7
- package/dist/overlay/DropdownMenuSubmenu.js.map +1 -1
- package/dist/overlay/HoverCard.cjs.map +1 -1
- package/dist/overlay/HoverCard.d.ts +2 -2
- package/dist/overlay/HoverCard.d.ts.map +1 -1
- package/dist/overlay/HoverCard.js.map +1 -1
- package/dist/overlay/Tour.cjs +173 -0
- package/dist/overlay/Tour.cjs.map +1 -0
- package/dist/overlay/Tour.d.ts +61 -0
- package/dist/overlay/Tour.d.ts.map +1 -0
- package/dist/overlay/Tour.js +173 -0
- package/dist/overlay/Tour.js.map +1 -0
- package/dist/overlay/TourCard.cjs +108 -0
- package/dist/overlay/TourCard.cjs.map +1 -0
- package/dist/overlay/TourCard.d.ts +23 -0
- package/dist/overlay/TourCard.d.ts.map +1 -0
- package/dist/overlay/TourCard.js +108 -0
- package/dist/overlay/TourCard.js.map +1 -0
- package/dist/overlay/TourProvider.cjs +160 -0
- package/dist/overlay/TourProvider.cjs.map +1 -0
- package/dist/overlay/TourProvider.d.ts +31 -0
- package/dist/overlay/TourProvider.d.ts.map +1 -0
- package/dist/overlay/TourProvider.js +160 -0
- package/dist/overlay/TourProvider.js.map +1 -0
- package/dist/overlay/TourSpotlight.cjs +47 -0
- package/dist/overlay/TourSpotlight.cjs.map +1 -0
- package/dist/overlay/TourSpotlight.d.ts +12 -0
- package/dist/overlay/TourSpotlight.d.ts.map +1 -0
- package/dist/overlay/TourSpotlight.js +47 -0
- package/dist/overlay/TourSpotlight.js.map +1 -0
- package/dist/overlay/modalStack.cjs +18 -4
- package/dist/overlay/modalStack.cjs.map +1 -1
- package/dist/overlay/modalStack.d.ts +10 -2
- package/dist/overlay/modalStack.d.ts.map +1 -1
- package/dist/overlay/modalStack.js +19 -5
- package/dist/overlay/modalStack.js.map +1 -1
- package/dist/overlay/tour-anchor.cjs +114 -0
- package/dist/overlay/tour-anchor.cjs.map +1 -0
- package/dist/overlay/tour-anchor.d.ts +30 -0
- package/dist/overlay/tour-anchor.d.ts.map +1 -0
- package/dist/overlay/tour-anchor.js +114 -0
- package/dist/overlay/tour-anchor.js.map +1 -0
- package/dist/overlay/tour-context.cjs +12 -0
- package/dist/overlay/tour-context.cjs.map +1 -0
- package/dist/overlay/tour-context.d.ts +40 -0
- package/dist/overlay/tour-context.d.ts.map +1 -0
- package/dist/overlay/tour-context.js +12 -0
- package/dist/overlay/tour-context.js.map +1 -0
- package/dist/overlay/tour-geometry.cjs +65 -0
- package/dist/overlay/tour-geometry.cjs.map +1 -0
- package/dist/overlay/tour-geometry.d.ts +47 -0
- package/dist/overlay/tour-geometry.d.ts.map +1 -0
- package/dist/overlay/tour-geometry.js +65 -0
- package/dist/overlay/tour-geometry.js.map +1 -0
- package/dist/overlay/tour-model.cjs +79 -0
- package/dist/overlay/tour-model.cjs.map +1 -0
- package/dist/overlay/tour-model.d.ts +29 -0
- package/dist/overlay/tour-model.d.ts.map +1 -0
- package/dist/overlay/tour-model.js +79 -0
- package/dist/overlay/tour-model.js.map +1 -0
- package/dist/overlay/tour-progress.cjs +54 -0
- package/dist/overlay/tour-progress.cjs.map +1 -0
- package/dist/overlay/tour-progress.d.ts +40 -0
- package/dist/overlay/tour-progress.d.ts.map +1 -0
- package/dist/overlay/tour-progress.js +54 -0
- package/dist/overlay/tour-progress.js.map +1 -0
- package/dist/overlay/tour-types.d.ts +144 -0
- package/dist/overlay/tour-types.d.ts.map +1 -0
- package/dist/overlay/use-tour-anchor.cjs +43 -0
- package/dist/overlay/use-tour-anchor.cjs.map +1 -0
- package/dist/overlay/use-tour-anchor.d.ts +23 -0
- package/dist/overlay/use-tour-anchor.d.ts.map +1 -0
- package/dist/overlay/use-tour-anchor.js +43 -0
- package/dist/overlay/use-tour-anchor.js.map +1 -0
- package/dist/overlay/use-tour-rect.cjs +33 -0
- package/dist/overlay/use-tour-rect.cjs.map +1 -0
- package/dist/overlay/use-tour-rect.d.ts +12 -0
- package/dist/overlay/use-tour-rect.d.ts.map +1 -0
- package/dist/overlay/use-tour-rect.js +33 -0
- package/dist/overlay/use-tour-rect.js.map +1 -0
- package/dist/overlay/use-tour-step.cjs +66 -0
- package/dist/overlay/use-tour-step.cjs.map +1 -0
- package/dist/overlay/use-tour-step.d.ts +45 -0
- package/dist/overlay/use-tour-step.d.ts.map +1 -0
- package/dist/overlay/use-tour-step.js +66 -0
- package/dist/overlay/use-tour-step.js.map +1 -0
- package/dist/overlay/zIndex.cjs +8 -0
- package/dist/overlay/zIndex.cjs.map +1 -1
- package/dist/overlay/zIndex.d.ts +8 -0
- package/dist/overlay/zIndex.d.ts.map +1 -1
- package/dist/overlay/zIndex.js +8 -0
- package/dist/overlay/zIndex.js.map +1 -1
- package/dist/rpc/CommandOutput.cjs +8 -0
- package/dist/rpc/CommandOutput.cjs.map +1 -1
- package/dist/rpc/CommandOutput.d.ts +4 -1
- package/dist/rpc/CommandOutput.d.ts.map +1 -1
- package/dist/rpc/CommandOutput.js +8 -0
- package/dist/rpc/CommandOutput.js.map +1 -1
- package/dist/rpc/EntityExplorerApp.cjs +10 -16
- package/dist/rpc/EntityExplorerApp.cjs.map +1 -1
- package/dist/rpc/EntityExplorerApp.d.ts.map +1 -1
- package/dist/rpc/EntityExplorerApp.js +10 -16
- package/dist/rpc/EntityExplorerApp.js.map +1 -1
- package/dist/rpc/OperationActionBar.cjs +1 -1
- package/dist/rpc/OperationActionBar.cjs.map +1 -1
- package/dist/rpc/OperationActionBar.js +1 -1
- package/dist/rpc/OperationActionBar.js.map +1 -1
- package/dist/rpc/OperationCatalog.cjs +111 -58
- package/dist/rpc/OperationCatalog.cjs.map +1 -1
- package/dist/rpc/OperationCatalog.d.ts +1 -6
- package/dist/rpc/OperationCatalog.d.ts.map +1 -1
- package/dist/rpc/OperationCatalog.js +112 -59
- package/dist/rpc/OperationCatalog.js.map +1 -1
- package/dist/rpc/OperationResultView.cjs +44 -0
- package/dist/rpc/OperationResultView.cjs.map +1 -1
- package/dist/rpc/OperationResultView.d.ts +8 -1
- package/dist/rpc/OperationResultView.d.ts.map +1 -1
- package/dist/rpc/OperationResultView.js +44 -0
- package/dist/rpc/OperationResultView.js.map +1 -1
- package/dist/rpc/SchemaActionForm.cjs +2 -21
- package/dist/rpc/SchemaActionForm.cjs.map +1 -1
- package/dist/rpc/SchemaActionForm.d.ts.map +1 -1
- package/dist/rpc/SchemaActionForm.js +3 -22
- package/dist/rpc/SchemaActionForm.js.map +1 -1
- package/dist/rpc/apiClient.cjs +16 -2
- package/dist/rpc/apiClient.cjs.map +1 -1
- package/dist/rpc/apiClient.d.ts.map +1 -1
- package/dist/rpc/apiClient.js +16 -2
- package/dist/rpc/apiClient.js.map +1 -1
- package/dist/rpc/formMetadata.cjs +89 -49
- package/dist/rpc/formMetadata.cjs.map +1 -1
- package/dist/rpc/formMetadata.d.ts +14 -6
- package/dist/rpc/formMetadata.d.ts.map +1 -1
- package/dist/rpc/formMetadata.js +87 -47
- package/dist/rpc/formMetadata.js.map +1 -1
- package/dist/rpc/operationFilterSearch.cjs +23 -0
- package/dist/rpc/operationFilterSearch.cjs.map +1 -0
- package/dist/rpc/operationFilterSearch.d.ts +22 -0
- package/dist/rpc/operationFilterSearch.d.ts.map +1 -0
- package/dist/rpc/operationFilterSearch.js +23 -0
- package/dist/rpc/operationFilterSearch.js.map +1 -0
- package/dist/rpc/operationLookupFetcher.cjs +28 -0
- package/dist/rpc/operationLookupFetcher.cjs.map +1 -0
- package/dist/rpc/operationLookupFetcher.d.ts +17 -0
- package/dist/rpc/operationLookupFetcher.d.ts.map +1 -0
- package/dist/rpc/operationLookupFetcher.js +28 -0
- package/dist/rpc/operationLookupFetcher.js.map +1 -0
- package/dist/rpc/surfaceNav.cjs +77 -0
- package/dist/rpc/surfaceNav.cjs.map +1 -0
- package/dist/rpc/surfaceNav.d.ts +19 -0
- package/dist/rpc/surfaceNav.d.ts.map +1 -0
- package/dist/rpc/surfaceNav.js +77 -0
- package/dist/rpc/surfaceNav.js.map +1 -0
- package/dist/rpc/types.cjs.map +1 -1
- package/dist/rpc/types.d.ts +12 -1
- package/dist/rpc/types.d.ts.map +1 -1
- package/dist/rpc/types.js.map +1 -1
- package/dist/rpc.cjs +2 -0
- package/dist/rpc.cjs.map +1 -1
- package/dist/rpc.d.ts +1 -0
- package/dist/rpc.d.ts.map +1 -1
- package/dist/rpc.js +2 -0
- package/dist/rpc.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind-preset.cjs +4 -0
- package/dist/tailwind-preset.cjs.map +1 -1
- package/dist/tailwind-preset.d.ts.map +1 -1
- package/dist/tailwind-preset.js +4 -0
- package/dist/tailwind-preset.js.map +1 -1
- package/dist/utils.cjs +8 -0
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.ts +2 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +10 -2
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
- package/dist/data/ai/RuntimeBar.cjs.map +0 -1
- package/dist/data/ai/RuntimeBar.d.ts +0 -27
- package/dist/data/ai/RuntimeBar.d.ts.map +0 -1
- package/dist/data/ai/RuntimeBar.js.map +0 -1
- package/dist/data/ai/model-capabilities.cjs.map +0 -1
- package/dist/data/ai/model-capabilities.d.ts.map +0 -1
- package/dist/data/ai/model-capabilities.js.map +0 -1
- package/dist/data/ai/runtime-mode.cjs.map +0 -1
- package/dist/data/ai/runtime-mode.d.ts.map +0 -1
- package/dist/data/ai/runtime-mode.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-action-icons.cjs","sources":["../../../src/data/ai/agent-action-icons.ts"],"sourcesContent":["import type { StaticIconComponent } from \"../Icon\";\nimport {\n EFFORT_LEVEL_ICONS,\n effortLevelLabel,\n type EffortLevel,\n} from \"../chat/effort-icons\";\nimport type { SessionTone } from \"./SessionViewer.model\";\nimport type { SpecPermissionMode } from \"./SpecRuntimeEditor.model\";\nimport {\n UiArrowFatUp,\n UiBraces,\n UiBox,\n UiChatDots,\n UiCircleX,\n UiFastForwardCircle,\n UiHandPalm,\n UiPass,\n UiPauseCircle,\n UiPlayCircle,\n UiQuestion,\n UiSealCheck,\n UiShieldSlash,\n UiStrategy,\n UiTerminal,\n} from \"../../icons\";\n\n// Implements the semantic groups of the Flanksource \"Agent Action Icons\" design\n// beyond the per-tool ACTIONS map (which lives in SessionViewer.model.ts). Each\n// entry pairs a generated Ui* glyph with a SessionTone so the disc/text color\n// (
|
|
1
|
+
{"version":3,"file":"agent-action-icons.cjs","sources":["../../../src/data/ai/agent-action-icons.ts"],"sourcesContent":["import type { StaticIconComponent } from \"../Icon\";\nimport {\n EFFORT_LEVEL_ICONS,\n effortLevelLabel,\n type EffortLevel,\n} from \"../chat/effort-icons\";\nimport type { SessionTone } from \"./SessionViewer.model\";\nimport type { SpecPermissionMode } from \"./SpecRuntimeEditor.model\";\nimport {\n UiArrowFatUp,\n UiBraces,\n UiBox,\n UiChatDots,\n UiCircleX,\n UiFastForwardCircle,\n UiHandPalm,\n UiPass,\n UiPauseCircle,\n UiPlayCircle,\n UiQuestion,\n UiSealCheck,\n UiShieldSlash,\n UiStrategy,\n UiTerminal,\n} from \"../../icons\";\n\n// Implements the semantic groups of the Flanksource \"Agent Action Icons\" design\n// beyond the per-tool ACTIONS map (which lives in SessionViewer.model.ts). Each\n// entry pairs a generated Ui* glyph with a SessionTone so the disc/text color\n// (SESSION_TONES in session-tones.ts) encodes the action's category. Blue\n// reasons, green executes, teal confirms; the effort ramp climbs slate → sky →\n// amber → orange → rose → fuchsia; approval clears green / blocks red.\n\nexport interface AgentActionMeta {\n icon: StaticIconComponent;\n tone: SessionTone;\n label: string;\n}\n\n// ── Agent workflow: plan → run → verify ─────────────────────────────────────\nexport type WorkflowPhase = \"plan\" | \"run\" | \"verify\";\n\nexport const WORKFLOW_PHASES: Record<WorkflowPhase, AgentActionMeta> = {\n plan: { icon: UiStrategy, tone: \"sky\", label: \"Plan\" },\n run: { icon: UiPlayCircle, tone: \"emerald\", label: \"Run\" },\n verify: { icon: UiSealCheck, tone: \"teal\", label: \"Verify\" },\n};\n\n// ── Effort levels: reasoning / token budget on the severity hue ramp ─────────\n// The battery glyphs are the chat layer's source of truth (EFFORT_LEVEL_ICONS);\n// here we add the semantic tone + label so an effort chip reads at a glance.\nexport type { EffortLevel } from \"../chat/effort-icons\";\n\nconst EFFORT_TONES: Record<EffortLevel, SessionTone> = {\n minimal: \"slate\",\n low: \"sky\",\n medium: \"amber\",\n high: \"orange\",\n xhigh: \"orange\",\n max: \"rose\",\n ultra: \"fuchsia\",\n adaptive: \"indigo\",\n};\n\nexport const EFFORT_ICONS: Record<EffortLevel, AgentActionMeta> = Object.fromEntries(\n (Object.keys(EFFORT_LEVEL_ICONS) as EffortLevel[]).map((level) => [\n level,\n {\n icon: EFFORT_LEVEL_ICONS[level],\n tone: EFFORT_TONES[level],\n label: effortLevelLabel(level),\n },\n ]),\n) as Record<EffortLevel, AgentActionMeta>;\n\n/** Resolve the effort glyph for a known value. */\nexport function effortIcon(value: string): AgentActionMeta | undefined {\n const key = value.trim().toLowerCase();\n if (key in EFFORT_ICONS) return EFFORT_ICONS[key as EffortLevel];\n return undefined;\n}\n\n// ── Permission modes: colors matched to Claude Code ──────────────────────────\nexport const PERMISSION_MODE_ICONS: Record<\n SpecPermissionMode,\n AgentActionMeta\n> = {\n default: { icon: UiHandPalm, tone: \"slate\", label: \"Ask\" },\n plan: { icon: UiPauseCircle, tone: \"sky\", label: \"Plan\" },\n acceptEdits: { icon: UiFastForwardCircle, tone: \"emerald\", label: \"Auto\" },\n auto: { icon: UiFastForwardCircle, tone: \"emerald\", label: \"Auto\" },\n dontAsk: { icon: UiFastForwardCircle, tone: \"emerald\", label: \"Don't ask\" },\n bypassPermissions: { icon: UiShieldSlash, tone: \"rose\", label: \"Off\" },\n};\n\n// ── Approval states: where a proposed action sits in the HITL flow ───────────\nexport type ApprovalState =\n | \"question\"\n | \"pending\"\n | \"approved\"\n | \"denied\"\n | \"escalate\";\n\nexport const APPROVAL_ICONS: Record<ApprovalState, AgentActionMeta> = {\n question: { icon: UiQuestion, tone: \"sky\", label: \"Question\" },\n pending: { icon: UiChatDots, tone: \"amber\", label: \"Awaiting input\" },\n approved: { icon: UiPass, tone: \"emerald\", label: \"Approved\" },\n denied: { icon: UiCircleX, tone: \"rose\", label: \"Denied\" },\n escalate: { icon: UiArrowFatUp, tone: \"orange\", label: \"Escalate\" },\n};\n\n// ── Agent runtimes: where an agent executes ──────────────────────────────────\nexport type AgentRuntime = \"sdk\" | \"terminal\" | \"api\";\n\nexport const AGENT_RUNTIME_ICONS: Record<AgentRuntime, AgentActionMeta> = {\n sdk: { icon: UiBox, tone: \"indigo\", label: \"SDK agent\" },\n terminal: { icon: UiTerminal, tone: \"slate\", label: \"Terminal agent\" },\n api: { icon: UiBraces, tone: \"sky\", label: \"API agent\" },\n};\n"],"names":["UiStrategy","UiPlayCircle","UiSealCheck","EFFORT_LEVEL_ICONS","effortLevelLabel","UiHandPalm","UiPauseCircle","UiFastForwardCircle","UiShieldSlash","UiQuestion","UiChatDots","UiPass","UiCircleX","UiArrowFatUp","UiBox","UiTerminal","UiBraces"],"mappings":";;;;;;;;;;;;;;;;;;AA0CO,MAAM,kBAA0D;AAAA,EACrE,MAAM,EAAE,MAAMA,WAAAA,YAAY,MAAM,OAAO,OAAO,OAAA;AAAA,EAC9C,KAAK,EAAE,MAAMC,aAAAA,cAAc,MAAM,WAAW,OAAO,MAAA;AAAA,EACnD,QAAQ,EAAE,MAAMC,YAAAA,aAAa,MAAM,QAAQ,OAAO,SAAA;AACpD;AAOA,MAAM,eAAiD;AAAA,EACrD,SAAS;AAAA,EACT,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,OAAO;AAAA,EACP,KAAK;AAAA,EACL,OAAO;AAAA,EACP,UAAU;AACZ;AAEO,MAAM,eAAqD,OAAO;AAAA,EACtE,OAAO,KAAKC,YAAAA,kBAAkB,EAAoB,IAAI,CAAC,UAAU;AAAA,IAChE;AAAA,IACA;AAAA,MACE,MAAMA,YAAAA,mBAAmB,KAAK;AAAA,MAC9B,MAAM,aAAa,KAAK;AAAA,MACxB,OAAOC,YAAAA,iBAAiB,KAAK;AAAA,IAAA;AAAA,EAC/B,CACD;AACH;AAGO,SAAS,WAAW,OAA4C;AACrE,QAAM,MAAM,MAAM,KAAA,EAAO,YAAA;AACzB,MAAI,OAAO,aAAc,QAAO,aAAa,GAAkB;AAC/D,SAAO;AACT;AAGO,MAAM,wBAGT;AAAA,EACF,SAAS,EAAE,MAAMC,WAAAA,YAAY,MAAM,SAAS,OAAO,MAAA;AAAA,EACnD,MAAM,EAAE,MAAMC,cAAAA,eAAe,MAAM,OAAO,OAAO,OAAA;AAAA,EACjD,aAAa,EAAE,MAAMC,oBAAAA,qBAAqB,MAAM,WAAW,OAAO,OAAA;AAAA,EAClE,MAAM,EAAE,MAAMA,oBAAAA,qBAAqB,MAAM,WAAW,OAAO,OAAA;AAAA,EAC3D,SAAS,EAAE,MAAMA,oBAAAA,qBAAqB,MAAM,WAAW,OAAO,YAAA;AAAA,EAC9D,mBAAmB,EAAE,MAAMC,cAAAA,eAAe,MAAM,QAAQ,OAAO,MAAA;AACjE;AAUO,MAAM,iBAAyD;AAAA,EACpE,UAAU,EAAE,MAAMC,WAAAA,YAAY,MAAM,OAAO,OAAO,WAAA;AAAA,EAClD,SAAS,EAAE,MAAMC,WAAAA,YAAY,MAAM,SAAS,OAAO,iBAAA;AAAA,EACnD,UAAU,EAAE,MAAMC,OAAAA,QAAQ,MAAM,WAAW,OAAO,WAAA;AAAA,EAClD,QAAQ,EAAE,MAAMC,UAAAA,WAAW,MAAM,QAAQ,OAAO,SAAA;AAAA,EAChD,UAAU,EAAE,MAAMC,aAAAA,cAAc,MAAM,UAAU,OAAO,WAAA;AACzD;AAKO,MAAM,sBAA6D;AAAA,EACxE,KAAK,EAAE,MAAMC,MAAAA,OAAO,MAAM,UAAU,OAAO,YAAA;AAAA,EAC3C,UAAU,EAAE,MAAMC,WAAAA,YAAY,MAAM,SAAS,OAAO,iBAAA;AAAA,EACpD,KAAK,EAAE,MAAMC,SAAAA,UAAU,MAAM,OAAO,OAAO,YAAA;AAC7C;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-action-icons.js","sources":["../../../src/data/ai/agent-action-icons.ts"],"sourcesContent":["import type { StaticIconComponent } from \"../Icon\";\nimport {\n EFFORT_LEVEL_ICONS,\n effortLevelLabel,\n type EffortLevel,\n} from \"../chat/effort-icons\";\nimport type { SessionTone } from \"./SessionViewer.model\";\nimport type { SpecPermissionMode } from \"./SpecRuntimeEditor.model\";\nimport {\n UiArrowFatUp,\n UiBraces,\n UiBox,\n UiChatDots,\n UiCircleX,\n UiFastForwardCircle,\n UiHandPalm,\n UiPass,\n UiPauseCircle,\n UiPlayCircle,\n UiQuestion,\n UiSealCheck,\n UiShieldSlash,\n UiStrategy,\n UiTerminal,\n} from \"../../icons\";\n\n// Implements the semantic groups of the Flanksource \"Agent Action Icons\" design\n// beyond the per-tool ACTIONS map (which lives in SessionViewer.model.ts). Each\n// entry pairs a generated Ui* glyph with a SessionTone so the disc/text color\n// (
|
|
1
|
+
{"version":3,"file":"agent-action-icons.js","sources":["../../../src/data/ai/agent-action-icons.ts"],"sourcesContent":["import type { StaticIconComponent } from \"../Icon\";\nimport {\n EFFORT_LEVEL_ICONS,\n effortLevelLabel,\n type EffortLevel,\n} from \"../chat/effort-icons\";\nimport type { SessionTone } from \"./SessionViewer.model\";\nimport type { SpecPermissionMode } from \"./SpecRuntimeEditor.model\";\nimport {\n UiArrowFatUp,\n UiBraces,\n UiBox,\n UiChatDots,\n UiCircleX,\n UiFastForwardCircle,\n UiHandPalm,\n UiPass,\n UiPauseCircle,\n UiPlayCircle,\n UiQuestion,\n UiSealCheck,\n UiShieldSlash,\n UiStrategy,\n UiTerminal,\n} from \"../../icons\";\n\n// Implements the semantic groups of the Flanksource \"Agent Action Icons\" design\n// beyond the per-tool ACTIONS map (which lives in SessionViewer.model.ts). Each\n// entry pairs a generated Ui* glyph with a SessionTone so the disc/text color\n// (SESSION_TONES in session-tones.ts) encodes the action's category. Blue\n// reasons, green executes, teal confirms; the effort ramp climbs slate → sky →\n// amber → orange → rose → fuchsia; approval clears green / blocks red.\n\nexport interface AgentActionMeta {\n icon: StaticIconComponent;\n tone: SessionTone;\n label: string;\n}\n\n// ── Agent workflow: plan → run → verify ─────────────────────────────────────\nexport type WorkflowPhase = \"plan\" | \"run\" | \"verify\";\n\nexport const WORKFLOW_PHASES: Record<WorkflowPhase, AgentActionMeta> = {\n plan: { icon: UiStrategy, tone: \"sky\", label: \"Plan\" },\n run: { icon: UiPlayCircle, tone: \"emerald\", label: \"Run\" },\n verify: { icon: UiSealCheck, tone: \"teal\", label: \"Verify\" },\n};\n\n// ── Effort levels: reasoning / token budget on the severity hue ramp ─────────\n// The battery glyphs are the chat layer's source of truth (EFFORT_LEVEL_ICONS);\n// here we add the semantic tone + label so an effort chip reads at a glance.\nexport type { EffortLevel } from \"../chat/effort-icons\";\n\nconst EFFORT_TONES: Record<EffortLevel, SessionTone> = {\n minimal: \"slate\",\n low: \"sky\",\n medium: \"amber\",\n high: \"orange\",\n xhigh: \"orange\",\n max: \"rose\",\n ultra: \"fuchsia\",\n adaptive: \"indigo\",\n};\n\nexport const EFFORT_ICONS: Record<EffortLevel, AgentActionMeta> = Object.fromEntries(\n (Object.keys(EFFORT_LEVEL_ICONS) as EffortLevel[]).map((level) => [\n level,\n {\n icon: EFFORT_LEVEL_ICONS[level],\n tone: EFFORT_TONES[level],\n label: effortLevelLabel(level),\n },\n ]),\n) as Record<EffortLevel, AgentActionMeta>;\n\n/** Resolve the effort glyph for a known value. */\nexport function effortIcon(value: string): AgentActionMeta | undefined {\n const key = value.trim().toLowerCase();\n if (key in EFFORT_ICONS) return EFFORT_ICONS[key as EffortLevel];\n return undefined;\n}\n\n// ── Permission modes: colors matched to Claude Code ──────────────────────────\nexport const PERMISSION_MODE_ICONS: Record<\n SpecPermissionMode,\n AgentActionMeta\n> = {\n default: { icon: UiHandPalm, tone: \"slate\", label: \"Ask\" },\n plan: { icon: UiPauseCircle, tone: \"sky\", label: \"Plan\" },\n acceptEdits: { icon: UiFastForwardCircle, tone: \"emerald\", label: \"Auto\" },\n auto: { icon: UiFastForwardCircle, tone: \"emerald\", label: \"Auto\" },\n dontAsk: { icon: UiFastForwardCircle, tone: \"emerald\", label: \"Don't ask\" },\n bypassPermissions: { icon: UiShieldSlash, tone: \"rose\", label: \"Off\" },\n};\n\n// ── Approval states: where a proposed action sits in the HITL flow ───────────\nexport type ApprovalState =\n | \"question\"\n | \"pending\"\n | \"approved\"\n | \"denied\"\n | \"escalate\";\n\nexport const APPROVAL_ICONS: Record<ApprovalState, AgentActionMeta> = {\n question: { icon: UiQuestion, tone: \"sky\", label: \"Question\" },\n pending: { icon: UiChatDots, tone: \"amber\", label: \"Awaiting input\" },\n approved: { icon: UiPass, tone: \"emerald\", label: \"Approved\" },\n denied: { icon: UiCircleX, tone: \"rose\", label: \"Denied\" },\n escalate: { icon: UiArrowFatUp, tone: \"orange\", label: \"Escalate\" },\n};\n\n// ── Agent runtimes: where an agent executes ──────────────────────────────────\nexport type AgentRuntime = \"sdk\" | \"terminal\" | \"api\";\n\nexport const AGENT_RUNTIME_ICONS: Record<AgentRuntime, AgentActionMeta> = {\n sdk: { icon: UiBox, tone: \"indigo\", label: \"SDK agent\" },\n terminal: { icon: UiTerminal, tone: \"slate\", label: \"Terminal agent\" },\n api: { icon: UiBraces, tone: \"sky\", label: \"API agent\" },\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA0CO,MAAM,kBAA0D;AAAA,EACrE,MAAM,EAAE,MAAM,YAAY,MAAM,OAAO,OAAO,OAAA;AAAA,EAC9C,KAAK,EAAE,MAAM,cAAc,MAAM,WAAW,OAAO,MAAA;AAAA,EACnD,QAAQ,EAAE,MAAM,aAAa,MAAM,QAAQ,OAAO,SAAA;AACpD;AAOA,MAAM,eAAiD;AAAA,EACrD,SAAS;AAAA,EACT,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,OAAO;AAAA,EACP,KAAK;AAAA,EACL,OAAO;AAAA,EACP,UAAU;AACZ;AAEO,MAAM,eAAqD,OAAO;AAAA,EACtE,OAAO,KAAK,kBAAkB,EAAoB,IAAI,CAAC,UAAU;AAAA,IAChE;AAAA,IACA;AAAA,MACE,MAAM,mBAAmB,KAAK;AAAA,MAC9B,M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
zIndex: Z_BASE + i,
|
|
29
29
|
initialPrompt: null,
|
|
30
|
-
contextItems: []
|
|
30
|
+
contextItems: [],
|
|
31
|
+
// A restored window is not attached to a surface yet, so tools fall back
|
|
32
|
+
// to the catalog defaults until one reopens it.
|
|
33
|
+
toolDefaults: {}
|
|
31
34
|
}));
|
|
32
35
|
} catch {
|
|
33
36
|
return [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-window-context.cjs","sources":["../../../src/data/ai/chat-window-context.ts"],"sourcesContent":["// Non-component half of the chat window manager: the context object, the hook,\n// id helpers, persistence and layout maths. Split from the Provider (a .tsx\n// component) so this file stays JSX-free — matching the repo idiom of keeping\n// context/hooks in a .ts (see hooks/use-theme.ts, data/test-runner/context.ts)\n// and keeping React-Fast-Refresh happy.\nimport { createContext, useContext } from \"react\";\nimport type { ChatContextItem } from \"./context\";\nimport { zIndex } from \"../../overlay/zIndex\";\n\n/** Live state of one floating chat window. Position/size/maximized are\n * persisted to localStorage; the rest is session-only. */\nexport interface ChatWindowState {\n id: string;\n threadId: string | null;\n initialModel: string | null;\n x: number;\n y: number;\n width: number;\n height: number;\n zIndex: number;\n maximized: boolean;\n /** A prompt to auto-send when the window mounts (the `id` lets the window\n * detect a fresh request even if the text repeats). */\n initialPrompt: { id: number; text: string } | null;\n contextItems: ChatContextItem[];\n}\n\nexport interface OpenPanelOpts {\n threadId?: string | null;\n initialModel?: string | null;\n initialPrompt?: { id: number; text: string } | null;\n contextItems?: ChatContextItem[];\n}\n\nexport interface ChatWindowManagerValue {\n panels: ChatWindowState[];\n openPanel: (opts?: OpenPanelOpts) => string;\n closePanel: (id: string) => void;\n updatePanel: (id: string, partial: Partial<ChatWindowState>) => void;\n bringToFront: (id: string) => void;\n maximizePanel: (id: string) => void;\n /** Reuses the front-most existing window (merging in any new prompt/context)\n * or opens a fresh one when none exist. */\n findOrCreatePanel: (opts?: OpenPanelOpts) => string;\n}\n\nexport const ChatWindowManagerContext = createContext<ChatWindowManagerValue | null>(null);\n\nexport function useChatWindowManager(): ChatWindowManagerValue {\n const ctx = useContext(ChatWindowManagerContext);\n if (!ctx) throw new Error(\"useChatWindowManager must be used within <ChatWindowManagerProvider>\");\n return ctx;\n}\n\nexport const MAX_PANELS = 6;\nexport const DEFAULT_WIDTH = 520;\nexport const DEFAULT_HEIGHT = 700;\nexport const CASCADE_OFFSET = 30;\nexport const Z_BASE = zIndex.chatWindow;\n\nfunction storageKey(storageId: string) {\n return `chat-panels:${storageId}`;\n}\n\ninterface PersistedPanel {\n id: string;\n threadId: string | null;\n x: number;\n y: number;\n width: number;\n height: number;\n maximized: boolean;\n}\n\nexport function loadPanels(storageId: string): ChatWindowState[] {\n if (typeof window === \"undefined\") return [];\n try {\n const raw = localStorage.getItem(storageKey(storageId));\n if (!raw) return [];\n const persisted: PersistedPanel[] = JSON.parse(raw);\n return persisted.map((p, i) => ({\n ...p,\n initialModel: null,\n zIndex: Z_BASE + i,\n initialPrompt: null,\n contextItems: [],\n }));\n } catch {\n return [];\n }\n}\n\nexport function savePanels(storageId: string, panels: ChatWindowState[]) {\n const persisted: PersistedPanel[] = panels.map((p) => ({\n id: p.id,\n threadId: p.threadId,\n x: p.x,\n y: p.y,\n width: p.width,\n height: p.height,\n maximized: p.maximized,\n }));\n localStorage.setItem(storageKey(storageId), JSON.stringify(persisted));\n}\n\nlet _panelId = 0;\nexport function nextPanelId(): string {\n return `panel-${++_panelId}-${Date.now()}`;\n}\n\nlet _promptId = 0;\n/** A monotonic id stamped onto an `initialPrompt` so a window re-sends even when\n * the same text is requested twice. */\nexport function nextPromptId(): number {\n return ++_promptId;\n}\n\n/** Re-indexes z so values stay compact (61, 62, …) with `frontId` on top. */\nexport function reindex(panels: ChatWindowState[], frontId?: string): ChatWindowState[] {\n const sorted = [...panels].sort((a, b) => a.zIndex - b.zIndex);\n if (frontId) {\n const idx = sorted.findIndex((p) => p.id === frontId);\n if (idx >= 0) {\n const [item] = sorted.splice(idx, 1);\n if (item) sorted.push(item);\n }\n }\n return sorted.map((p, i) => ({ ...p, zIndex: Z_BASE + i }));\n}\n"],"names":["createContext","useContext","zIndex"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"chat-window-context.cjs","sources":["../../../src/data/ai/chat-window-context.ts"],"sourcesContent":["// Non-component half of the chat window manager: the context object, the hook,\n// id helpers, persistence and layout maths. Split from the Provider (a .tsx\n// component) so this file stays JSX-free — matching the repo idiom of keeping\n// context/hooks in a .ts (see hooks/use-theme.ts, data/test-runner/context.ts)\n// and keeping React-Fast-Refresh happy.\nimport { createContext, useContext } from \"react\";\nimport type { ChatContextItem } from \"./context\";\nimport type { ToolMode } from \"./ToolPreferences\";\nimport { zIndex } from \"../../overlay/zIndex\";\n\n/** Live state of one floating chat window. Position/size/maximized are\n * persisted to localStorage; the rest is session-only. */\nexport interface ChatWindowState {\n id: string;\n threadId: string | null;\n initialModel: string | null;\n x: number;\n y: number;\n width: number;\n height: number;\n zIndex: number;\n maximized: boolean;\n /** A prompt to auto-send when the window mounts (the `id` lets the window\n * detect a fresh request even if the text repeats). */\n initialPrompt: { id: number; text: string } | null;\n contextItems: ChatContextItem[];\n /** Default tool modes for the surface that opened this window, keyed by tool\n * name, `preferenceKey`, or `group`. They override the tool catalog's own\n * defaults; a mode the user has explicitly chosen still wins over both. */\n toolDefaults: Record<string, ToolMode>;\n}\n\nexport interface OpenPanelOpts {\n threadId?: string | null;\n initialModel?: string | null;\n initialPrompt?: { id: number; text: string } | null;\n contextItems?: ChatContextItem[];\n /** See {@link ChatWindowState.toolDefaults}. */\n toolDefaults?: Record<string, ToolMode>;\n}\n\nexport interface ChatWindowManagerValue {\n panels: ChatWindowState[];\n openPanel: (opts?: OpenPanelOpts) => string;\n closePanel: (id: string) => void;\n updatePanel: (id: string, partial: Partial<ChatWindowState>) => void;\n bringToFront: (id: string) => void;\n maximizePanel: (id: string) => void;\n /** Reuses the front-most existing window (merging in any new prompt/context)\n * or opens a fresh one when none exist. */\n findOrCreatePanel: (opts?: OpenPanelOpts) => string;\n}\n\nexport const ChatWindowManagerContext = createContext<ChatWindowManagerValue | null>(null);\n\nexport function useChatWindowManager(): ChatWindowManagerValue {\n const ctx = useContext(ChatWindowManagerContext);\n if (!ctx) throw new Error(\"useChatWindowManager must be used within <ChatWindowManagerProvider>\");\n return ctx;\n}\n\nexport const MAX_PANELS = 6;\nexport const DEFAULT_WIDTH = 520;\nexport const DEFAULT_HEIGHT = 700;\nexport const CASCADE_OFFSET = 30;\nexport const Z_BASE = zIndex.chatWindow;\n\nfunction storageKey(storageId: string) {\n return `chat-panels:${storageId}`;\n}\n\ninterface PersistedPanel {\n id: string;\n threadId: string | null;\n x: number;\n y: number;\n width: number;\n height: number;\n maximized: boolean;\n}\n\nexport function loadPanels(storageId: string): ChatWindowState[] {\n if (typeof window === \"undefined\") return [];\n try {\n const raw = localStorage.getItem(storageKey(storageId));\n if (!raw) return [];\n const persisted: PersistedPanel[] = JSON.parse(raw);\n return persisted.map((p, i) => ({\n ...p,\n initialModel: null,\n zIndex: Z_BASE + i,\n initialPrompt: null,\n contextItems: [],\n // A restored window is not attached to a surface yet, so tools fall back\n // to the catalog defaults until one reopens it.\n toolDefaults: {},\n }));\n } catch {\n return [];\n }\n}\n\nexport function savePanels(storageId: string, panels: ChatWindowState[]) {\n const persisted: PersistedPanel[] = panels.map((p) => ({\n id: p.id,\n threadId: p.threadId,\n x: p.x,\n y: p.y,\n width: p.width,\n height: p.height,\n maximized: p.maximized,\n }));\n localStorage.setItem(storageKey(storageId), JSON.stringify(persisted));\n}\n\nlet _panelId = 0;\nexport function nextPanelId(): string {\n return `panel-${++_panelId}-${Date.now()}`;\n}\n\nlet _promptId = 0;\n/** A monotonic id stamped onto an `initialPrompt` so a window re-sends even when\n * the same text is requested twice. */\nexport function nextPromptId(): number {\n return ++_promptId;\n}\n\n/** Re-indexes z so values stay compact (61, 62, …) with `frontId` on top. */\nexport function reindex(panels: ChatWindowState[], frontId?: string): ChatWindowState[] {\n const sorted = [...panels].sort((a, b) => a.zIndex - b.zIndex);\n if (frontId) {\n const idx = sorted.findIndex((p) => p.id === frontId);\n if (idx >= 0) {\n const [item] = sorted.splice(idx, 1);\n if (item) sorted.push(item);\n }\n }\n return sorted.map((p, i) => ({ ...p, zIndex: Z_BASE + i }));\n}\n"],"names":["createContext","useContext","zIndex"],"mappings":";;;;AAqDO,MAAM,2BAA2BA,MAAAA,cAA6C,IAAI;AAElF,SAAS,uBAA+C;AAC7D,QAAM,MAAMC,MAAAA,WAAW,wBAAwB;AAC/C,MAAI,CAAC,IAAK,OAAM,IAAI,MAAM,sEAAsE;AAChG,SAAO;AACT;AAEO,MAAM,aAAa;AACnB,MAAM,gBAAgB;AACtB,MAAM,iBAAiB;AACvB,MAAM,iBAAiB;AACvB,MAAM,SAASC,OAAAA,OAAO;AAE7B,SAAS,WAAW,WAAmB;AACrC,SAAO,eAAe,SAAS;AACjC;AAYO,SAAS,WAAW,WAAsC;AAC/D,MAAI,OAAO,WAAW,YAAa,QAAO,CAAA;AAC1C,MAAI;AACF,UAAM,MAAM,aAAa,QAAQ,WAAW,SAAS,CAAC;AACtD,QAAI,CAAC,IAAK,QAAO,CAAA;AACjB,UAAM,YAA8B,KAAK,MAAM,GAAG;AAClD,WAAO,UAAU,IAAI,CAAC,GAAG,OAAO;AAAA,MAC9B,GAAG;AAAA,MACH,cAAc;AAAA,MACd,QAAQ,SAAS;AAAA,MACjB,eAAe;AAAA,MACf,cAAc,CAAA;AAAA;AAAA;AAAA,MAGd,cAAc,CAAA;AAAA,IAAC,EACf;AAAA,EACJ,QAAQ;AACN,WAAO,CAAA;AAAA,EACT;AACF;AAEO,SAAS,WAAW,WAAmB,QAA2B;AACvE,QAAM,YAA8B,OAAO,IAAI,CAAC,OAAO;AAAA,IACrD,IAAI,EAAE;AAAA,IACN,UAAU,EAAE;AAAA,IACZ,GAAG,EAAE;AAAA,IACL,GAAG,EAAE;AAAA,IACL,OAAO,EAAE;AAAA,IACT,QAAQ,EAAE;AAAA,IACV,WAAW,EAAE;AAAA,EAAA,EACb;AACF,eAAa,QAAQ,WAAW,SAAS,GAAG,KAAK,UAAU,SAAS,CAAC;AACvE;AAEA,IAAI,WAAW;AACR,SAAS,cAAsB;AACpC,SAAO,SAAS,EAAE,QAAQ,IAAI,KAAK,KAAK;AAC1C;AAEA,IAAI,YAAY;AAGT,SAAS,eAAuB;AACrC,SAAO,EAAE;AACX;AAGO,SAAS,QAAQ,QAA2B,SAAqC;AACtF,QAAM,SAAS,CAAC,GAAG,MAAM,EAAE,KAAK,CAAC,GAAG,MAAM,EAAE,SAAS,EAAE,MAAM;AAC7D,MAAI,SAAS;AACX,UAAM,MAAM,OAAO,UAAU,CAAC,MAAM,EAAE,OAAO,OAAO;AACpD,QAAI,OAAO,GAAG;AACZ,YAAM,CAAC,IAAI,IAAI,OAAO,OAAO,KAAK,CAAC;AACnC,UAAI,KAAM,QAAO,KAAK,IAAI;AAAA,IAC5B;AAAA,EACF;AACA,SAAO,OAAO,IAAI,CAAC,GAAG,OAAO,EAAE,GAAG,GAAG,QAAQ,SAAS,EAAA,EAAI;AAC5D;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ChatContextItem } from './context';
|
|
2
|
+
import { ToolMode } from './ToolPreferences';
|
|
2
3
|
/** Live state of one floating chat window. Position/size/maximized are
|
|
3
4
|
* persisted to localStorage; the rest is session-only. */
|
|
4
5
|
export interface ChatWindowState {
|
|
@@ -18,6 +19,10 @@ export interface ChatWindowState {
|
|
|
18
19
|
text: string;
|
|
19
20
|
} | null;
|
|
20
21
|
contextItems: ChatContextItem[];
|
|
22
|
+
/** Default tool modes for the surface that opened this window, keyed by tool
|
|
23
|
+
* name, `preferenceKey`, or `group`. They override the tool catalog's own
|
|
24
|
+
* defaults; a mode the user has explicitly chosen still wins over both. */
|
|
25
|
+
toolDefaults: Record<string, ToolMode>;
|
|
21
26
|
}
|
|
22
27
|
export interface OpenPanelOpts {
|
|
23
28
|
threadId?: string | null;
|
|
@@ -27,6 +32,8 @@ export interface OpenPanelOpts {
|
|
|
27
32
|
text: string;
|
|
28
33
|
} | null;
|
|
29
34
|
contextItems?: ChatContextItem[];
|
|
35
|
+
/** See {@link ChatWindowState.toolDefaults}. */
|
|
36
|
+
toolDefaults?: Record<string, ToolMode>;
|
|
30
37
|
}
|
|
31
38
|
export interface ChatWindowManagerValue {
|
|
32
39
|
panels: ChatWindowState[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-window-context.d.ts","sourceRoot":"","sources":["../../../src/data/ai/chat-window-context.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"chat-window-context.d.ts","sourceRoot":"","sources":["../../../src/data/ai/chat-window-context.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGlD;2DAC2D;AAC3D,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB;4DACwD;IACxD,aAAa,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACnD,YAAY,EAAE,eAAe,EAAE,CAAC;IAChC;;gFAE4E;IAC5E,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,aA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E,MAAM,EAAE,eAAe,EAAE,QAWtE;AAGD,wBAAgB,WAAW,IAAI,MAAM,CAEpC;AAGD;wCACwC;AACxC,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED,6EAA6E;AAC7E,wBAAgB,OAAO,CAAC,MAAM,EAAE,eAAe,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,eAAe,EAAE,CAUtF"}
|
|
@@ -25,7 +25,10 @@ function loadPanels(storageId) {
|
|
|
25
25
|
initialModel: null,
|
|
26
26
|
zIndex: Z_BASE + i,
|
|
27
27
|
initialPrompt: null,
|
|
28
|
-
contextItems: []
|
|
28
|
+
contextItems: [],
|
|
29
|
+
// A restored window is not attached to a surface yet, so tools fall back
|
|
30
|
+
// to the catalog defaults until one reopens it.
|
|
31
|
+
toolDefaults: {}
|
|
29
32
|
}));
|
|
30
33
|
} catch {
|
|
31
34
|
return [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-window-context.js","sources":["../../../src/data/ai/chat-window-context.ts"],"sourcesContent":["// Non-component half of the chat window manager: the context object, the hook,\n// id helpers, persistence and layout maths. Split from the Provider (a .tsx\n// component) so this file stays JSX-free — matching the repo idiom of keeping\n// context/hooks in a .ts (see hooks/use-theme.ts, data/test-runner/context.ts)\n// and keeping React-Fast-Refresh happy.\nimport { createContext, useContext } from \"react\";\nimport type { ChatContextItem } from \"./context\";\nimport { zIndex } from \"../../overlay/zIndex\";\n\n/** Live state of one floating chat window. Position/size/maximized are\n * persisted to localStorage; the rest is session-only. */\nexport interface ChatWindowState {\n id: string;\n threadId: string | null;\n initialModel: string | null;\n x: number;\n y: number;\n width: number;\n height: number;\n zIndex: number;\n maximized: boolean;\n /** A prompt to auto-send when the window mounts (the `id` lets the window\n * detect a fresh request even if the text repeats). */\n initialPrompt: { id: number; text: string } | null;\n contextItems: ChatContextItem[];\n}\n\nexport interface OpenPanelOpts {\n threadId?: string | null;\n initialModel?: string | null;\n initialPrompt?: { id: number; text: string } | null;\n contextItems?: ChatContextItem[];\n}\n\nexport interface ChatWindowManagerValue {\n panels: ChatWindowState[];\n openPanel: (opts?: OpenPanelOpts) => string;\n closePanel: (id: string) => void;\n updatePanel: (id: string, partial: Partial<ChatWindowState>) => void;\n bringToFront: (id: string) => void;\n maximizePanel: (id: string) => void;\n /** Reuses the front-most existing window (merging in any new prompt/context)\n * or opens a fresh one when none exist. */\n findOrCreatePanel: (opts?: OpenPanelOpts) => string;\n}\n\nexport const ChatWindowManagerContext = createContext<ChatWindowManagerValue | null>(null);\n\nexport function useChatWindowManager(): ChatWindowManagerValue {\n const ctx = useContext(ChatWindowManagerContext);\n if (!ctx) throw new Error(\"useChatWindowManager must be used within <ChatWindowManagerProvider>\");\n return ctx;\n}\n\nexport const MAX_PANELS = 6;\nexport const DEFAULT_WIDTH = 520;\nexport const DEFAULT_HEIGHT = 700;\nexport const CASCADE_OFFSET = 30;\nexport const Z_BASE = zIndex.chatWindow;\n\nfunction storageKey(storageId: string) {\n return `chat-panels:${storageId}`;\n}\n\ninterface PersistedPanel {\n id: string;\n threadId: string | null;\n x: number;\n y: number;\n width: number;\n height: number;\n maximized: boolean;\n}\n\nexport function loadPanels(storageId: string): ChatWindowState[] {\n if (typeof window === \"undefined\") return [];\n try {\n const raw = localStorage.getItem(storageKey(storageId));\n if (!raw) return [];\n const persisted: PersistedPanel[] = JSON.parse(raw);\n return persisted.map((p, i) => ({\n ...p,\n initialModel: null,\n zIndex: Z_BASE + i,\n initialPrompt: null,\n contextItems: [],\n }));\n } catch {\n return [];\n }\n}\n\nexport function savePanels(storageId: string, panels: ChatWindowState[]) {\n const persisted: PersistedPanel[] = panels.map((p) => ({\n id: p.id,\n threadId: p.threadId,\n x: p.x,\n y: p.y,\n width: p.width,\n height: p.height,\n maximized: p.maximized,\n }));\n localStorage.setItem(storageKey(storageId), JSON.stringify(persisted));\n}\n\nlet _panelId = 0;\nexport function nextPanelId(): string {\n return `panel-${++_panelId}-${Date.now()}`;\n}\n\nlet _promptId = 0;\n/** A monotonic id stamped onto an `initialPrompt` so a window re-sends even when\n * the same text is requested twice. */\nexport function nextPromptId(): number {\n return ++_promptId;\n}\n\n/** Re-indexes z so values stay compact (61, 62, …) with `frontId` on top. */\nexport function reindex(panels: ChatWindowState[], frontId?: string): ChatWindowState[] {\n const sorted = [...panels].sort((a, b) => a.zIndex - b.zIndex);\n if (frontId) {\n const idx = sorted.findIndex((p) => p.id === frontId);\n if (idx >= 0) {\n const [item] = sorted.splice(idx, 1);\n if (item) sorted.push(item);\n }\n }\n return sorted.map((p, i) => ({ ...p, zIndex: Z_BASE + i }));\n}\n"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"chat-window-context.js","sources":["../../../src/data/ai/chat-window-context.ts"],"sourcesContent":["// Non-component half of the chat window manager: the context object, the hook,\n// id helpers, persistence and layout maths. Split from the Provider (a .tsx\n// component) so this file stays JSX-free — matching the repo idiom of keeping\n// context/hooks in a .ts (see hooks/use-theme.ts, data/test-runner/context.ts)\n// and keeping React-Fast-Refresh happy.\nimport { createContext, useContext } from \"react\";\nimport type { ChatContextItem } from \"./context\";\nimport type { ToolMode } from \"./ToolPreferences\";\nimport { zIndex } from \"../../overlay/zIndex\";\n\n/** Live state of one floating chat window. Position/size/maximized are\n * persisted to localStorage; the rest is session-only. */\nexport interface ChatWindowState {\n id: string;\n threadId: string | null;\n initialModel: string | null;\n x: number;\n y: number;\n width: number;\n height: number;\n zIndex: number;\n maximized: boolean;\n /** A prompt to auto-send when the window mounts (the `id` lets the window\n * detect a fresh request even if the text repeats). */\n initialPrompt: { id: number; text: string } | null;\n contextItems: ChatContextItem[];\n /** Default tool modes for the surface that opened this window, keyed by tool\n * name, `preferenceKey`, or `group`. They override the tool catalog's own\n * defaults; a mode the user has explicitly chosen still wins over both. */\n toolDefaults: Record<string, ToolMode>;\n}\n\nexport interface OpenPanelOpts {\n threadId?: string | null;\n initialModel?: string | null;\n initialPrompt?: { id: number; text: string } | null;\n contextItems?: ChatContextItem[];\n /** See {@link ChatWindowState.toolDefaults}. */\n toolDefaults?: Record<string, ToolMode>;\n}\n\nexport interface ChatWindowManagerValue {\n panels: ChatWindowState[];\n openPanel: (opts?: OpenPanelOpts) => string;\n closePanel: (id: string) => void;\n updatePanel: (id: string, partial: Partial<ChatWindowState>) => void;\n bringToFront: (id: string) => void;\n maximizePanel: (id: string) => void;\n /** Reuses the front-most existing window (merging in any new prompt/context)\n * or opens a fresh one when none exist. */\n findOrCreatePanel: (opts?: OpenPanelOpts) => string;\n}\n\nexport const ChatWindowManagerContext = createContext<ChatWindowManagerValue | null>(null);\n\nexport function useChatWindowManager(): ChatWindowManagerValue {\n const ctx = useContext(ChatWindowManagerContext);\n if (!ctx) throw new Error(\"useChatWindowManager must be used within <ChatWindowManagerProvider>\");\n return ctx;\n}\n\nexport const MAX_PANELS = 6;\nexport const DEFAULT_WIDTH = 520;\nexport const DEFAULT_HEIGHT = 700;\nexport const CASCADE_OFFSET = 30;\nexport const Z_BASE = zIndex.chatWindow;\n\nfunction storageKey(storageId: string) {\n return `chat-panels:${storageId}`;\n}\n\ninterface PersistedPanel {\n id: string;\n threadId: string | null;\n x: number;\n y: number;\n width: number;\n height: number;\n maximized: boolean;\n}\n\nexport function loadPanels(storageId: string): ChatWindowState[] {\n if (typeof window === \"undefined\") return [];\n try {\n const raw = localStorage.getItem(storageKey(storageId));\n if (!raw) return [];\n const persisted: PersistedPanel[] = JSON.parse(raw);\n return persisted.map((p, i) => ({\n ...p,\n initialModel: null,\n zIndex: Z_BASE + i,\n initialPrompt: null,\n contextItems: [],\n // A restored window is not attached to a surface yet, so tools fall back\n // to the catalog defaults until one reopens it.\n toolDefaults: {},\n }));\n } catch {\n return [];\n }\n}\n\nexport function savePanels(storageId: string, panels: ChatWindowState[]) {\n const persisted: PersistedPanel[] = panels.map((p) => ({\n id: p.id,\n threadId: p.threadId,\n x: p.x,\n y: p.y,\n width: p.width,\n height: p.height,\n maximized: p.maximized,\n }));\n localStorage.setItem(storageKey(storageId), JSON.stringify(persisted));\n}\n\nlet _panelId = 0;\nexport function nextPanelId(): string {\n return `panel-${++_panelId}-${Date.now()}`;\n}\n\nlet _promptId = 0;\n/** A monotonic id stamped onto an `initialPrompt` so a window re-sends even when\n * the same text is requested twice. */\nexport function nextPromptId(): number {\n return ++_promptId;\n}\n\n/** Re-indexes z so values stay compact (61, 62, …) with `frontId` on top. */\nexport function reindex(panels: ChatWindowState[], frontId?: string): ChatWindowState[] {\n const sorted = [...panels].sort((a, b) => a.zIndex - b.zIndex);\n if (frontId) {\n const idx = sorted.findIndex((p) => p.id === frontId);\n if (idx >= 0) {\n const [item] = sorted.splice(idx, 1);\n if (item) sorted.push(item);\n }\n }\n return sorted.map((p, i) => ({ ...p, zIndex: Z_BASE + i }));\n}\n"],"names":[],"mappings":";;AAqDO,MAAM,2BAA2B,cAA6C,IAAI;AAElF,SAAS,uBAA+C;AAC7D,QAAM,MAAM,WAAW,wBAAwB;AAC/C,MAAI,CAAC,IAAK,OAAM,IAAI,MAAM,sEAAsE;AAChG,SAAO;AACT;AAEO,MAAM,aAAa;AACnB,MAAM,gBAAgB;AACtB,MAAM,iBAAiB;AACvB,MAAM,iBAAiB;AACvB,MAAM,SAAS,OAAO;AAE7B,SAAS,WAAW,WAAmB;AACrC,SAAO,eAAe,SAAS;AACjC;AAYO,SAAS,WAAW,WAAsC;AAC/D,MAAI,OAAO,WAAW,YAAa,QAAO,CAAA;AAC1C,MAAI;AACF,UAAM,MAAM,aAAa,QAAQ,WAAW,SAAS,CAAC;AACtD,QAAI,CAAC,IAAK,QAAO,CAAA;AACjB,UAAM,YAA8B,KAAK,MAAM,GAAG;AAClD,WAAO,UAAU,IAAI,CAAC,GAAG,OAAO;AAAA,MAC9B,GAAG;AAAA,MACH,cAAc;AAAA,MACd,QAAQ,SAAS;AAAA,MACjB,eAAe;AAAA,MACf,cAAc,CAAA;AAAA;AAAA;AAAA,MAGd,cAAc,CAAA;AAAA,IAAC,EACf;AAAA,EACJ,QAAQ;AACN,WAAO,CAAA;AAAA,EACT;AACF;AAEO,SAAS,WAAW,WAAmB,QAA2B;AACvE,QAAM,YAA8B,OAAO,IAAI,CAAC,OAAO;AAAA,IACrD,IAAI,EAAE;AAAA,IACN,UAAU,EAAE;AAAA,IACZ,GAAG,EAAE;AAAA,IACL,GAAG,EAAE;AAAA,IACL,OAAO,EAAE;AAAA,IACT,QAAQ,EAAE;AAAA,IACV,WAAW,EAAE;AAAA,EAAA,EACb;AACF,eAAa,QAAQ,WAAW,SAAS,GAAG,KAAK,UAAU,SAAS,CAAC;AACvE;AAEA,IAAI,WAAW;AACR,SAAS,cAAsB;AACpC,SAAO,SAAS,EAAE,QAAQ,IAAI,KAAK,KAAK;AAC1C;AAEA,IAAI,YAAY;AAGT,SAAS,eAAuB;AACrC,SAAO,EAAE;AACX;AAGO,SAAS,QAAQ,QAA2B,SAAqC;AACtF,QAAM,SAAS,CAAC,GAAG,MAAM,EAAE,KAAK,CAAC,GAAG,MAAM,EAAE,SAAS,EAAE,MAAM;AAC7D,MAAI,SAAS;AACX,UAAM,MAAM,OAAO,UAAU,CAAC,MAAM,EAAE,OAAO,OAAO;AACpD,QAAI,OAAO,GAAG;AACZ,YAAM,CAAC,IAAI,IAAI,OAAO,OAAO,KAAK,CAAC;AACnC,UAAI,KAAM,QAAO,KAAK,IAAI;AAAA,IAC5B;AAAA,EACF;AACA,SAAO,OAAO,IAAI,CAAC,GAAG,OAAO,EAAE,GAAG,GAAG,QAAQ,SAAS,EAAA,EAAI;AAC5D;"}
|
package/dist/data/ai/index.d.ts
CHANGED
|
@@ -12,10 +12,13 @@ export type { SpecSectionId } from './SpecRuntimeEditor/types';
|
|
|
12
12
|
export { buildAISpecRuntimePayload, compactAISpecRuntime, SPEC_CHECKOUT_MODES, SPEC_COMMIT_CONDITIONS, SPEC_COMMIT_GATES, SPEC_COMMIT_MODES, SPEC_COMMIT_PHASES, SPEC_COMMIT_STAGES, SPEC_PERMISSION_MODES, SPEC_SCHEMA_STRICTNESS, SPEC_STASH_MODES, SPEC_VERIFY_SCOPES, SPEC_WORKTREE_MODES, type AISpecRuntimeBudget, type AISpecRuntimeEnvVar, type AISpecRuntimeEnvVarSource, type AISpecRuntimeModelFallback, type AISpecRuntimeCommit, type AISpecRuntimeVerify, type AISpecRuntimeWorkflow, type AISpecRuntimeMemory, type AISpecRuntimeMCPPermissions, type AISpecRuntimePermissionCatalog, type AISpecRuntimePermissionCatalogItem, type AISpecRuntimePayload, type AISpecRuntimePermissions, type AISpecRuntimePrompt, type AISpecRuntimeResourcePolicies, type AISpecRuntimeSetup, type AISpecRuntimeSpec, type AISpecRuntimeToolPolicies, type SpecCheckoutMode, type SpecCommitCondition, type SpecCommitGates, type SpecCommitMode, type SpecCommitPhase, type SpecCommitStage, type SpecPermissionMode, type SpecResourceMode, type SpecSchemaStrictness, type SpecStashMode, type SpecToolPolicy, type SpecVerifyScope, type SpecWorktreeMode, normalizeMCPPermissions, normalizeResourcePolicies, normalizeToolPolicies, } from './SpecRuntimeEditor.model';
|
|
13
13
|
export { PromptPickerField, PromptSourceRepair, SpecEditorDialog, isValidPromptSpecDetail, promptPreviewText, promptRuntimeValueToPayload, specToPromptRuntimeValue, type InvalidPromptSpecDetail, type PromptPickerFieldProps, type PromptPickerValue, type PromptSourceRepairProps, type PromptSpecDetail, type PromptSpecSavePayload, type SpecEditorDialogProps, type ValidPromptSpecDetail, } from './PromptPicker';
|
|
14
14
|
export { PromptRunEditor, type PromptRunEditorProps } from './PromptRunEditor';
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
15
|
+
export type { AIPromptRunSpec, AIPromptRunValue, AISpecRuntimeModel, } from './PromptRunEditor/model';
|
|
16
|
+
export { effortOptionsForModel, reconcileModelCapabilities, type ModelRuntimeSelection, } from '../runtime/model-capabilities';
|
|
17
|
+
export { RuntimeBar, type RuntimeBarProps, type RuntimeBarValue, } from '../runtime/RuntimeBar';
|
|
18
|
+
export { ProviderStatusPanel, type ProviderStatusPanelProps, } from '../runtime/ProviderStatusPanel';
|
|
17
19
|
export { RuntimeModePicker, type RuntimeModePickerProps, } from './RuntimeModePicker';
|
|
18
|
-
export { SPEC_RUNTIME_FAMILIES, backendForFamilyMode, familiesFromRuntimeCatalog, familyById, familyForBackend, labelForBackend, modeForBackend, modelBelongsToFamily, modelsForFamily, runtimeModeOptions, selectionForBackend, type RuntimeCatalogFamily, type RuntimeCatalogMode, type SpecRuntimeFamily, type SpecRuntimeModeOption, } from '
|
|
20
|
+
export { SPEC_RUNTIME_FAMILIES, backendForFamilyMode, familiesFromRuntimeCatalog, familyById, familyForBackend, labelForBackend, modeForBackend, modelBelongsToFamily, modelsForFamily, runtimeModeOptions, selectionForBackend, type RuntimeCatalogFamily, type RuntimeCatalogMode, type SpecRuntimeFamily, type SpecRuntimeModeOption, } from '../runtime/runtime-mode';
|
|
21
|
+
export type { RuntimeAvailability, RuntimeAvailabilityState, } from '../chat/types';
|
|
19
22
|
export { ContextMeter, type ContextMeterProps, type ContextMeterMode, type ContextMeterTokens, type ContextMeterCost, type ContextMeterBudget, } from '../chat/ContextMeter';
|
|
20
23
|
export { SessionContextMeter } from './SessionViewer.header';
|
|
21
24
|
export { serializeContext, parseContextPrefix, makeContextId, type ChatContextItem, type ContextTypeConfig, type ContextTypeStyle, } from './context';
|
|
@@ -25,6 +28,7 @@ export { SessionChatComposer, type SessionChatCapabilities, type SessionChatComp
|
|
|
25
28
|
export type { SessionCollectionInput, SessionCollectionItem, SessionCollectionSummary, SessionInspectorInput, } from './SessionInspector.collection';
|
|
26
29
|
export { compactTokens, costTotal, formatCost, tokenTotal, } from './session-cost';
|
|
27
30
|
export { AGENT_RUNTIME_ICONS, APPROVAL_ICONS, EFFORT_ICONS, PERMISSION_MODE_ICONS, WORKFLOW_PHASES, effortIcon, type AgentActionMeta, type AgentRuntime, type ApprovalState, type EffortLevel, type WorkflowPhase, } from './agent-action-icons';
|
|
31
|
+
export { SESSION_TONES, sessionTone, type SessionToneClasses, } from './session-tones';
|
|
28
32
|
export { getSessionMetadata, getSessionAction, normalizeSession, normalizeMessages, splitMcpTool, summarizeSession, type SessionActionMeta, type SessionEventKind, type SessionMetadataSummary, type SessionToolUse, type SessionMessage, type SessionContent, type SessionTone, } from './SessionViewer.model';
|
|
29
33
|
export { type SessionUIMessage, type SessionUIPart, type SessionProvenance, type SessionAgent, type SessionApproval, type SessionApprovalStats, type SessionBudget, type SessionCapabilities, type SessionChangedFiles, type SessionCost, type SessionContext, type SessionDenial, type SessionGitState, type SessionHealth, type SessionLiveProcess, type SessionMetadataEvent, type SessionPlan, type SessionPlanEvent, type SessionTurn, type SessionUsage, type UnifiedSessionInput, } from './SessionViewer.unified';
|
|
30
34
|
export { CLAUDE_COMPLETE_SESSION, CLAUDE_SESSION_EXAMPLE, CODEX_COMPLETE_SESSION, CODEX_SESSION_EXAMPLE, COMPLETE_EXAMPLE_SESSIONS, EXAMPLE_SESSIONS, } from './examples/sessions';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/data/ai/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,yBAAyB,EACzB,KAAK,8BAA8B,GACpC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACpB,KAAK,aAAa,GACnB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,UAAU,EACV,eAAe,EACf,KAAK,eAAe,EACpB,KAAK,4BAA4B,GAClC,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EACL,YAAY,EACZ,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,YAAY,GAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,KAAK,kBAAkB,GACxB,MAAM,iBAAiB,CAAC;AAC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AAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,uBAAuB,EACvB,yBAAyB,EACzB,qBAAqB,GACtB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,EACvB,iBAAiB,EACjB,2BAA2B,EAC3B,wBAAwB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,GAC3B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EACL,qBAAqB,EACrB,0BAA0B,EAC1B,KAAK,qBAAqB,GAC3B,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/data/ai/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,yBAAyB,EACzB,KAAK,8BAA8B,GACpC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACpB,KAAK,aAAa,GACnB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,UAAU,EACV,eAAe,EACf,KAAK,eAAe,EACpB,KAAK,4BAA4B,GAClC,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EACL,YAAY,EACZ,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,YAAY,GAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,aAAa,EACb,qBAAqB,EAC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AiB,GACvB,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const SESSION_TONES = {
|
|
4
|
+
sky: {
|
|
5
|
+
text: "text-sky-700 [[data-theme=dark]_&]:text-sky-400",
|
|
6
|
+
disc: "bg-sky-100 text-sky-700 [[data-theme=dark]_&]:bg-sky-500/15 [[data-theme=dark]_&]:text-sky-300",
|
|
7
|
+
border: "border-sky-500 [[data-theme=dark]_&]:border-sky-400"
|
|
8
|
+
},
|
|
9
|
+
amber: {
|
|
10
|
+
text: "text-amber-700 [[data-theme=dark]_&]:text-amber-400",
|
|
11
|
+
disc: "bg-amber-100 text-amber-700 [[data-theme=dark]_&]:bg-amber-500/15 [[data-theme=dark]_&]:text-amber-300",
|
|
12
|
+
border: "border-amber-500 [[data-theme=dark]_&]:border-amber-400"
|
|
13
|
+
},
|
|
14
|
+
violet: {
|
|
15
|
+
text: "text-violet-700 [[data-theme=dark]_&]:text-violet-400",
|
|
16
|
+
disc: "bg-violet-100 text-violet-700 [[data-theme=dark]_&]:bg-violet-500/15 [[data-theme=dark]_&]:text-violet-300",
|
|
17
|
+
border: "border-violet-500 [[data-theme=dark]_&]:border-violet-400"
|
|
18
|
+
},
|
|
19
|
+
emerald: {
|
|
20
|
+
text: "text-emerald-700 [[data-theme=dark]_&]:text-emerald-400",
|
|
21
|
+
disc: "bg-emerald-100 text-emerald-700 [[data-theme=dark]_&]:bg-emerald-500/15 [[data-theme=dark]_&]:text-emerald-300",
|
|
22
|
+
border: "border-emerald-500 [[data-theme=dark]_&]:border-emerald-400"
|
|
23
|
+
},
|
|
24
|
+
teal: {
|
|
25
|
+
text: "text-teal-700 [[data-theme=dark]_&]:text-teal-400",
|
|
26
|
+
disc: "bg-teal-100 text-teal-700 [[data-theme=dark]_&]:bg-teal-500/15 [[data-theme=dark]_&]:text-teal-300",
|
|
27
|
+
border: "border-teal-500 [[data-theme=dark]_&]:border-teal-400"
|
|
28
|
+
},
|
|
29
|
+
orange: {
|
|
30
|
+
text: "text-orange-700 [[data-theme=dark]_&]:text-orange-400",
|
|
31
|
+
disc: "bg-orange-100 text-orange-700 [[data-theme=dark]_&]:bg-orange-500/15 [[data-theme=dark]_&]:text-orange-300",
|
|
32
|
+
border: "border-orange-500 [[data-theme=dark]_&]:border-orange-400"
|
|
33
|
+
},
|
|
34
|
+
rose: {
|
|
35
|
+
text: "text-rose-700 [[data-theme=dark]_&]:text-rose-400",
|
|
36
|
+
disc: "bg-rose-100 text-rose-700 [[data-theme=dark]_&]:bg-rose-500/15 [[data-theme=dark]_&]:text-rose-300",
|
|
37
|
+
border: "border-rose-500 [[data-theme=dark]_&]:border-rose-400"
|
|
38
|
+
},
|
|
39
|
+
indigo: {
|
|
40
|
+
text: "text-indigo-700 [[data-theme=dark]_&]:text-indigo-400",
|
|
41
|
+
disc: "bg-indigo-100 text-indigo-700 [[data-theme=dark]_&]:bg-indigo-500/15 [[data-theme=dark]_&]:text-indigo-300",
|
|
42
|
+
border: "border-indigo-500 [[data-theme=dark]_&]:border-indigo-400"
|
|
43
|
+
},
|
|
44
|
+
fuchsia: {
|
|
45
|
+
text: "text-fuchsia-700 [[data-theme=dark]_&]:text-fuchsia-400",
|
|
46
|
+
disc: "bg-fuchsia-100 text-fuchsia-700 [[data-theme=dark]_&]:bg-fuchsia-500/15 [[data-theme=dark]_&]:text-fuchsia-300",
|
|
47
|
+
border: "border-fuchsia-500 [[data-theme=dark]_&]:border-fuchsia-400"
|
|
48
|
+
},
|
|
49
|
+
pink: {
|
|
50
|
+
text: "text-pink-700 [[data-theme=dark]_&]:text-pink-400",
|
|
51
|
+
disc: "bg-pink-100 text-pink-700 [[data-theme=dark]_&]:bg-pink-500/15 [[data-theme=dark]_&]:text-pink-300",
|
|
52
|
+
border: "border-pink-500 [[data-theme=dark]_&]:border-pink-400"
|
|
53
|
+
},
|
|
54
|
+
slate: {
|
|
55
|
+
// Slate is the "no particular category" tone, so it uses the theme's own
|
|
56
|
+
// neutral tokens rather than a fixed grey that would fight the surface.
|
|
57
|
+
text: "text-muted-foreground",
|
|
58
|
+
disc: "bg-muted text-muted-foreground",
|
|
59
|
+
border: "border-border"
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
function sessionTone(tone) {
|
|
63
|
+
return SESSION_TONES[tone];
|
|
64
|
+
}
|
|
65
|
+
exports.SESSION_TONES = SESSION_TONES;
|
|
66
|
+
exports.sessionTone = sessionTone;
|
|
67
|
+
//# sourceMappingURL=session-tones.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-tones.cjs","sources":["../../../src/data/ai/session-tones.ts"],"sourcesContent":["import type { SessionTone } from \"./SessionViewer.model\";\n\n/**\n * `SessionTone` → the class bundles consumers need to render one.\n *\n * The tones themselves are assigned by the Agent Action Icons set\n * (`WORKFLOW_PHASES`, `EFFORT_ICONS`, `AGENT_RUNTIME_ICONS`) and by the session\n * viewer's own per-tool `ACTIONS` map. Those give a caller a tone *name*; this\n * turns it into classes, so a \"plan\" chip in an app header and a plan row in\n * `SessionViewer` are visibly the same thing rather than two guesses at sky.\n *\n * Two treatments, because they are not interchangeable:\n *\n * - `text` is a glyph on the page background, and pairs `-700` light with\n * `-400` dark. This is what `EFFORT_LEVEL_COLOR` uses for the same job.\n * - `disc` is a filled circle or chip, and pairs a `-100` / `-500/15` fill with\n * `-700` / `-300` text. The lighter `-300` is legible *on that fill* and reads\n * washed out without it, which is why `text` does not simply reuse it.\n *\n * Every class is a literal so Tailwind's scanner sees it, and dark mode keys off\n * the `data-theme` attribute rather than the `dark:` variant — the same rules\n * `EFFORT_LEVEL_COLOR` already follows.\n */\nexport interface SessionToneClasses {\n /** Glyph colour on the page background. */\n text: string;\n /** Filled disc or chip: background plus its own legible foreground. */\n disc: string;\n /** Border colour, for outlined chips and nodes. */\n border: string;\n}\n\nexport const SESSION_TONES: Record<SessionTone, SessionToneClasses> = {\n sky: {\n text: \"text-sky-700 [[data-theme=dark]_&]:text-sky-400\",\n disc: \"bg-sky-100 text-sky-700 [[data-theme=dark]_&]:bg-sky-500/15 [[data-theme=dark]_&]:text-sky-300\",\n border: \"border-sky-500 [[data-theme=dark]_&]:border-sky-400\",\n },\n amber: {\n text: \"text-amber-700 [[data-theme=dark]_&]:text-amber-400\",\n disc: \"bg-amber-100 text-amber-700 [[data-theme=dark]_&]:bg-amber-500/15 [[data-theme=dark]_&]:text-amber-300\",\n border: \"border-amber-500 [[data-theme=dark]_&]:border-amber-400\",\n },\n violet: {\n text: \"text-violet-700 [[data-theme=dark]_&]:text-violet-400\",\n disc: \"bg-violet-100 text-violet-700 [[data-theme=dark]_&]:bg-violet-500/15 [[data-theme=dark]_&]:text-violet-300\",\n border: \"border-violet-500 [[data-theme=dark]_&]:border-violet-400\",\n },\n emerald: {\n text: \"text-emerald-700 [[data-theme=dark]_&]:text-emerald-400\",\n disc: \"bg-emerald-100 text-emerald-700 [[data-theme=dark]_&]:bg-emerald-500/15 [[data-theme=dark]_&]:text-emerald-300\",\n border: \"border-emerald-500 [[data-theme=dark]_&]:border-emerald-400\",\n },\n teal: {\n text: \"text-teal-700 [[data-theme=dark]_&]:text-teal-400\",\n disc: \"bg-teal-100 text-teal-700 [[data-theme=dark]_&]:bg-teal-500/15 [[data-theme=dark]_&]:text-teal-300\",\n border: \"border-teal-500 [[data-theme=dark]_&]:border-teal-400\",\n },\n orange: {\n text: \"text-orange-700 [[data-theme=dark]_&]:text-orange-400\",\n disc: \"bg-orange-100 text-orange-700 [[data-theme=dark]_&]:bg-orange-500/15 [[data-theme=dark]_&]:text-orange-300\",\n border: \"border-orange-500 [[data-theme=dark]_&]:border-orange-400\",\n },\n rose: {\n text: \"text-rose-700 [[data-theme=dark]_&]:text-rose-400\",\n disc: \"bg-rose-100 text-rose-700 [[data-theme=dark]_&]:bg-rose-500/15 [[data-theme=dark]_&]:text-rose-300\",\n border: \"border-rose-500 [[data-theme=dark]_&]:border-rose-400\",\n },\n indigo: {\n text: \"text-indigo-700 [[data-theme=dark]_&]:text-indigo-400\",\n disc: \"bg-indigo-100 text-indigo-700 [[data-theme=dark]_&]:bg-indigo-500/15 [[data-theme=dark]_&]:text-indigo-300\",\n border: \"border-indigo-500 [[data-theme=dark]_&]:border-indigo-400\",\n },\n fuchsia: {\n text: \"text-fuchsia-700 [[data-theme=dark]_&]:text-fuchsia-400\",\n disc: \"bg-fuchsia-100 text-fuchsia-700 [[data-theme=dark]_&]:bg-fuchsia-500/15 [[data-theme=dark]_&]:text-fuchsia-300\",\n border: \"border-fuchsia-500 [[data-theme=dark]_&]:border-fuchsia-400\",\n },\n pink: {\n text: \"text-pink-700 [[data-theme=dark]_&]:text-pink-400\",\n disc: \"bg-pink-100 text-pink-700 [[data-theme=dark]_&]:bg-pink-500/15 [[data-theme=dark]_&]:text-pink-300\",\n border: \"border-pink-500 [[data-theme=dark]_&]:border-pink-400\",\n },\n slate: {\n // Slate is the \"no particular category\" tone, so it uses the theme's own\n // neutral tokens rather than a fixed grey that would fight the surface.\n text: \"text-muted-foreground\",\n disc: \"bg-muted text-muted-foreground\",\n border: \"border-border\",\n },\n};\n\n/** Class bundle for a tone. */\nexport function sessionTone(tone: SessionTone): SessionToneClasses {\n return SESSION_TONES[tone];\n}\n"],"names":[],"mappings":";;AAgCO,MAAM,gBAAyD;AAAA,EACpE,KAAK;AAAA,IACH,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA;AAAA,EAEV,OAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA;AAAA,EAEV,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA;AAAA,EAEV,SAAS;AAAA,IACP,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA;AAAA,EAEV,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA;AAAA,EAEV,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA;AAAA,EAEV,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA;AAAA,EAEV,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA;AAAA,EAEV,SAAS;AAAA,IACP,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA;AAAA,EAEV,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA;AAAA,EAEV,OAAO;AAAA;AAAA;AAAA,IAGL,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA;AAEZ;AAGO,SAAS,YAAY,MAAuC;AACjE,SAAO,cAAc,IAAI;AAC3B;;;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { SessionTone } from './SessionViewer.model';
|
|
2
|
+
/**
|
|
3
|
+
* `SessionTone` → the class bundles consumers need to render one.
|
|
4
|
+
*
|
|
5
|
+
* The tones themselves are assigned by the Agent Action Icons set
|
|
6
|
+
* (`WORKFLOW_PHASES`, `EFFORT_ICONS`, `AGENT_RUNTIME_ICONS`) and by the session
|
|
7
|
+
* viewer's own per-tool `ACTIONS` map. Those give a caller a tone *name*; this
|
|
8
|
+
* turns it into classes, so a "plan" chip in an app header and a plan row in
|
|
9
|
+
* `SessionViewer` are visibly the same thing rather than two guesses at sky.
|
|
10
|
+
*
|
|
11
|
+
* Two treatments, because they are not interchangeable:
|
|
12
|
+
*
|
|
13
|
+
* - `text` is a glyph on the page background, and pairs `-700` light with
|
|
14
|
+
* `-400` dark. This is what `EFFORT_LEVEL_COLOR` uses for the same job.
|
|
15
|
+
* - `disc` is a filled circle or chip, and pairs a `-100` / `-500/15` fill with
|
|
16
|
+
* `-700` / `-300` text. The lighter `-300` is legible *on that fill* and reads
|
|
17
|
+
* washed out without it, which is why `text` does not simply reuse it.
|
|
18
|
+
*
|
|
19
|
+
* Every class is a literal so Tailwind's scanner sees it, and dark mode keys off
|
|
20
|
+
* the `data-theme` attribute rather than the `dark:` variant — the same rules
|
|
21
|
+
* `EFFORT_LEVEL_COLOR` already follows.
|
|
22
|
+
*/
|
|
23
|
+
export interface SessionToneClasses {
|
|
24
|
+
/** Glyph colour on the page background. */
|
|
25
|
+
text: string;
|
|
26
|
+
/** Filled disc or chip: background plus its own legible foreground. */
|
|
27
|
+
disc: string;
|
|
28
|
+
/** Border colour, for outlined chips and nodes. */
|
|
29
|
+
border: string;
|
|
30
|
+
}
|
|
31
|
+
export declare const SESSION_TONES: Record<SessionTone, SessionToneClasses>;
|
|
32
|
+
/** Class bundle for a tone. */
|
|
33
|
+
export declare function sessionTone(tone: SessionTone): SessionToneClasses;
|
|
34
|
+
//# sourceMappingURL=session-tones.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-tones.d.ts","sourceRoot":"","sources":["../../../src/data/ai/session-tones.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,WAAW,kBAAkB;IACjC,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,uEAAuE;IACvE,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,WAAW,EAAE,kBAAkB,CA0DjE,CAAC;AAEF,+BAA+B;AAC/B,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,GAAG,kBAAkB,CAEjE"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
const SESSION_TONES = {
|
|
2
|
+
sky: {
|
|
3
|
+
text: "text-sky-700 [[data-theme=dark]_&]:text-sky-400",
|
|
4
|
+
disc: "bg-sky-100 text-sky-700 [[data-theme=dark]_&]:bg-sky-500/15 [[data-theme=dark]_&]:text-sky-300",
|
|
5
|
+
border: "border-sky-500 [[data-theme=dark]_&]:border-sky-400"
|
|
6
|
+
},
|
|
7
|
+
amber: {
|
|
8
|
+
text: "text-amber-700 [[data-theme=dark]_&]:text-amber-400",
|
|
9
|
+
disc: "bg-amber-100 text-amber-700 [[data-theme=dark]_&]:bg-amber-500/15 [[data-theme=dark]_&]:text-amber-300",
|
|
10
|
+
border: "border-amber-500 [[data-theme=dark]_&]:border-amber-400"
|
|
11
|
+
},
|
|
12
|
+
violet: {
|
|
13
|
+
text: "text-violet-700 [[data-theme=dark]_&]:text-violet-400",
|
|
14
|
+
disc: "bg-violet-100 text-violet-700 [[data-theme=dark]_&]:bg-violet-500/15 [[data-theme=dark]_&]:text-violet-300",
|
|
15
|
+
border: "border-violet-500 [[data-theme=dark]_&]:border-violet-400"
|
|
16
|
+
},
|
|
17
|
+
emerald: {
|
|
18
|
+
text: "text-emerald-700 [[data-theme=dark]_&]:text-emerald-400",
|
|
19
|
+
disc: "bg-emerald-100 text-emerald-700 [[data-theme=dark]_&]:bg-emerald-500/15 [[data-theme=dark]_&]:text-emerald-300",
|
|
20
|
+
border: "border-emerald-500 [[data-theme=dark]_&]:border-emerald-400"
|
|
21
|
+
},
|
|
22
|
+
teal: {
|
|
23
|
+
text: "text-teal-700 [[data-theme=dark]_&]:text-teal-400",
|
|
24
|
+
disc: "bg-teal-100 text-teal-700 [[data-theme=dark]_&]:bg-teal-500/15 [[data-theme=dark]_&]:text-teal-300",
|
|
25
|
+
border: "border-teal-500 [[data-theme=dark]_&]:border-teal-400"
|
|
26
|
+
},
|
|
27
|
+
orange: {
|
|
28
|
+
text: "text-orange-700 [[data-theme=dark]_&]:text-orange-400",
|
|
29
|
+
disc: "bg-orange-100 text-orange-700 [[data-theme=dark]_&]:bg-orange-500/15 [[data-theme=dark]_&]:text-orange-300",
|
|
30
|
+
border: "border-orange-500 [[data-theme=dark]_&]:border-orange-400"
|
|
31
|
+
},
|
|
32
|
+
rose: {
|
|
33
|
+
text: "text-rose-700 [[data-theme=dark]_&]:text-rose-400",
|
|
34
|
+
disc: "bg-rose-100 text-rose-700 [[data-theme=dark]_&]:bg-rose-500/15 [[data-theme=dark]_&]:text-rose-300",
|
|
35
|
+
border: "border-rose-500 [[data-theme=dark]_&]:border-rose-400"
|
|
36
|
+
},
|
|
37
|
+
indigo: {
|
|
38
|
+
text: "text-indigo-700 [[data-theme=dark]_&]:text-indigo-400",
|
|
39
|
+
disc: "bg-indigo-100 text-indigo-700 [[data-theme=dark]_&]:bg-indigo-500/15 [[data-theme=dark]_&]:text-indigo-300",
|
|
40
|
+
border: "border-indigo-500 [[data-theme=dark]_&]:border-indigo-400"
|
|
41
|
+
},
|
|
42
|
+
fuchsia: {
|
|
43
|
+
text: "text-fuchsia-700 [[data-theme=dark]_&]:text-fuchsia-400",
|
|
44
|
+
disc: "bg-fuchsia-100 text-fuchsia-700 [[data-theme=dark]_&]:bg-fuchsia-500/15 [[data-theme=dark]_&]:text-fuchsia-300",
|
|
45
|
+
border: "border-fuchsia-500 [[data-theme=dark]_&]:border-fuchsia-400"
|
|
46
|
+
},
|
|
47
|
+
pink: {
|
|
48
|
+
text: "text-pink-700 [[data-theme=dark]_&]:text-pink-400",
|
|
49
|
+
disc: "bg-pink-100 text-pink-700 [[data-theme=dark]_&]:bg-pink-500/15 [[data-theme=dark]_&]:text-pink-300",
|
|
50
|
+
border: "border-pink-500 [[data-theme=dark]_&]:border-pink-400"
|
|
51
|
+
},
|
|
52
|
+
slate: {
|
|
53
|
+
// Slate is the "no particular category" tone, so it uses the theme's own
|
|
54
|
+
// neutral tokens rather than a fixed grey that would fight the surface.
|
|
55
|
+
text: "text-muted-foreground",
|
|
56
|
+
disc: "bg-muted text-muted-foreground",
|
|
57
|
+
border: "border-border"
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
function sessionTone(tone) {
|
|
61
|
+
return SESSION_TONES[tone];
|
|
62
|
+
}
|
|
63
|
+
export {
|
|
64
|
+
SESSION_TONES,
|
|
65
|
+
sessionTone
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=session-tones.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-tones.js","sources":["../../../src/data/ai/session-tones.ts"],"sourcesContent":["import type { SessionTone } from \"./SessionViewer.model\";\n\n/**\n * `SessionTone` → the class bundles consumers need to render one.\n *\n * The tones themselves are assigned by the Agent Action Icons set\n * (`WORKFLOW_PHASES`, `EFFORT_ICONS`, `AGENT_RUNTIME_ICONS`) and by the session\n * viewer's own per-tool `ACTIONS` map. Those give a caller a tone *name*; this\n * turns it into classes, so a \"plan\" chip in an app header and a plan row in\n * `SessionViewer` are visibly the same thing rather than two guesses at sky.\n *\n * Two treatments, because they are not interchangeable:\n *\n * - `text` is a glyph on the page background, and pairs `-700` light with\n * `-400` dark. This is what `EFFORT_LEVEL_COLOR` uses for the same job.\n * - `disc` is a filled circle or chip, and pairs a `-100` / `-500/15` fill with\n * `-700` / `-300` text. The lighter `-300` is legible *on that fill* and reads\n * washed out without it, which is why `text` does not simply reuse it.\n *\n * Every class is a literal so Tailwind's scanner sees it, and dark mode keys off\n * the `data-theme` attribute rather than the `dark:` variant — the same rules\n * `EFFORT_LEVEL_COLOR` already follows.\n */\nexport interface SessionToneClasses {\n /** Glyph colour on the page background. */\n text: string;\n /** Filled disc or chip: background plus its own legible foreground. */\n disc: string;\n /** Border colour, for outlined chips and nodes. */\n border: string;\n}\n\nexport const SESSION_TONES: Record<SessionTone, SessionToneClasses> = {\n sky: {\n text: \"text-sky-700 [[data-theme=dark]_&]:text-sky-400\",\n disc: \"bg-sky-100 text-sky-700 [[data-theme=dark]_&]:bg-sky-500/15 [[data-theme=dark]_&]:text-sky-300\",\n border: \"border-sky-500 [[data-theme=dark]_&]:border-sky-400\",\n },\n amber: {\n text: \"text-amber-700 [[data-theme=dark]_&]:text-amber-400\",\n disc: \"bg-amber-100 text-amber-700 [[data-theme=dark]_&]:bg-amber-500/15 [[data-theme=dark]_&]:text-amber-300\",\n border: \"border-amber-500 [[data-theme=dark]_&]:border-amber-400\",\n },\n violet: {\n text: \"text-violet-700 [[data-theme=dark]_&]:text-violet-400\",\n disc: \"bg-violet-100 text-violet-700 [[data-theme=dark]_&]:bg-violet-500/15 [[data-theme=dark]_&]:text-violet-300\",\n border: \"border-violet-500 [[data-theme=dark]_&]:border-violet-400\",\n },\n emerald: {\n text: \"text-emerald-700 [[data-theme=dark]_&]:text-emerald-400\",\n disc: \"bg-emerald-100 text-emerald-700 [[data-theme=dark]_&]:bg-emerald-500/15 [[data-theme=dark]_&]:text-emerald-300\",\n border: \"border-emerald-500 [[data-theme=dark]_&]:border-emerald-400\",\n },\n teal: {\n text: \"text-teal-700 [[data-theme=dark]_&]:text-teal-400\",\n disc: \"bg-teal-100 text-teal-700 [[data-theme=dark]_&]:bg-teal-500/15 [[data-theme=dark]_&]:text-teal-300\",\n border: \"border-teal-500 [[data-theme=dark]_&]:border-teal-400\",\n },\n orange: {\n text: \"text-orange-700 [[data-theme=dark]_&]:text-orange-400\",\n disc: \"bg-orange-100 text-orange-700 [[data-theme=dark]_&]:bg-orange-500/15 [[data-theme=dark]_&]:text-orange-300\",\n border: \"border-orange-500 [[data-theme=dark]_&]:border-orange-400\",\n },\n rose: {\n text: \"text-rose-700 [[data-theme=dark]_&]:text-rose-400\",\n disc: \"bg-rose-100 text-rose-700 [[data-theme=dark]_&]:bg-rose-500/15 [[data-theme=dark]_&]:text-rose-300\",\n border: \"border-rose-500 [[data-theme=dark]_&]:border-rose-400\",\n },\n indigo: {\n text: \"text-indigo-700 [[data-theme=dark]_&]:text-indigo-400\",\n disc: \"bg-indigo-100 text-indigo-700 [[data-theme=dark]_&]:bg-indigo-500/15 [[data-theme=dark]_&]:text-indigo-300\",\n border: \"border-indigo-500 [[data-theme=dark]_&]:border-indigo-400\",\n },\n fuchsia: {\n text: \"text-fuchsia-700 [[data-theme=dark]_&]:text-fuchsia-400\",\n disc: \"bg-fuchsia-100 text-fuchsia-700 [[data-theme=dark]_&]:bg-fuchsia-500/15 [[data-theme=dark]_&]:text-fuchsia-300\",\n border: \"border-fuchsia-500 [[data-theme=dark]_&]:border-fuchsia-400\",\n },\n pink: {\n text: \"text-pink-700 [[data-theme=dark]_&]:text-pink-400\",\n disc: \"bg-pink-100 text-pink-700 [[data-theme=dark]_&]:bg-pink-500/15 [[data-theme=dark]_&]:text-pink-300\",\n border: \"border-pink-500 [[data-theme=dark]_&]:border-pink-400\",\n },\n slate: {\n // Slate is the \"no particular category\" tone, so it uses the theme's own\n // neutral tokens rather than a fixed grey that would fight the surface.\n text: \"text-muted-foreground\",\n disc: \"bg-muted text-muted-foreground\",\n border: \"border-border\",\n },\n};\n\n/** Class bundle for a tone. */\nexport function sessionTone(tone: SessionTone): SessionToneClasses {\n return SESSION_TONES[tone];\n}\n"],"names":[],"mappings":"AAgCO,MAAM,gBAAyD;AAAA,EACpE,KAAK;AAAA,IACH,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA;AAAA,EAEV,OAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA;AAAA,EAEV,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA;AAAA,EAEV,SAAS;AAAA,IACP,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA;AAAA,EAEV,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA;AAAA,EAEV,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA;AAAA,EAEV,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA;AAAA,EAEV,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA;AAAA,EAEV,SAAS;AAAA,IACP,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA;AAAA,EAEV,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA;AAAA,EAEV,OAAO;AAAA;AAAA;AAAA,IAGL,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA;AAEZ;AAGO,SAAS,YAAY,MAAuC;AACjE,SAAO,cAAc,IAAI;AAC3B;"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
function hasAgentBreakdown(costs) {
|
|
4
|
+
var _a;
|
|
5
|
+
return (((_a = costs.byAgent) == null ? void 0 : _a.length) ?? 0) > 1;
|
|
6
|
+
}
|
|
7
|
+
function groupCostsByAgent(costs) {
|
|
8
|
+
const rows = costs.byModel ?? [];
|
|
9
|
+
if (!hasAgentBreakdown(costs)) return [{ agent: void 0, rows }];
|
|
10
|
+
const bySession = /* @__PURE__ */ new Map();
|
|
11
|
+
for (const row of rows) {
|
|
12
|
+
const bucket = bySession.get(row.sessionId);
|
|
13
|
+
if (bucket) bucket.push(row);
|
|
14
|
+
else bySession.set(row.sessionId, [row]);
|
|
15
|
+
}
|
|
16
|
+
const groups = [];
|
|
17
|
+
for (const agent of costs.byAgent) {
|
|
18
|
+
const sessionRows = bySession.get(agent.sessionId);
|
|
19
|
+
if (!(sessionRows == null ? void 0 : sessionRows.length)) continue;
|
|
20
|
+
bySession.delete(agent.sessionId);
|
|
21
|
+
groups.push({ agent, rows: sessionRows });
|
|
22
|
+
}
|
|
23
|
+
for (const [sessionId, sessionRows] of bySession) {
|
|
24
|
+
groups.push({
|
|
25
|
+
agent: { id: sessionId, sessionId, isRoot: false },
|
|
26
|
+
rows: sessionRows
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
return groups;
|
|
30
|
+
}
|
|
31
|
+
function agentLabel(agent) {
|
|
32
|
+
var _a, _b;
|
|
33
|
+
if (agent.isRoot) return "Main conversation";
|
|
34
|
+
return ((_a = agent.description) == null ? void 0 : _a.trim()) || ((_b = agent.agentType) == null ? void 0 : _b.trim()) || `Subagent ${agent.sessionId.slice(0, 8)}`;
|
|
35
|
+
}
|
|
36
|
+
exports.agentLabel = agentLabel;
|
|
37
|
+
exports.groupCostsByAgent = groupCostsByAgent;
|
|
38
|
+
exports.hasAgentBreakdown = hasAgentBreakdown;
|
|
39
|
+
//# sourceMappingURL=thread-costs.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thread-costs.cjs","sources":["../../../src/data/ai/thread-costs.ts"],"sourcesContent":["// Types and pure grouping for the thread cost breakdown served by\n// GET <costsApi>/{threadId}/costs. Kept free of React so the grouping rules can\n// be unit-tested directly.\n\n/** One (sub-session × model × backend × effort) row of spend. */\nexport interface ThreadCostModel {\n id: string;\n sessionId: string;\n model: string;\n backend: string;\n effort?: string;\n currency: string;\n modelCallCount: number;\n inputTokens: number;\n outputTokens: number;\n reasoningTokens: number;\n cacheReadTokens: number;\n cacheWriteTokens: number;\n totalTokens: number;\n inputCost: number;\n outputCost: number;\n reasoningCost: number;\n cacheReadCost: number;\n cacheWriteCost: number;\n /** Resolved total: the provider's billed figure when it reported one, else\n * the sum of the list-price buckets. */\n totalCost: number;\n}\n\n/** One session in the thread: the root, plus a row per subagent. */\nexport interface ThreadCostAgent {\n id: string;\n sessionId: string;\n parentSessionId?: string | null;\n isRoot: boolean;\n agentType?: string;\n description?: string;\n childCount?: number;\n totalTokens?: number;\n costUsd?: number;\n}\n\nexport interface ThreadCosts {\n threadId: string;\n totalCostUsd: number;\n byModel: ThreadCostModel[];\n byAgent: ThreadCostAgent[];\n}\n\nexport interface ThreadCostGroup {\n agent: ThreadCostAgent | undefined;\n rows: ThreadCostModel[];\n}\n\n/**\n * True when the thread actually has subagents. Chat threads are flat today, so\n * a single root row is the norm — grouping the table by it would present an\n * empty dimension as though it were data.\n */\nexport function hasAgentBreakdown(costs: ThreadCosts): boolean {\n return (costs.byAgent?.length ?? 0) > 1;\n}\n\n/**\n * Buckets model rows by their session. Falls back to one unlabelled group when\n * the thread has no subagent breakdown, so the panel renders a flat table.\n * Groups follow byAgent order (root first); any row whose session is missing\n * from byAgent still appears, under its own group, rather than vanishing.\n */\nexport function groupCostsByAgent(costs: ThreadCosts): ThreadCostGroup[] {\n const rows = costs.byModel ?? [];\n if (!hasAgentBreakdown(costs)) return [{ agent: undefined, rows }];\n\n const bySession = new Map<string, ThreadCostModel[]>();\n for (const row of rows) {\n const bucket = bySession.get(row.sessionId);\n if (bucket) bucket.push(row);\n else bySession.set(row.sessionId, [row]);\n }\n\n const groups: ThreadCostGroup[] = [];\n for (const agent of costs.byAgent) {\n const sessionRows = bySession.get(agent.sessionId);\n if (!sessionRows?.length) continue;\n bySession.delete(agent.sessionId);\n groups.push({ agent, rows: sessionRows });\n }\n for (const [sessionId, sessionRows] of bySession) {\n groups.push({\n agent: { id: sessionId, sessionId, isRoot: false },\n rows: sessionRows,\n });\n }\n return groups;\n}\n\n/** Display name for a session: its task description, then agent type, then id. */\nexport function agentLabel(agent: ThreadCostAgent): string {\n if (agent.isRoot) return \"Main conversation\";\n return (\n agent.description?.trim() ||\n agent.agentType?.trim() ||\n `Subagent ${agent.sessionId.slice(0, 8)}`\n );\n}\n"],"names":[],"mappings":";;AA2DO,SAAS,kBAAkB,OAA6B;;AAC7D,YAAQ,WAAM,YAAN,mBAAe,WAAU,KAAK;AACxC;AAQO,SAAS,kBAAkB,OAAuC;AACvE,QAAM,OAAO,MAAM,WAAW,CAAA;AAC9B,MAAI,CAAC,kBAAkB,KAAK,EAAG,QAAO,CAAC,EAAE,OAAO,QAAW,MAAM;AAEjE,QAAM,gCAAgB,IAAA;AACtB,aAAW,OAAO,MAAM;AACtB,UAAM,SAAS,UAAU,IAAI,IAAI,SAAS;AAC1C,QAAI,OAAQ,QAAO,KAAK,GAAG;AAAA,mBACZ,IAAI,IAAI,WAAW,CAAC,GAAG,CAAC;AAAA,EACzC;AAEA,QAAM,SAA4B,CAAA;AAClC,aAAW,SAAS,MAAM,SAAS;AACjC,UAAM,cAAc,UAAU,IAAI,MAAM,SAAS;AACjD,QAAI,EAAC,2CAAa,QAAQ;AAC1B,cAAU,OAAO,MAAM,SAAS;AAChC,WAAO,KAAK,EAAE,OAAO,MAAM,aAAa;AAAA,EAC1C;AACA,aAAW,CAAC,WAAW,WAAW,KAAK,WAAW;AAChD,WAAO,KAAK;AAAA,MACV,OAAO,EAAE,IAAI,WAAW,WAAW,QAAQ,MAAA;AAAA,MAC3C,MAAM;AAAA,IAAA,CACP;AAAA,EACH;AACA,SAAO;AACT;AAGO,SAAS,WAAW,OAAgC;;AACzD,MAAI,MAAM,OAAQ,QAAO;AACzB,WACE,WAAM,gBAAN,mBAAmB,aACnB,WAAM,cAAN,mBAAiB,WACjB,YAAY,MAAM,UAAU,MAAM,GAAG,CAAC,CAAC;AAE3C;;;;"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/** One (sub-session × model × backend × effort) row of spend. */
|
|
2
|
+
export interface ThreadCostModel {
|
|
3
|
+
id: string;
|
|
4
|
+
sessionId: string;
|
|
5
|
+
model: string;
|
|
6
|
+
backend: string;
|
|
7
|
+
effort?: string;
|
|
8
|
+
currency: string;
|
|
9
|
+
modelCallCount: number;
|
|
10
|
+
inputTokens: number;
|
|
11
|
+
outputTokens: number;
|
|
12
|
+
reasoningTokens: number;
|
|
13
|
+
cacheReadTokens: number;
|
|
14
|
+
cacheWriteTokens: number;
|
|
15
|
+
totalTokens: number;
|
|
16
|
+
inputCost: number;
|
|
17
|
+
outputCost: number;
|
|
18
|
+
reasoningCost: number;
|
|
19
|
+
cacheReadCost: number;
|
|
20
|
+
cacheWriteCost: number;
|
|
21
|
+
/** Resolved total: the provider's billed figure when it reported one, else
|
|
22
|
+
* the sum of the list-price buckets. */
|
|
23
|
+
totalCost: number;
|
|
24
|
+
}
|
|
25
|
+
/** One session in the thread: the root, plus a row per subagent. */
|
|
26
|
+
export interface ThreadCostAgent {
|
|
27
|
+
id: string;
|
|
28
|
+
sessionId: string;
|
|
29
|
+
parentSessionId?: string | null;
|
|
30
|
+
isRoot: boolean;
|
|
31
|
+
agentType?: string;
|
|
32
|
+
description?: string;
|
|
33
|
+
childCount?: number;
|
|
34
|
+
totalTokens?: number;
|
|
35
|
+
costUsd?: number;
|
|
36
|
+
}
|
|
37
|
+
export interface ThreadCosts {
|
|
38
|
+
threadId: string;
|
|
39
|
+
totalCostUsd: number;
|
|
40
|
+
byModel: ThreadCostModel[];
|
|
41
|
+
byAgent: ThreadCostAgent[];
|
|
42
|
+
}
|
|
43
|
+
export interface ThreadCostGroup {
|
|
44
|
+
agent: ThreadCostAgent | undefined;
|
|
45
|
+
rows: ThreadCostModel[];
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* True when the thread actually has subagents. Chat threads are flat today, so
|
|
49
|
+
* a single root row is the norm — grouping the table by it would present an
|
|
50
|
+
* empty dimension as though it were data.
|
|
51
|
+
*/
|
|
52
|
+
export declare function hasAgentBreakdown(costs: ThreadCosts): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Buckets model rows by their session. Falls back to one unlabelled group when
|
|
55
|
+
* the thread has no subagent breakdown, so the panel renders a flat table.
|
|
56
|
+
* Groups follow byAgent order (root first); any row whose session is missing
|
|
57
|
+
* from byAgent still appears, under its own group, rather than vanishing.
|
|
58
|
+
*/
|
|
59
|
+
export declare function groupCostsByAgent(costs: ThreadCosts): ThreadCostGroup[];
|
|
60
|
+
/** Display name for a session: its task description, then agent type, then id. */
|
|
61
|
+
export declare function agentLabel(agent: ThreadCostAgent): string;
|
|
62
|
+
//# sourceMappingURL=thread-costs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thread-costs.d.ts","sourceRoot":"","sources":["../../../src/data/ai/thread-costs.ts"],"names":[],"mappings":"AAIA,iEAAiE;AACjE,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB;6CACyC;IACzC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,oEAAoE;AACpE,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IAC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