@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,279 +1,40 @@
|
|
|
1
|
-
import { jsxs,
|
|
2
|
-
import {
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useMemo } from "react";
|
|
3
|
+
import { Button } from "../../components/button.js";
|
|
3
4
|
import { cn } from "../../lib/utils.js";
|
|
4
5
|
import { DropdownMenu } from "../../overlay/DropdownMenu.js";
|
|
5
6
|
import { Modal } from "../../overlay/Modal.js";
|
|
6
|
-
import { Button } from "../../components/button.js";
|
|
7
7
|
import { Icon } from "../Icon.js";
|
|
8
|
-
import { ModelSelector, EffortSelector } from "../chat/ModelSelector.js";
|
|
9
8
|
import { DEFAULT_REASONING_EFFORTS } from "../chat/effort-icons.js";
|
|
9
|
+
import { AdvancedChatConfig } from "./AdvancedChatConfig.js";
|
|
10
|
+
import { AdvancedCostsPanel } from "./AdvancedCostsPanel.js";
|
|
10
11
|
import { ToolSchemaBrowser } from "./ToolSchemaBrowser.js";
|
|
11
|
-
import {
|
|
12
|
+
import { CompactToolList } from "./ToolPreferencesList.js";
|
|
13
|
+
import { CompactToolPreferencesList } from "./ToolPreferencesList.js";
|
|
14
|
+
import { groupedToolEntries } from "./ToolPreferences.model.js";
|
|
12
15
|
import { UiSliders } from "../../icons/components/UiSliders.js";
|
|
13
|
-
import { UiShield } from "../../icons/components/UiShield.js";
|
|
14
16
|
import { UiCode2 } from "../../icons/components/UiCode2.js";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
};
|
|
24
|
-
const MODE_DESCRIPTION = {
|
|
25
|
-
on: "Always allow this tool to run automatically.",
|
|
26
|
-
auto: "Use the backend's default permission policy.",
|
|
27
|
-
ask: "Ask before running this tool.",
|
|
28
|
-
off: "Hide this tool from the model."
|
|
29
|
-
};
|
|
30
|
-
const BADGE_LABEL = { ...MODE_LABEL, mixed: "Mixed" };
|
|
31
|
-
const BADGE_DESCRIPTION = {
|
|
32
|
-
...MODE_DESCRIPTION,
|
|
33
|
-
mixed: "Members have different permissions."
|
|
17
|
+
import { UiShield } from "../../icons/components/UiShield.js";
|
|
18
|
+
import { UiCoins } from "../../icons/components/UiCoins.js";
|
|
19
|
+
const ADVANCED_TABS = ["config", "costs", "permissions", "browser"];
|
|
20
|
+
const ADVANCED_TAB_ICONS = {
|
|
21
|
+
config: UiSliders,
|
|
22
|
+
costs: UiCoins,
|
|
23
|
+
permissions: UiShield,
|
|
24
|
+
browser: UiCode2
|
|
34
25
|
};
|
|
35
|
-
const NO_PARENT = "\0no-parent";
|
|
36
|
-
function ModeBadge({ mode }) {
|
|
37
|
-
return /* @__PURE__ */ jsx(
|
|
38
|
-
"span",
|
|
39
|
-
{
|
|
40
|
-
className: cn(
|
|
41
|
-
"shrink-0 rounded px-1.5 py-0.5 text-[10px] font-medium",
|
|
42
|
-
mode === "on" && "bg-emerald-500/10 text-emerald-600 dark:text-emerald-400",
|
|
43
|
-
mode === "auto" && "bg-sky-500/10 text-sky-600 dark:text-sky-400",
|
|
44
|
-
mode === "ask" && "bg-amber-500/10 text-amber-600 dark:text-amber-500",
|
|
45
|
-
mode === "off" && "text-muted-foreground",
|
|
46
|
-
mode === "mixed" && "bg-muted text-muted-foreground ring-1 ring-inset ring-border"
|
|
47
|
-
),
|
|
48
|
-
title: BADGE_DESCRIPTION[mode],
|
|
49
|
-
children: BADGE_LABEL[mode]
|
|
50
|
-
}
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
function ToolGroupHeader({
|
|
54
|
-
group,
|
|
55
|
-
count,
|
|
56
|
-
collapsed,
|
|
57
|
-
mode,
|
|
58
|
-
onCollapseToggle,
|
|
59
|
-
onModeToggle
|
|
60
|
-
}) {
|
|
61
|
-
return /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-[1.25rem_minmax(0,1fr)] items-center gap-1 px-1 py-0.5", children: [
|
|
62
|
-
/* @__PURE__ */ jsx(
|
|
63
|
-
"button",
|
|
64
|
-
{
|
|
65
|
-
type: "button",
|
|
66
|
-
"aria-label": `${collapsed ? "Expand" : "Collapse"} ${group}`,
|
|
67
|
-
title: `${collapsed ? "Expand" : "Collapse"} ${group}`,
|
|
68
|
-
className: "inline-flex size-5 items-center justify-center rounded text-muted-foreground hover:bg-background hover:text-foreground",
|
|
69
|
-
onClick: onCollapseToggle,
|
|
70
|
-
children: /* @__PURE__ */ jsx(
|
|
71
|
-
Icon,
|
|
72
|
-
{
|
|
73
|
-
icon: collapsed ? UiChevronRight : UiChevronDown,
|
|
74
|
-
className: "size-3.5"
|
|
75
|
-
}
|
|
76
|
-
)
|
|
77
|
-
}
|
|
78
|
-
),
|
|
79
|
-
/* @__PURE__ */ jsxs(
|
|
80
|
-
"button",
|
|
81
|
-
{
|
|
82
|
-
type: "button",
|
|
83
|
-
"aria-label": `Toggle ${group} group`,
|
|
84
|
-
title: `Cycle all ${count} ${count === 1 ? "tool" : "tools"} in ${group}`,
|
|
85
|
-
className: "flex min-w-0 items-center gap-1.5 rounded px-1 py-0.5 text-left hover:bg-background/70",
|
|
86
|
-
onClick: onModeToggle,
|
|
87
|
-
children: [
|
|
88
|
-
/* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-1 items-center gap-1.5", children: [
|
|
89
|
-
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate text-[10px] font-semibold uppercase tracking-wider text-muted-foreground", children: group }),
|
|
90
|
-
/* @__PURE__ */ jsx("span", { className: "shrink-0 rounded bg-background px-1 text-[10px] text-muted-foreground", children: count })
|
|
91
|
-
] }),
|
|
92
|
-
/* @__PURE__ */ jsx("span", { className: "shrink-0", children: /* @__PURE__ */ jsx(ModeBadge, { mode }) })
|
|
93
|
-
]
|
|
94
|
-
}
|
|
95
|
-
)
|
|
96
|
-
] });
|
|
97
|
-
}
|
|
98
|
-
function ToolRow({
|
|
99
|
-
entry,
|
|
100
|
-
mode,
|
|
101
|
-
onToggle,
|
|
102
|
-
indented = false
|
|
103
|
-
}) {
|
|
104
|
-
return /* @__PURE__ */ jsxs(
|
|
105
|
-
"button",
|
|
106
|
-
{
|
|
107
|
-
type: "button",
|
|
108
|
-
className: cn(
|
|
109
|
-
"flex w-full items-center justify-between gap-2 rounded px-1.5 py-0.5 text-left hover:bg-accent",
|
|
110
|
-
indented && "pl-7"
|
|
111
|
-
),
|
|
112
|
-
title: entry.tool.name,
|
|
113
|
-
onClick: () => onToggle(entry, mode),
|
|
114
|
-
children: [
|
|
115
|
-
/* @__PURE__ */ jsx(
|
|
116
|
-
"span",
|
|
117
|
-
{
|
|
118
|
-
className: cn(
|
|
119
|
-
"min-w-0 truncate text-xs",
|
|
120
|
-
mode === "off" && "text-muted-foreground line-through"
|
|
121
|
-
),
|
|
122
|
-
children: entry.label
|
|
123
|
-
}
|
|
124
|
-
),
|
|
125
|
-
/* @__PURE__ */ jsx(ModeBadge, { mode })
|
|
126
|
-
]
|
|
127
|
-
}
|
|
128
|
-
);
|
|
129
|
-
}
|
|
130
|
-
function ToolParentHeader({
|
|
131
|
-
parent,
|
|
132
|
-
count,
|
|
133
|
-
collapsed,
|
|
134
|
-
mode,
|
|
135
|
-
onCollapseToggle,
|
|
136
|
-
onModeToggle
|
|
137
|
-
}) {
|
|
138
|
-
return /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-[1.25rem_minmax(0,1fr)] items-center gap-1 py-0.5 pl-4 pr-1", children: [
|
|
139
|
-
/* @__PURE__ */ jsx(
|
|
140
|
-
"button",
|
|
141
|
-
{
|
|
142
|
-
type: "button",
|
|
143
|
-
"aria-label": `${collapsed ? "Expand" : "Collapse"} ${parent}`,
|
|
144
|
-
title: `${collapsed ? "Expand" : "Collapse"} ${parent}`,
|
|
145
|
-
className: "inline-flex size-5 items-center justify-center rounded text-muted-foreground hover:bg-background hover:text-foreground",
|
|
146
|
-
onClick: onCollapseToggle,
|
|
147
|
-
children: /* @__PURE__ */ jsx(
|
|
148
|
-
Icon,
|
|
149
|
-
{
|
|
150
|
-
icon: collapsed ? UiChevronRight : UiChevronDown,
|
|
151
|
-
className: "size-3.5"
|
|
152
|
-
}
|
|
153
|
-
)
|
|
154
|
-
}
|
|
155
|
-
),
|
|
156
|
-
/* @__PURE__ */ jsxs(
|
|
157
|
-
"button",
|
|
158
|
-
{
|
|
159
|
-
type: "button",
|
|
160
|
-
"aria-label": `Toggle ${parent} tools`,
|
|
161
|
-
title: `Cycle all ${count} ${count === 1 ? "tool" : "tools"} in ${parent}`,
|
|
162
|
-
className: "flex min-w-0 items-center gap-1.5 rounded px-1 py-0.5 text-left hover:bg-background/70",
|
|
163
|
-
onClick: onModeToggle,
|
|
164
|
-
children: [
|
|
165
|
-
/* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-1 items-center gap-1.5", children: [
|
|
166
|
-
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate text-[11px] font-medium text-foreground/70", children: parent }),
|
|
167
|
-
/* @__PURE__ */ jsx("span", { className: "shrink-0 rounded bg-background px-1 text-[10px] text-muted-foreground", children: count })
|
|
168
|
-
] }),
|
|
169
|
-
/* @__PURE__ */ jsx("span", { className: "shrink-0", children: /* @__PURE__ */ jsx(ModeBadge, { mode }) })
|
|
170
|
-
]
|
|
171
|
-
}
|
|
172
|
-
)
|
|
173
|
-
] });
|
|
174
|
-
}
|
|
175
|
-
function ToolSubGroupBlock({
|
|
176
|
-
subGroup,
|
|
177
|
-
value,
|
|
178
|
-
open,
|
|
179
|
-
onToggle,
|
|
180
|
-
onToggleEntry,
|
|
181
|
-
onCycleEntries
|
|
182
|
-
}) {
|
|
183
|
-
const hasParent = subGroup.parent !== NO_PARENT;
|
|
184
|
-
const rows = subGroup.entries.map((entry) => /* @__PURE__ */ jsx(
|
|
185
|
-
ToolRow,
|
|
186
|
-
{
|
|
187
|
-
entry,
|
|
188
|
-
mode: entryMode(entry, value),
|
|
189
|
-
onToggle: onToggleEntry,
|
|
190
|
-
indented: hasParent
|
|
191
|
-
},
|
|
192
|
-
entry.key
|
|
193
|
-
));
|
|
194
|
-
if (!hasParent) {
|
|
195
|
-
return /* @__PURE__ */ jsx(Fragment, { children: rows });
|
|
196
|
-
}
|
|
197
|
-
return /* @__PURE__ */ jsxs("div", { children: [
|
|
198
|
-
/* @__PURE__ */ jsx(
|
|
199
|
-
ToolParentHeader,
|
|
200
|
-
{
|
|
201
|
-
parent: subGroup.parent,
|
|
202
|
-
count: subGroup.entries.length,
|
|
203
|
-
collapsed: !open,
|
|
204
|
-
mode: commonMode(subGroup.entries, value),
|
|
205
|
-
onCollapseToggle: onToggle,
|
|
206
|
-
onModeToggle: () => onCycleEntries(subGroup.entries, groupToolMode(subGroup.entries, value))
|
|
207
|
-
}
|
|
208
|
-
),
|
|
209
|
-
open && rows
|
|
210
|
-
] });
|
|
211
|
-
}
|
|
212
|
-
function CompactToolList({
|
|
213
|
-
groups,
|
|
214
|
-
value,
|
|
215
|
-
onChange,
|
|
216
|
-
emptyLabel = "No tools available"
|
|
217
|
-
}) {
|
|
218
|
-
const [expanded, setExpanded] = useState(() => /* @__PURE__ */ new Set());
|
|
219
|
-
if (groups.length === 0) {
|
|
220
|
-
return /* @__PURE__ */ jsx("div", { className: "px-2 py-2 text-xs text-muted-foreground", children: emptyLabel });
|
|
221
|
-
}
|
|
222
|
-
const isOpen = (key) => expanded.has(key);
|
|
223
|
-
const toggle = (key) => setExpanded((current) => {
|
|
224
|
-
const next = new Set(current);
|
|
225
|
-
if (next.has(key)) next.delete(key);
|
|
226
|
-
else next.add(key);
|
|
227
|
-
return next;
|
|
228
|
-
});
|
|
229
|
-
const handleToggle = (entry, current) => onChange({ ...value, [entry.key]: nextMode(current) });
|
|
230
|
-
const cycleEntries = (entries, current) => {
|
|
231
|
-
const next = nextMode(current);
|
|
232
|
-
const updated = { ...value };
|
|
233
|
-
for (const entry of entries) updated[entry.key] = next;
|
|
234
|
-
onChange(updated);
|
|
235
|
-
};
|
|
236
|
-
return /* @__PURE__ */ jsx("div", { className: "space-y-1", children: groups.map((group) => {
|
|
237
|
-
const groupOpen = isOpen(group.group);
|
|
238
|
-
return /* @__PURE__ */ jsxs("div", { children: [
|
|
239
|
-
/* @__PURE__ */ jsx(
|
|
240
|
-
ToolGroupHeader,
|
|
241
|
-
{
|
|
242
|
-
group: group.group,
|
|
243
|
-
count: group.entries.length,
|
|
244
|
-
collapsed: !groupOpen,
|
|
245
|
-
mode: commonMode(group.entries, value),
|
|
246
|
-
onCollapseToggle: () => toggle(group.group),
|
|
247
|
-
onModeToggle: () => cycleEntries(group.entries, groupToolMode(group.entries, value))
|
|
248
|
-
}
|
|
249
|
-
),
|
|
250
|
-
groupOpen && /* @__PURE__ */ jsx("div", { className: "space-y-0.5 p-0.5", children: group.subGroups.map((subGroup) => {
|
|
251
|
-
const parentKey = `${group.group}///${subGroup.parent}`;
|
|
252
|
-
return /* @__PURE__ */ jsx(
|
|
253
|
-
ToolSubGroupBlock,
|
|
254
|
-
{
|
|
255
|
-
subGroup,
|
|
256
|
-
value,
|
|
257
|
-
open: isOpen(parentKey),
|
|
258
|
-
onToggle: () => toggle(parentKey),
|
|
259
|
-
onToggleEntry: handleToggle,
|
|
260
|
-
onCycleEntries: cycleEntries
|
|
261
|
-
},
|
|
262
|
-
subGroup.parent
|
|
263
|
-
);
|
|
264
|
-
}) })
|
|
265
|
-
] }, group.group);
|
|
266
|
-
}) });
|
|
267
|
-
}
|
|
268
26
|
function ToolPreferences({
|
|
269
27
|
tools,
|
|
270
28
|
value,
|
|
271
29
|
onChange,
|
|
272
30
|
models = [],
|
|
31
|
+
runtime,
|
|
32
|
+
onRuntimeChange,
|
|
273
33
|
model,
|
|
274
34
|
onModelChange,
|
|
35
|
+
runtimeFamilies,
|
|
275
36
|
reasoningEfforts = DEFAULT_REASONING_EFFORTS,
|
|
276
|
-
reasoningEffort
|
|
37
|
+
reasoningEffort,
|
|
277
38
|
onReasoningEffortChange,
|
|
278
39
|
permissionMode = "default",
|
|
279
40
|
onPermissionModeChange,
|
|
@@ -282,13 +43,32 @@ function ToolPreferences({
|
|
|
282
43
|
budget,
|
|
283
44
|
onBudgetChange,
|
|
284
45
|
usage,
|
|
46
|
+
costsApi,
|
|
47
|
+
threadId,
|
|
285
48
|
toolsLoading = false,
|
|
286
49
|
toolsError = null,
|
|
50
|
+
catalogLoading = false,
|
|
51
|
+
catalogError = null,
|
|
52
|
+
onCatalogRetry,
|
|
287
53
|
className = ""
|
|
288
54
|
}) {
|
|
289
55
|
const [advancedOpen, setAdvancedOpen] = useState(false);
|
|
290
56
|
const [advancedTab, setAdvancedTab] = useState("config");
|
|
291
57
|
const groups = useMemo(() => groupedToolEntries(tools), [tools]);
|
|
58
|
+
const resolvedRuntime = runtime ?? {
|
|
59
|
+
...model ? { model } : {},
|
|
60
|
+
...reasoningEffort ? { effort: reasoningEffort } : {},
|
|
61
|
+
...temperature !== void 0 ? { temperature } : {}
|
|
62
|
+
};
|
|
63
|
+
const handleRuntimeChange = (next) => {
|
|
64
|
+
onRuntimeChange == null ? void 0 : onRuntimeChange(next);
|
|
65
|
+
if ((next.id ?? next.model ?? "") !== (model ?? "")) {
|
|
66
|
+
onModelChange == null ? void 0 : onModelChange(next.id ?? next.model ?? "");
|
|
67
|
+
}
|
|
68
|
+
if ((next.effort ?? "") !== (reasoningEffort ?? "")) {
|
|
69
|
+
onReasoningEffortChange == null ? void 0 : onReasoningEffortChange(next.effort ?? "");
|
|
70
|
+
}
|
|
71
|
+
};
|
|
292
72
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
293
73
|
/* @__PURE__ */ jsx(
|
|
294
74
|
DropdownMenu,
|
|
@@ -341,52 +121,46 @@ function ToolPreferences({
|
|
|
341
121
|
size: "xl",
|
|
342
122
|
children: /* @__PURE__ */ jsxs("div", { className: "flex h-[70vh] min-h-0 flex-col gap-3", children: [
|
|
343
123
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 rounded border border-border bg-muted/30 p-1", children: [
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
}
|
|
361
|
-
),
|
|
362
|
-
tab
|
|
363
|
-
]
|
|
364
|
-
},
|
|
365
|
-
tab
|
|
366
|
-
)
|
|
367
|
-
),
|
|
124
|
+
ADVANCED_TABS.map((tab) => /* @__PURE__ */ jsxs(
|
|
125
|
+
"button",
|
|
126
|
+
{
|
|
127
|
+
type: "button",
|
|
128
|
+
className: cn(
|
|
129
|
+
"inline-flex h-8 items-center gap-1.5 rounded px-3 text-xs font-medium capitalize",
|
|
130
|
+
advancedTab === tab ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:bg-background/60"
|
|
131
|
+
),
|
|
132
|
+
onClick: () => setAdvancedTab(tab),
|
|
133
|
+
children: [
|
|
134
|
+
/* @__PURE__ */ jsx(Icon, { icon: ADVANCED_TAB_ICONS[tab], className: "size-3.5" }),
|
|
135
|
+
tab
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
tab
|
|
139
|
+
)),
|
|
368
140
|
/* @__PURE__ */ jsx("div", { className: "flex-1" }),
|
|
369
141
|
toolsLoading && /* @__PURE__ */ jsx("span", { className: "pr-2 text-[11px] text-muted-foreground", children: "Loading tools" }),
|
|
370
142
|
toolsError && /* @__PURE__ */ jsx("span", { className: "pr-2 text-[11px] text-destructive", children: toolsError })
|
|
371
143
|
] }),
|
|
372
144
|
advancedTab === "config" ? /* @__PURE__ */ jsx(
|
|
373
|
-
|
|
145
|
+
AdvancedChatConfig,
|
|
374
146
|
{
|
|
375
147
|
models,
|
|
376
|
-
|
|
377
|
-
|
|
148
|
+
runtime: resolvedRuntime,
|
|
149
|
+
onRuntimeChange: handleRuntimeChange,
|
|
150
|
+
runtimeFamilies,
|
|
378
151
|
reasoningEfforts,
|
|
379
|
-
reasoningEffort,
|
|
380
|
-
onReasoningEffortChange,
|
|
381
152
|
permissionMode,
|
|
382
153
|
onPermissionModeChange,
|
|
383
154
|
temperature,
|
|
384
155
|
onTemperatureChange,
|
|
385
156
|
budget,
|
|
386
157
|
onBudgetChange,
|
|
387
|
-
usage
|
|
158
|
+
usage,
|
|
159
|
+
catalogLoading,
|
|
160
|
+
catalogError,
|
|
161
|
+
onCatalogRetry
|
|
388
162
|
}
|
|
389
|
-
) : advancedTab === "permissions" ? /* @__PURE__ */ jsx(
|
|
163
|
+
) : advancedTab === "costs" ? /* @__PURE__ */ jsx(AdvancedCostsPanel, { costsApi, threadId }) : advancedTab === "permissions" ? /* @__PURE__ */ jsx(
|
|
390
164
|
AdvancedPermissionsPanel,
|
|
391
165
|
{
|
|
392
166
|
groups,
|
|
@@ -399,268 +173,6 @@ function ToolPreferences({
|
|
|
399
173
|
)
|
|
400
174
|
] });
|
|
401
175
|
}
|
|
402
|
-
function CompactToolPreferencesList({
|
|
403
|
-
tools,
|
|
404
|
-
value,
|
|
405
|
-
onChange,
|
|
406
|
-
title = "Tools preferences",
|
|
407
|
-
emptyLabel = "No tools available",
|
|
408
|
-
className
|
|
409
|
-
}) {
|
|
410
|
-
const groups = useMemo(
|
|
411
|
-
() => groupedToolEntriesWithPreferences(tools, value),
|
|
412
|
-
[tools, value]
|
|
413
|
-
);
|
|
414
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("space-y-2", className), children: [
|
|
415
|
-
title && /* @__PURE__ */ jsx("div", { className: "text-xs font-medium text-muted-foreground", children: title }),
|
|
416
|
-
/* @__PURE__ */ jsx(
|
|
417
|
-
CompactToolList,
|
|
418
|
-
{
|
|
419
|
-
groups,
|
|
420
|
-
value,
|
|
421
|
-
onChange,
|
|
422
|
-
emptyLabel
|
|
423
|
-
}
|
|
424
|
-
)
|
|
425
|
-
] });
|
|
426
|
-
}
|
|
427
|
-
function ToolConfigPanel({
|
|
428
|
-
models,
|
|
429
|
-
model,
|
|
430
|
-
onModelChange,
|
|
431
|
-
reasoningEfforts,
|
|
432
|
-
reasoningEffort,
|
|
433
|
-
onReasoningEffortChange,
|
|
434
|
-
permissionMode,
|
|
435
|
-
onPermissionModeChange,
|
|
436
|
-
temperature,
|
|
437
|
-
onTemperatureChange,
|
|
438
|
-
budget,
|
|
439
|
-
onBudgetChange,
|
|
440
|
-
usage
|
|
441
|
-
}) {
|
|
442
|
-
const updateBudget = (key, raw) => {
|
|
443
|
-
const next = { ...budget };
|
|
444
|
-
const parsed = parseOptionalNumber(raw, key === "maxTokens");
|
|
445
|
-
if (parsed === void 0) {
|
|
446
|
-
delete next[key];
|
|
447
|
-
} else {
|
|
448
|
-
next[key] = parsed;
|
|
449
|
-
}
|
|
450
|
-
onBudgetChange == null ? void 0 : onBudgetChange(next);
|
|
451
|
-
};
|
|
452
|
-
return /* @__PURE__ */ jsxs("div", { className: "grid min-h-0 flex-1 grid-cols-[minmax(0,1fr)_minmax(18rem,24rem)] gap-4 overflow-y-auto", children: [
|
|
453
|
-
/* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
454
|
-
/* @__PURE__ */ jsxs("section", { className: "space-y-3", children: [
|
|
455
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs font-semibold uppercase tracking-wider text-muted-foreground", children: "Model" }),
|
|
456
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-2", children: [
|
|
457
|
-
/* @__PURE__ */ jsx(
|
|
458
|
-
ModelSelector,
|
|
459
|
-
{
|
|
460
|
-
models,
|
|
461
|
-
value: model,
|
|
462
|
-
onChange: (next) => onModelChange == null ? void 0 : onModelChange(next),
|
|
463
|
-
className: "w-64"
|
|
464
|
-
}
|
|
465
|
-
),
|
|
466
|
-
/* @__PURE__ */ jsx(
|
|
467
|
-
EffortSelector,
|
|
468
|
-
{
|
|
469
|
-
efforts: reasoningEfforts,
|
|
470
|
-
value: reasoningEffort,
|
|
471
|
-
onChange: (next) => onReasoningEffortChange == null ? void 0 : onReasoningEffortChange(next),
|
|
472
|
-
className: "w-44"
|
|
473
|
-
}
|
|
474
|
-
)
|
|
475
|
-
] }),
|
|
476
|
-
/* @__PURE__ */ jsxs("label", { className: "grid max-w-md grid-cols-[9rem_minmax(0,1fr)] items-center gap-3 text-xs", children: [
|
|
477
|
-
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Permission mode" }),
|
|
478
|
-
/* @__PURE__ */ jsx(
|
|
479
|
-
"select",
|
|
480
|
-
{
|
|
481
|
-
"aria-label": "Permission mode",
|
|
482
|
-
value: permissionMode,
|
|
483
|
-
onChange: (event) => onPermissionModeChange == null ? void 0 : onPermissionModeChange(
|
|
484
|
-
event.target.value
|
|
485
|
-
),
|
|
486
|
-
className: "h-8 rounded border border-border bg-background px-2 text-xs",
|
|
487
|
-
children: CLAUDE_PERMISSION_MODE_OPTIONS.map((option) => /* @__PURE__ */ jsx(
|
|
488
|
-
"option",
|
|
489
|
-
{
|
|
490
|
-
value: option.value,
|
|
491
|
-
title: option.description,
|
|
492
|
-
children: option.label
|
|
493
|
-
},
|
|
494
|
-
option.value
|
|
495
|
-
))
|
|
496
|
-
}
|
|
497
|
-
)
|
|
498
|
-
] })
|
|
499
|
-
] }),
|
|
500
|
-
/* @__PURE__ */ jsxs("section", { className: "space-y-3", children: [
|
|
501
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs font-semibold uppercase tracking-wider text-muted-foreground", children: "Generation" }),
|
|
502
|
-
/* @__PURE__ */ jsxs("label", { className: "grid grid-cols-[8rem_minmax(0,1fr)_4rem] items-center gap-3 text-xs", children: [
|
|
503
|
-
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Temperature" }),
|
|
504
|
-
/* @__PURE__ */ jsx(
|
|
505
|
-
"input",
|
|
506
|
-
{
|
|
507
|
-
type: "range",
|
|
508
|
-
min: 0,
|
|
509
|
-
max: 2,
|
|
510
|
-
step: 0.1,
|
|
511
|
-
value: temperature ?? 0,
|
|
512
|
-
onChange: (event) => onTemperatureChange == null ? void 0 : onTemperatureChange(Number(event.target.value))
|
|
513
|
-
}
|
|
514
|
-
),
|
|
515
|
-
/* @__PURE__ */ jsx(
|
|
516
|
-
"input",
|
|
517
|
-
{
|
|
518
|
-
type: "number",
|
|
519
|
-
min: 0,
|
|
520
|
-
max: 2,
|
|
521
|
-
step: 0.1,
|
|
522
|
-
value: temperature ?? "",
|
|
523
|
-
onChange: (event) => onTemperatureChange == null ? void 0 : onTemperatureChange(parseOptionalNumber(event.target.value)),
|
|
524
|
-
className: "h-8 rounded border border-border bg-background px-2 text-xs"
|
|
525
|
-
}
|
|
526
|
-
)
|
|
527
|
-
] })
|
|
528
|
-
] }),
|
|
529
|
-
/* @__PURE__ */ jsxs("section", { className: "space-y-3", children: [
|
|
530
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs font-semibold uppercase tracking-wider text-muted-foreground", children: "Budget" }),
|
|
531
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-3", children: [
|
|
532
|
-
/* @__PURE__ */ jsxs("label", { className: "space-y-1 text-xs", children: [
|
|
533
|
-
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Max cost" }),
|
|
534
|
-
/* @__PURE__ */ jsx(
|
|
535
|
-
"input",
|
|
536
|
-
{
|
|
537
|
-
type: "number",
|
|
538
|
-
min: 0,
|
|
539
|
-
step: 0.01,
|
|
540
|
-
value: (budget == null ? void 0 : budget.cost) ?? "",
|
|
541
|
-
onChange: (event) => updateBudget("cost", event.target.value),
|
|
542
|
-
className: "h-8 w-full rounded border border-border bg-background px-2 text-xs"
|
|
543
|
-
}
|
|
544
|
-
)
|
|
545
|
-
] }),
|
|
546
|
-
/* @__PURE__ */ jsxs("label", { className: "space-y-1 text-xs", children: [
|
|
547
|
-
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Max tokens" }),
|
|
548
|
-
/* @__PURE__ */ jsx(
|
|
549
|
-
"input",
|
|
550
|
-
{
|
|
551
|
-
type: "number",
|
|
552
|
-
min: 0,
|
|
553
|
-
step: 1,
|
|
554
|
-
value: (budget == null ? void 0 : budget.maxTokens) ?? "",
|
|
555
|
-
onChange: (event) => updateBudget("maxTokens", event.target.value),
|
|
556
|
-
className: "h-8 w-full rounded border border-border bg-background px-2 text-xs"
|
|
557
|
-
}
|
|
558
|
-
)
|
|
559
|
-
] })
|
|
560
|
-
] })
|
|
561
|
-
] })
|
|
562
|
-
] }),
|
|
563
|
-
/* @__PURE__ */ jsx(UsageCostPanel, { usage })
|
|
564
|
-
] });
|
|
565
|
-
}
|
|
566
|
-
function UsageCostPanel({
|
|
567
|
-
usage
|
|
568
|
-
}) {
|
|
569
|
-
const tokens = usage == null ? void 0 : usage.usage;
|
|
570
|
-
const costs = usage == null ? void 0 : usage.costBreakdown;
|
|
571
|
-
return /* @__PURE__ */ jsxs("aside", { className: "space-y-3 border-l border-border pl-4", children: [
|
|
572
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs font-semibold uppercase tracking-wider text-muted-foreground", children: "Usage" }),
|
|
573
|
-
/* @__PURE__ */ jsxs("div", { className: "overflow-hidden rounded border border-border", children: [
|
|
574
|
-
/* @__PURE__ */ jsx(
|
|
575
|
-
MetricRow,
|
|
576
|
-
{
|
|
577
|
-
label: "Context",
|
|
578
|
-
value: `${formatNumber(usage == null ? void 0 : usage.usedTokens)} / ${formatNumber(usage == null ? void 0 : usage.maxTokens)}`
|
|
579
|
-
}
|
|
580
|
-
),
|
|
581
|
-
/* @__PURE__ */ jsx(
|
|
582
|
-
MetricRow,
|
|
583
|
-
{
|
|
584
|
-
label: "Input tokens",
|
|
585
|
-
value: formatNumber(tokens == null ? void 0 : tokens.inputTokens)
|
|
586
|
-
}
|
|
587
|
-
),
|
|
588
|
-
/* @__PURE__ */ jsx(
|
|
589
|
-
MetricRow,
|
|
590
|
-
{
|
|
591
|
-
label: "Output tokens",
|
|
592
|
-
value: formatNumber(tokens == null ? void 0 : tokens.outputTokens)
|
|
593
|
-
}
|
|
594
|
-
),
|
|
595
|
-
/* @__PURE__ */ jsx(
|
|
596
|
-
MetricRow,
|
|
597
|
-
{
|
|
598
|
-
label: "Reasoning tokens",
|
|
599
|
-
value: formatNumber(tokens == null ? void 0 : tokens.reasoningTokens)
|
|
600
|
-
}
|
|
601
|
-
),
|
|
602
|
-
/* @__PURE__ */ jsx(
|
|
603
|
-
MetricRow,
|
|
604
|
-
{
|
|
605
|
-
label: "Cache read tokens",
|
|
606
|
-
value: formatNumber(tokens == null ? void 0 : tokens.cacheReadTokens)
|
|
607
|
-
}
|
|
608
|
-
),
|
|
609
|
-
/* @__PURE__ */ jsx(
|
|
610
|
-
MetricRow,
|
|
611
|
-
{
|
|
612
|
-
label: "Cache write tokens",
|
|
613
|
-
value: formatNumber(tokens == null ? void 0 : tokens.cacheWriteTokens)
|
|
614
|
-
}
|
|
615
|
-
),
|
|
616
|
-
/* @__PURE__ */ jsx(
|
|
617
|
-
MetricRow,
|
|
618
|
-
{
|
|
619
|
-
label: "Total tokens",
|
|
620
|
-
value: formatNumber(tokens == null ? void 0 : tokens.totalTokens)
|
|
621
|
-
}
|
|
622
|
-
)
|
|
623
|
-
] }),
|
|
624
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs font-semibold uppercase tracking-wider text-muted-foreground", children: "Cost" }),
|
|
625
|
-
/* @__PURE__ */ jsxs("div", { className: "overflow-hidden rounded border border-border", children: [
|
|
626
|
-
/* @__PURE__ */ jsx(MetricRow, { label: "Input", value: formatUSD(costs == null ? void 0 : costs.inputUsd) }),
|
|
627
|
-
/* @__PURE__ */ jsx(MetricRow, { label: "Output", value: formatUSD(costs == null ? void 0 : costs.outputUsd) }),
|
|
628
|
-
/* @__PURE__ */ jsx(MetricRow, { label: "Reasoning", value: formatUSD(costs == null ? void 0 : costs.reasoningUsd) }),
|
|
629
|
-
/* @__PURE__ */ jsx(MetricRow, { label: "Cache read", value: formatUSD(costs == null ? void 0 : costs.cacheReadUsd) }),
|
|
630
|
-
/* @__PURE__ */ jsx(
|
|
631
|
-
MetricRow,
|
|
632
|
-
{
|
|
633
|
-
label: "Cache write",
|
|
634
|
-
value: formatUSD(costs == null ? void 0 : costs.cacheWriteUsd)
|
|
635
|
-
}
|
|
636
|
-
),
|
|
637
|
-
/* @__PURE__ */ jsx(
|
|
638
|
-
MetricRow,
|
|
639
|
-
{
|
|
640
|
-
label: "Thread total",
|
|
641
|
-
value: formatUSD((usage == null ? void 0 : usage.cost) ?? (costs == null ? void 0 : costs.totalUsd)),
|
|
642
|
-
strong: true
|
|
643
|
-
}
|
|
644
|
-
)
|
|
645
|
-
] })
|
|
646
|
-
] });
|
|
647
|
-
}
|
|
648
|
-
function MetricRow({
|
|
649
|
-
label,
|
|
650
|
-
value,
|
|
651
|
-
strong = false
|
|
652
|
-
}) {
|
|
653
|
-
return /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-[minmax(0,1fr)_auto] gap-3 border-b border-border px-2 py-1.5 text-xs last:border-b-0", children: [
|
|
654
|
-
/* @__PURE__ */ jsx("span", { className: "truncate text-muted-foreground", children: label }),
|
|
655
|
-
/* @__PURE__ */ jsx(
|
|
656
|
-
"span",
|
|
657
|
-
{
|
|
658
|
-
className: cn("font-mono", strong && "font-semibold text-foreground"),
|
|
659
|
-
children: value
|
|
660
|
-
}
|
|
661
|
-
)
|
|
662
|
-
] });
|
|
663
|
-
}
|
|
664
176
|
function AdvancedPermissionsPanel({
|
|
665
177
|
groups,
|
|
666
178
|
value,
|
|
@@ -676,137 +188,6 @@ function AdvancedPermissionsPanel({
|
|
|
676
188
|
}
|
|
677
189
|
) });
|
|
678
190
|
}
|
|
679
|
-
function groupedToolEntries(tools) {
|
|
680
|
-
const groups = {};
|
|
681
|
-
for (const tool of tools) {
|
|
682
|
-
const group = toolGroup(tool);
|
|
683
|
-
const entry = {
|
|
684
|
-
key: tool.name,
|
|
685
|
-
label: tool.label || tool.name,
|
|
686
|
-
group,
|
|
687
|
-
tool,
|
|
688
|
-
defaultPermission: toolDefaultPermission(tool)
|
|
689
|
-
};
|
|
690
|
-
(groups[group] ?? (groups[group] = [])).push(entry);
|
|
691
|
-
}
|
|
692
|
-
return Object.entries(groups).map(([group, entries]) => buildToolGroup(group, entries)).sort((a, b) => a.group.localeCompare(b.group));
|
|
693
|
-
}
|
|
694
|
-
function buildToolGroup(group, entries) {
|
|
695
|
-
var _a;
|
|
696
|
-
const byParent = {};
|
|
697
|
-
for (const entry of entries) {
|
|
698
|
-
const parent = ((_a = entry.tool.parent) == null ? void 0 : _a.trim()) || NO_PARENT;
|
|
699
|
-
(byParent[parent] ?? (byParent[parent] = [])).push(entry);
|
|
700
|
-
}
|
|
701
|
-
const subGroups = Object.entries(byParent).map(([parent, subEntries]) => ({
|
|
702
|
-
parent,
|
|
703
|
-
entries: [...subEntries].sort((a, b) => a.label.localeCompare(b.label))
|
|
704
|
-
})).sort(compareSubGroups);
|
|
705
|
-
return {
|
|
706
|
-
group,
|
|
707
|
-
entries: [...entries].sort((a, b) => a.label.localeCompare(b.label)),
|
|
708
|
-
subGroups
|
|
709
|
-
};
|
|
710
|
-
}
|
|
711
|
-
function compareSubGroups(a, b) {
|
|
712
|
-
if (a.parent === NO_PARENT) return b.parent === NO_PARENT ? 0 : -1;
|
|
713
|
-
if (b.parent === NO_PARENT) return 1;
|
|
714
|
-
return a.parent.localeCompare(b.parent);
|
|
715
|
-
}
|
|
716
|
-
function groupedToolEntriesWithPreferences(tools, value) {
|
|
717
|
-
const groups = groupedToolEntries(tools);
|
|
718
|
-
const known = new Set(tools.map((tool) => tool.name));
|
|
719
|
-
const customEntries = Object.entries(value).flatMap(([name, mode]) => {
|
|
720
|
-
const normalizedMode = normalizeToolMode(mode);
|
|
721
|
-
if (known.has(name) || !normalizedMode) return [];
|
|
722
|
-
return [
|
|
723
|
-
{
|
|
724
|
-
key: name,
|
|
725
|
-
label: name,
|
|
726
|
-
group: "Custom",
|
|
727
|
-
tool: {
|
|
728
|
-
name,
|
|
729
|
-
label: name,
|
|
730
|
-
group: "Custom",
|
|
731
|
-
defaultPermission: normalizedMode
|
|
732
|
-
},
|
|
733
|
-
defaultPermission: normalizedMode
|
|
734
|
-
}
|
|
735
|
-
];
|
|
736
|
-
});
|
|
737
|
-
if (customEntries.length === 0) return groups;
|
|
738
|
-
return [...groups, buildToolGroup("Custom", customEntries)];
|
|
739
|
-
}
|
|
740
|
-
function normalizeToolMode(value) {
|
|
741
|
-
switch (value.trim().toLowerCase()) {
|
|
742
|
-
case "on":
|
|
743
|
-
case "enabled":
|
|
744
|
-
return "on";
|
|
745
|
-
case "auto":
|
|
746
|
-
return "auto";
|
|
747
|
-
case "ask":
|
|
748
|
-
return "ask";
|
|
749
|
-
case "off":
|
|
750
|
-
case "disabled":
|
|
751
|
-
return "off";
|
|
752
|
-
default:
|
|
753
|
-
return void 0;
|
|
754
|
-
}
|
|
755
|
-
}
|
|
756
|
-
function toolGroup(meta) {
|
|
757
|
-
return meta.group ?? "Tools";
|
|
758
|
-
}
|
|
759
|
-
function toolDefaultPermission(meta) {
|
|
760
|
-
return meta.defaultPermission ?? "auto";
|
|
761
|
-
}
|
|
762
|
-
function entryMode(entry, value) {
|
|
763
|
-
return normalizeToolMode(value[entry.key] ?? "") ?? entry.defaultPermission;
|
|
764
|
-
}
|
|
765
|
-
function groupToolMode(entries, value) {
|
|
766
|
-
return entries.reduce(
|
|
767
|
-
(mode, entry) => mostRestrictiveMode(mode, entryMode(entry, value)),
|
|
768
|
-
"on"
|
|
769
|
-
);
|
|
770
|
-
}
|
|
771
|
-
function commonMode(entries, value) {
|
|
772
|
-
const first = entries[0];
|
|
773
|
-
if (!first) return "mixed";
|
|
774
|
-
const firstMode = entryMode(first, value);
|
|
775
|
-
return entries.every((entry) => entryMode(entry, value) === firstMode) ? firstMode : "mixed";
|
|
776
|
-
}
|
|
777
|
-
function nextMode(mode) {
|
|
778
|
-
const current = MODE_CYCLE.indexOf(mode);
|
|
779
|
-
return MODE_CYCLE[((current >= 0 ? current : 0) + 1) % MODE_CYCLE.length];
|
|
780
|
-
}
|
|
781
|
-
function mostRestrictiveMode(a, b) {
|
|
782
|
-
return modeRank(a) >= modeRank(b) ? a : b;
|
|
783
|
-
}
|
|
784
|
-
function modeRank(mode) {
|
|
785
|
-
switch (mode) {
|
|
786
|
-
case "on":
|
|
787
|
-
return 0;
|
|
788
|
-
case "auto":
|
|
789
|
-
return 1;
|
|
790
|
-
case "ask":
|
|
791
|
-
return 2;
|
|
792
|
-
case "off":
|
|
793
|
-
return 3;
|
|
794
|
-
}
|
|
795
|
-
}
|
|
796
|
-
function parseOptionalNumber(raw, integer = false) {
|
|
797
|
-
if (raw.trim() === "") return void 0;
|
|
798
|
-
const value = Number(raw);
|
|
799
|
-
if (!Number.isFinite(value)) return void 0;
|
|
800
|
-
return integer ? Math.max(0, Math.trunc(value)) : value;
|
|
801
|
-
}
|
|
802
|
-
function formatNumber(value) {
|
|
803
|
-
if (value == null || !Number.isFinite(value)) return "-";
|
|
804
|
-
return new Intl.NumberFormat().format(value);
|
|
805
|
-
}
|
|
806
|
-
function formatUSD(value) {
|
|
807
|
-
if (value == null || !Number.isFinite(value)) return "-";
|
|
808
|
-
return `$${value.toFixed(value >= 1 ? 4 : 6)}`;
|
|
809
|
-
}
|
|
810
191
|
export {
|
|
811
192
|
CompactToolPreferencesList,
|
|
812
193
|
ToolPreferences
|