@flanksource/clicky-ui 0.3.17 → 0.3.19
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 +35 -14
- package/dist/components/ComboboxMenu.cjs.map +1 -1
- package/dist/components/ComboboxMenu.d.ts.map +1 -1
- package/dist/components/ComboboxMenu.js +35 -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/EndpointSelector.model.cjs +96 -0
- package/dist/components/EndpointSelector.model.cjs.map +1 -0
- package/dist/components/EndpointSelector.model.d.ts +2 -0
- package/dist/components/EndpointSelector.model.d.ts.map +1 -1
- package/dist/components/EndpointSelector.model.js +96 -0
- package/dist/components/EndpointSelector.model.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 +116 -4
- package/dist/components/FilterBar.cjs.map +1 -1
- package/dist/components/FilterBar.d.ts +37 -2
- package/dist/components/FilterBar.d.ts.map +1 -1
- package/dist/components/FilterBar.js +116 -4
- package/dist/components/FilterBar.js.map +1 -1
- package/dist/components/JSONPathField.cjs +112 -0
- package/dist/components/JSONPathField.cjs.map +1 -0
- package/dist/components/JSONPathField.d.ts +36 -0
- package/dist/components/JSONPathField.d.ts.map +1 -0
- package/dist/components/JSONPathField.js +112 -0
- package/dist/components/JSONPathField.js.map +1 -0
- package/dist/components/JSONPathPlayground.cjs +225 -0
- package/dist/components/JSONPathPlayground.cjs.map +1 -0
- package/dist/components/JSONPathPlayground.d.ts +59 -0
- package/dist/components/JSONPathPlayground.d.ts.map +1 -0
- package/dist/components/JSONPathPlayground.js +225 -0
- package/dist/components/JSONPathPlayground.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/OnePasswordSelector.cjs +178 -0
- package/dist/components/OnePasswordSelector.cjs.map +1 -0
- package/dist/components/OnePasswordSelector.d.ts +8 -0
- package/dist/components/OnePasswordSelector.d.ts.map +1 -0
- package/dist/components/OnePasswordSelector.js +178 -0
- package/dist/components/OnePasswordSelector.js.map +1 -0
- package/dist/components/OnePasswordSelector.model.cjs +31 -0
- package/dist/components/OnePasswordSelector.model.cjs.map +1 -0
- package/dist/components/OnePasswordSelector.model.d.ts +27 -0
- package/dist/components/OnePasswordSelector.model.d.ts.map +1 -0
- package/dist/components/OnePasswordSelector.model.js +31 -0
- package/dist/components/OnePasswordSelector.model.js.map +1 -0
- package/dist/components/SecretFormField.cjs +142 -0
- package/dist/components/SecretFormField.cjs.map +1 -0
- package/dist/components/SecretFormField.d.ts +9 -0
- package/dist/components/SecretFormField.d.ts.map +1 -0
- package/dist/components/SecretFormField.js +142 -0
- package/dist/components/SecretFormField.js.map +1 -0
- package/dist/components/SecretKeySelector.cjs +20 -14
- package/dist/components/SecretKeySelector.cjs.map +1 -1
- package/dist/components/SecretKeySelector.d.ts +4 -1
- package/dist/components/SecretKeySelector.d.ts.map +1 -1
- package/dist/components/SecretKeySelector.js +20 -14
- package/dist/components/SecretKeySelector.js.map +1 -1
- package/dist/components/TreePickerField.cjs +71 -27
- package/dist/components/TreePickerField.cjs.map +1 -1
- package/dist/components/TreePickerField.d.ts +31 -2
- package/dist/components/TreePickerField.d.ts.map +1 -1
- package/dist/components/TreePickerField.js +72 -28
- 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 +25 -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 +12 -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 +12 -0
- package/dist/components/filter-bar-utils.js.map +1 -1
- package/dist/components/jotai-bindings-core.cjs.map +1 -1
- package/dist/components/jotai-bindings-core.d.ts +4 -1
- package/dist/components/jotai-bindings-core.d.ts.map +1 -1
- package/dist/components/jotai-bindings-core.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 +53 -29
- 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 +53 -29
- 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 +88 -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/jsonPathTree.cjs +189 -0
- package/dist/components/jsonPathTree.cjs.map +1 -0
- package/dist/components/jsonPathTree.d.ts +92 -0
- package/dist/components/jsonPathTree.d.ts.map +1 -0
- package/dist/components/jsonPathTree.js +189 -0
- package/dist/components/jsonPathTree.js.map +1 -0
- package/dist/components/secret-form-extension.cjs +30 -0
- package/dist/components/secret-form-extension.cjs.map +1 -0
- package/dist/components/secret-form-extension.d.ts +23 -0
- package/dist/components/secret-form-extension.d.ts.map +1 -0
- package/dist/components/secret-form-extension.js +30 -0
- package/dist/components/secret-form-extension.js.map +1 -0
- 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 +37 -0
- package/dist/components.cjs.map +1 -1
- package/dist/components.d.ts +20 -4
- package/dist/components.d.ts.map +1 -1
- package/dist/components.js +38 -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 +185 -53
- package/dist/data/DataTable.cjs.map +1 -1
- package/dist/data/DataTable.d.ts +63 -3
- package/dist/data/DataTable.d.ts.map +1 -1
- package/dist/data/DataTable.js +185 -53
- 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/TaskExecDetails.cjs +40 -0
- package/dist/data/TaskExecDetails.cjs.map +1 -0
- package/dist/data/TaskExecDetails.d.ts +5 -0
- package/dist/data/TaskExecDetails.d.ts.map +1 -0
- package/dist/data/TaskExecDetails.js +40 -0
- package/dist/data/TaskExecDetails.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 +59 -14
- 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 +59 -14
- package/dist/data/TaskProgress.js.map +1 -1
- package/dist/data/TaskSnapshot.cjs.map +1 -1
- package/dist/data/TaskSnapshot.d.ts +12 -1
- package/dist/data/TaskSnapshot.d.ts.map +1 -1
- package/dist/data/TaskSnapshot.js.map +1 -1
- package/dist/data/TreeNode.cjs +3 -0
- package/dist/data/TreeNode.cjs.map +1 -1
- package/dist/data/TreeNode.d.ts.map +1 -1
- package/dist/data/TreeNode.js +3 -0
- package/dist/data/TreeNode.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 +78 -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 +80 -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.cjs +1 -1
- package/dist/data/ai/ChatWindow.thread.cjs.map +1 -1
- package/dist/data/ai/ChatWindow.thread.js +1 -1
- package/dist/data/ai/ChatWindow.thread.js.map +1 -1
- 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 +2 -2
- package/dist/data/ai/PromptRunEditor/index.cjs.map +1 -1
- package/dist/data/ai/PromptRunEditor/index.d.ts +1 -1
- package/dist/data/ai/PromptRunEditor/index.d.ts.map +1 -1
- package/dist/data/ai/PromptRunEditor/index.js +2 -2
- package/dist/data/ai/PromptRunEditor/index.js.map +1 -1
- 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.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/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/fields.js +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 +11 -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 +6 -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 +156 -113
- package/dist/data/chat/Chat.cjs.map +1 -1
- package/dist/data/chat/Chat.d.ts +24 -7
- 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 +160 -117
- 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/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 +49 -6
- package/dist/data/chat/approval.cjs.map +1 -1
- package/dist/data/chat/approval.d.ts +11 -4
- package/dist/data/chat/approval.d.ts.map +1 -1
- package/dist/data/chat/approval.js +49 -6
- package/dist/data/chat/approval.js.map +1 -1
- 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 +7 -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 +103 -0
- package/dist/data/data-table-filter-values.cjs.map +1 -0
- package/dist/data/data-table-filter-values.d.ts +34 -0
- package/dist/data/data-table-filter-values.d.ts.map +1 -0
- package/dist/data/data-table-filter-values.js +103 -0
- package/dist/data/data-table-filter-values.js.map +1 -0
- package/dist/data/data-table-server-filters.cjs +165 -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 +165 -0
- package/dist/data/data-table-server-filters.js.map +1 -0
- package/dist/data/query-browser/QueryBrowser.cjs +204 -155
- package/dist/data/query-browser/QueryBrowser.cjs.map +1 -1
- package/dist/data/query-browser/QueryBrowser.d.ts +2 -41
- package/dist/data/query-browser/QueryBrowser.d.ts.map +1 -1
- package/dist/data/query-browser/QueryBrowser.editor.cjs +88 -0
- package/dist/data/query-browser/QueryBrowser.editor.cjs.map +1 -0
- package/dist/data/query-browser/QueryBrowser.editor.d.ts +12 -0
- package/dist/data/query-browser/QueryBrowser.editor.d.ts.map +1 -0
- package/dist/data/query-browser/QueryBrowser.editor.js +88 -0
- package/dist/data/query-browser/QueryBrowser.editor.js.map +1 -0
- package/dist/data/query-browser/QueryBrowser.js +205 -156
- package/dist/data/query-browser/QueryBrowser.js.map +1 -1
- package/dist/data/query-browser/QueryBrowser.types.cjs +11 -0
- package/dist/data/query-browser/QueryBrowser.types.cjs.map +1 -0
- package/dist/data/query-browser/QueryBrowser.types.d.ts +92 -0
- package/dist/data/query-browser/QueryBrowser.types.d.ts.map +1 -0
- package/dist/data/query-browser/QueryBrowser.types.js +11 -0
- package/dist/data/query-browser/QueryBrowser.types.js.map +1 -0
- package/dist/data/query-browser/QueryBrowserDiagnosticsPanel.cjs +56 -0
- package/dist/data/query-browser/QueryBrowserDiagnosticsPanel.cjs.map +1 -0
- package/dist/data/query-browser/QueryBrowserDiagnosticsPanel.d.ts +5 -0
- package/dist/data/query-browser/QueryBrowserDiagnosticsPanel.d.ts.map +1 -0
- package/dist/data/query-browser/QueryBrowserDiagnosticsPanel.js +56 -0
- package/dist/data/query-browser/QueryBrowserDiagnosticsPanel.js.map +1 -0
- package/dist/data/query-browser/QueryBrowserResults.cjs +80 -0
- package/dist/data/query-browser/QueryBrowserResults.cjs.map +1 -0
- package/dist/data/query-browser/QueryBrowserResults.d.ts +16 -0
- package/dist/data/query-browser/QueryBrowserResults.d.ts.map +1 -0
- package/dist/data/query-browser/QueryBrowserResults.js +80 -0
- package/dist/data/query-browser/QueryBrowserResults.js.map +1 -0
- package/dist/data/query-browser/index.d.ts +2 -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/{ai → runtime}/RuntimeBar.d.ts +8 -6
- 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.map +1 -0
- package/dist/data/{ai → runtime}/RuntimeBar.model.d.ts +2 -2
- package/dist/data/runtime/RuntimeBar.model.d.ts.map +1 -0
- package/dist/data/runtime/RuntimeBar.model.js.map +1 -0
- package/dist/data/{ai → runtime}/RuntimeBarCombo.cjs +25 -30
- package/dist/data/runtime/RuntimeBarCombo.cjs.map +1 -0
- package/dist/data/{ai → runtime}/RuntimeBarCombo.d.ts +4 -3
- package/dist/data/runtime/RuntimeBarCombo.d.ts.map +1 -0
- package/dist/data/{ai → runtime}/RuntimeBarCombo.js +25 -30
- package/dist/data/runtime/RuntimeBarCombo.js.map +1 -0
- package/dist/data/{ai/RuntimeBar.cjs → runtime/RuntimeBarSegments.cjs} +54 -120
- 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} +58 -124
- 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/runtime/model-capabilities.cjs.map +1 -0
- package/dist/data/runtime/model-capabilities.d.ts.map +1 -0
- 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 +119 -27
- package/dist/data/runtime/runtime-mode.cjs.map +1 -0
- package/dist/data/{ai → runtime}/runtime-mode.d.ts +7 -1
- package/dist/data/runtime/runtime-mode.d.ts.map +1 -0
- package/dist/data/{ai → runtime}/runtime-mode.js +120 -28
- package/dist/data/runtime/runtime-mode.js.map +1 -0
- package/dist/data/task-exec-details.cjs +9 -0
- package/dist/data/task-exec-details.cjs.map +1 -0
- package/dist/data/task-exec-details.d.ts +3 -0
- package/dist/data/task-exec-details.d.ts.map +1 -0
- package/dist/data/task-exec-details.js +9 -0
- package/dist/data/task-exec-details.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 +18 -0
- package/dist/data.cjs.map +1 -1
- package/dist/data.d.ts +6 -2
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +18 -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 +65 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +67 -2
- package/dist/index.js.map +1 -1
- package/dist/layout/AppShell.cjs +92 -56
- 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 +92 -56
- 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/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/FilterForm.cjs +20 -0
- package/dist/rpc/FilterForm.cjs.map +1 -1
- package/dist/rpc/FilterForm.js +20 -0
- package/dist/rpc/FilterForm.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 +83 -7
- package/dist/rpc/OperationCatalog.cjs.map +1 -1
- package/dist/rpc/OperationCatalog.d.ts.map +1 -1
- package/dist/rpc/OperationCatalog.js +84 -8
- package/dist/rpc/OperationCatalog.js.map +1 -1
- package/dist/rpc/OperationResultView.cjs +2 -0
- package/dist/rpc/OperationResultView.cjs.map +1 -1
- package/dist/rpc/OperationResultView.d.ts +6 -0
- package/dist/rpc/OperationResultView.d.ts.map +1 -1
- package/dist/rpc/OperationResultView.js +2 -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 +123 -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 +121 -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 +21 -2
- 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/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.map +0 -1
- package/dist/data/ai/RuntimeBar.js.map +0 -1
- package/dist/data/ai/RuntimeBar.model.cjs.map +0 -1
- package/dist/data/ai/RuntimeBar.model.d.ts.map +0 -1
- package/dist/data/ai/RuntimeBar.model.js.map +0 -1
- package/dist/data/ai/RuntimeBarCombo.cjs.map +0 -1
- package/dist/data/ai/RuntimeBarCombo.d.ts.map +0 -1
- package/dist/data/ai/RuntimeBarCombo.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
- /package/dist/data/{ai → runtime}/RuntimeBar.model.cjs +0 -0
- /package/dist/data/{ai → runtime}/RuntimeBar.model.js +0 -0
- /package/dist/data/{ai → runtime}/model-capabilities.cjs +0 -0
- /package/dist/data/{ai → runtime}/model-capabilities.d.ts +0 -0
- /package/dist/data/{ai → runtime}/model-capabilities.js +0 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const react = require("react");
|
|
4
|
+
const ToolArgs = require("./ToolArgs.cjs");
|
|
5
|
+
const shape = require("./shape.cjs");
|
|
6
|
+
const SCALAR_PREVIEW_LIMIT = 60;
|
|
7
|
+
function plural(count, noun) {
|
|
8
|
+
return `${count} ${noun}${count === 1 ? "" : "s"}`;
|
|
9
|
+
}
|
|
10
|
+
function summarizeToolValue(value) {
|
|
11
|
+
const classified = shape.classifyToolValue(value);
|
|
12
|
+
switch (classified.shape) {
|
|
13
|
+
case "paged":
|
|
14
|
+
return plural(classified.page.total ?? classified.items.length, "row");
|
|
15
|
+
case "list":
|
|
16
|
+
return plural(classified.items.length, classified.rows ? "row" : "item");
|
|
17
|
+
case "record":
|
|
18
|
+
return plural(Object.keys(classified.record).length, "field");
|
|
19
|
+
case "counts":
|
|
20
|
+
return plural(Object.keys(classified.record).length, "count");
|
|
21
|
+
case "scalar": {
|
|
22
|
+
const text = String(classified.value).replace(/\s+/g, " ").trim();
|
|
23
|
+
return text.length > SCALAR_PREVIEW_LIMIT ? `${text.slice(0, SCALAR_PREVIEW_LIMIT)}…` : text;
|
|
24
|
+
}
|
|
25
|
+
case "empty":
|
|
26
|
+
return "";
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function defaultToolSummary(ctx) {
|
|
30
|
+
return react.createElement(ToolArgs.ToolArgs, { input: ctx.input });
|
|
31
|
+
}
|
|
32
|
+
exports.defaultToolSummary = defaultToolSummary;
|
|
33
|
+
exports.summarizeToolValue = summarizeToolValue;
|
|
34
|
+
//# sourceMappingURL=summary.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"summary.cjs","sources":["../../../../src/data/chat/tool-render/summary.ts"],"sourcesContent":["// The collapsed one-line summary shown beside a tool name.\n\nimport { createElement, type ReactNode } from \"react\";\nimport type { ToolRenderAdapterContext } from \"./adapter\";\nimport { ToolArgs } from \"./ToolArgs\";\nimport { classifyToolValue } from \"./shape\";\n\nconst SCALAR_PREVIEW_LIMIT = 60;\n\nfunction plural(count: number, noun: string): string {\n return `${count} ${noun}${count === 1 ? \"\" : \"s\"}`;\n}\n\n/** A short description of a normalized tool result: \"12 rows\", \"3 fields\", or a\n * truncated scalar. Empty when there is nothing worth saying. */\nexport function summarizeToolValue(value: unknown): string {\n const classified = classifyToolValue(value);\n switch (classified.shape) {\n case \"paged\":\n return plural(classified.page.total ?? classified.items.length, \"row\");\n case \"list\":\n return plural(classified.items.length, classified.rows ? \"row\" : \"item\");\n case \"record\":\n return plural(Object.keys(classified.record).length, \"field\");\n case \"counts\":\n return plural(Object.keys(classified.record).length, \"count\");\n case \"scalar\": {\n const text = String(classified.value).replace(/\\s+/g, \" \").trim();\n return text.length > SCALAR_PREVIEW_LIMIT\n ? `${text.slice(0, SCALAR_PREVIEW_LIMIT)}…`\n : text;\n }\n case \"empty\":\n return \"\";\n }\n}\n\n/** Built-in collapsed summary: compact input arguments with muted keys. */\nexport function defaultToolSummary(ctx: ToolRenderAdapterContext): ReactNode {\n return createElement(ToolArgs, { input: ctx.input });\n}\n"],"names":["classifyToolValue","createElement","ToolArgs"],"mappings":";;;;;AAOA,MAAM,uBAAuB;AAE7B,SAAS,OAAO,OAAe,MAAsB;AACnD,SAAO,GAAG,KAAK,IAAI,IAAI,GAAG,UAAU,IAAI,KAAK,GAAG;AAClD;AAIO,SAAS,mBAAmB,OAAwB;AACzD,QAAM,aAAaA,MAAAA,kBAAkB,KAAK;AAC1C,UAAQ,WAAW,OAAA;AAAA,IACjB,KAAK;AACH,aAAO,OAAO,WAAW,KAAK,SAAS,WAAW,MAAM,QAAQ,KAAK;AAAA,IACvE,KAAK;AACH,aAAO,OAAO,WAAW,MAAM,QAAQ,WAAW,OAAO,QAAQ,MAAM;AAAA,IACzE,KAAK;AACH,aAAO,OAAO,OAAO,KAAK,WAAW,MAAM,EAAE,QAAQ,OAAO;AAAA,IAC9D,KAAK;AACH,aAAO,OAAO,OAAO,KAAK,WAAW,MAAM,EAAE,QAAQ,OAAO;AAAA,IAC9D,KAAK,UAAU;AACb,YAAM,OAAO,OAAO,WAAW,KAAK,EAAE,QAAQ,QAAQ,GAAG,EAAE,KAAA;AAC3D,aAAO,KAAK,SAAS,uBACjB,GAAG,KAAK,MAAM,GAAG,oBAAoB,CAAC,MACtC;AAAA,IACN;AAAA,IACA,KAAK;AACH,aAAO;AAAA,EAAA;AAEb;AAGO,SAAS,mBAAmB,KAA0C;AAC3E,SAAOC,MAAAA,cAAcC,SAAAA,UAAU,EAAE,OAAO,IAAI,OAAO;AACrD;;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ToolRenderAdapterContext } from './adapter';
|
|
3
|
+
/** A short description of a normalized tool result: "12 rows", "3 fields", or a
|
|
4
|
+
* truncated scalar. Empty when there is nothing worth saying. */
|
|
5
|
+
export declare function summarizeToolValue(value: unknown): string;
|
|
6
|
+
/** Built-in collapsed summary: compact input arguments with muted keys. */
|
|
7
|
+
export declare function defaultToolSummary(ctx: ToolRenderAdapterContext): ReactNode;
|
|
8
|
+
//# sourceMappingURL=summary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"summary.d.ts","sourceRoot":"","sources":["../../../../src/data/chat/tool-render/summary.ts"],"names":[],"mappings":"AAEA,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAU1D;kEACkE;AAClE,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAoBzD;AAED,2EAA2E;AAC3E,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,wBAAwB,GAAG,SAAS,CAE3E"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { createElement } from "react";
|
|
2
|
+
import { ToolArgs } from "./ToolArgs.js";
|
|
3
|
+
import { classifyToolValue } from "./shape.js";
|
|
4
|
+
const SCALAR_PREVIEW_LIMIT = 60;
|
|
5
|
+
function plural(count, noun) {
|
|
6
|
+
return `${count} ${noun}${count === 1 ? "" : "s"}`;
|
|
7
|
+
}
|
|
8
|
+
function summarizeToolValue(value) {
|
|
9
|
+
const classified = classifyToolValue(value);
|
|
10
|
+
switch (classified.shape) {
|
|
11
|
+
case "paged":
|
|
12
|
+
return plural(classified.page.total ?? classified.items.length, "row");
|
|
13
|
+
case "list":
|
|
14
|
+
return plural(classified.items.length, classified.rows ? "row" : "item");
|
|
15
|
+
case "record":
|
|
16
|
+
return plural(Object.keys(classified.record).length, "field");
|
|
17
|
+
case "counts":
|
|
18
|
+
return plural(Object.keys(classified.record).length, "count");
|
|
19
|
+
case "scalar": {
|
|
20
|
+
const text = String(classified.value).replace(/\s+/g, " ").trim();
|
|
21
|
+
return text.length > SCALAR_PREVIEW_LIMIT ? `${text.slice(0, SCALAR_PREVIEW_LIMIT)}…` : text;
|
|
22
|
+
}
|
|
23
|
+
case "empty":
|
|
24
|
+
return "";
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function defaultToolSummary(ctx) {
|
|
28
|
+
return createElement(ToolArgs, { input: ctx.input });
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
defaultToolSummary,
|
|
32
|
+
summarizeToolValue
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=summary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"summary.js","sources":["../../../../src/data/chat/tool-render/summary.ts"],"sourcesContent":["// The collapsed one-line summary shown beside a tool name.\n\nimport { createElement, type ReactNode } from \"react\";\nimport type { ToolRenderAdapterContext } from \"./adapter\";\nimport { ToolArgs } from \"./ToolArgs\";\nimport { classifyToolValue } from \"./shape\";\n\nconst SCALAR_PREVIEW_LIMIT = 60;\n\nfunction plural(count: number, noun: string): string {\n return `${count} ${noun}${count === 1 ? \"\" : \"s\"}`;\n}\n\n/** A short description of a normalized tool result: \"12 rows\", \"3 fields\", or a\n * truncated scalar. Empty when there is nothing worth saying. */\nexport function summarizeToolValue(value: unknown): string {\n const classified = classifyToolValue(value);\n switch (classified.shape) {\n case \"paged\":\n return plural(classified.page.total ?? classified.items.length, \"row\");\n case \"list\":\n return plural(classified.items.length, classified.rows ? \"row\" : \"item\");\n case \"record\":\n return plural(Object.keys(classified.record).length, \"field\");\n case \"counts\":\n return plural(Object.keys(classified.record).length, \"count\");\n case \"scalar\": {\n const text = String(classified.value).replace(/\\s+/g, \" \").trim();\n return text.length > SCALAR_PREVIEW_LIMIT\n ? `${text.slice(0, SCALAR_PREVIEW_LIMIT)}…`\n : text;\n }\n case \"empty\":\n return \"\";\n }\n}\n\n/** Built-in collapsed summary: compact input arguments with muted keys. */\nexport function defaultToolSummary(ctx: ToolRenderAdapterContext): ReactNode {\n return createElement(ToolArgs, { input: ctx.input });\n}\n"],"names":[],"mappings":";;;AAOA,MAAM,uBAAuB;AAE7B,SAAS,OAAO,OAAe,MAAsB;AACnD,SAAO,GAAG,KAAK,IAAI,IAAI,GAAG,UAAU,IAAI,KAAK,GAAG;AAClD;AAIO,SAAS,mBAAmB,OAAwB;AACzD,QAAM,aAAa,kBAAkB,KAAK;AAC1C,UAAQ,WAAW,OAAA;AAAA,IACjB,KAAK;AACH,aAAO,OAAO,WAAW,KAAK,SAAS,WAAW,MAAM,QAAQ,KAAK;AAAA,IACvE,KAAK;AACH,aAAO,OAAO,WAAW,MAAM,QAAQ,WAAW,OAAO,QAAQ,MAAM;AAAA,IACzE,KAAK;AACH,aAAO,OAAO,OAAO,KAAK,WAAW,MAAM,EAAE,QAAQ,OAAO;AAAA,IAC9D,KAAK;AACH,aAAO,OAAO,OAAO,KAAK,WAAW,MAAM,EAAE,QAAQ,OAAO;AAAA,IAC9D,KAAK,UAAU;AACb,YAAM,OAAO,OAAO,WAAW,KAAK,EAAE,QAAQ,QAAQ,GAAG,EAAE,KAAA;AAC3D,aAAO,KAAK,SAAS,uBACjB,GAAG,KAAK,MAAM,GAAG,oBAAoB,CAAC,MACtC;AAAA,IACN;AAAA,IACA,KAAK;AACH,aAAO;AAAA,EAAA;AAEb;AAGO,SAAS,mBAAmB,KAA0C;AAC3E,SAAO,cAAc,UAAU,EAAE,OAAO,IAAI,OAAO;AACrD;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.cjs","sources":["../../../src/data/chat/types.ts"],"sourcesContent":["import type {\n UIMessage,\n ToolUIPart,\n DynamicToolUIPart,\n ChatStatus,\n ReasoningUIPart,\n FileUIPart,\n} from \"ai\";\nimport type { ReactNode } from \"react\";\nimport type {\n JsonSchemaObject,\n JsonSchemaProperty as FormJsonSchemaProperty,\n} from \"../../components/json-schema-form-types\";\n\nexport type {\n UIMessage,\n ToolUIPart,\n DynamicToolUIPart,\n ChatStatus,\n ReasoningUIPart,\n FileUIPart,\n};\n\n/** A selectable chat model, as served by the backend's GET /api/chat/models.\n * `configured` is false for catalogued models whose provider has no API key. */\nexport interface ChatModelRuntime {\n model?: string;\n id?: string;\n backend?: string;\n mode?: string;\n temperature?: number;\n effort?: string;\n noCache?: boolean;\n fallbacks?: ChatModelRuntime[];\n}\n\nexport interface ChatModel {\n id: string;\n provider: string;\n label: string;\n /** Exact Captain Model wire value submitted when this display row is selected. */\n runtime?: ChatModelRuntime;\n reasoning: boolean;\n /** True when backend metadata is authoritative, including explicit unsupported values. */\n capabilitiesKnown?: boolean;\n /** Ordered reasoning-effort tiers accepted by this exact model. */\n supportedEfforts?: string[];\n /** Backend-recommended effort used when the current selection is invalid. */\n defaultEffort?: string;\n /** Whether the model honours the temperature sampling control. */\n temperature?: boolean;\n configured?: boolean;\n /**\n * The catalog's own declared default — the row a picker seeds with when the\n * caller names no model. At most one row carries it, and a catalog that\n * declares none (or whose default is unconfigured) falls back to the first\n * configured row.\n */\n default?: boolean;\n /** Concrete runtime backends that advertised this model. Empty/omitted means provider-wide. */\n backends?: string[];\n /** Max context tokens — the denominator for a usage gauge. */\n contextWindow?: number;\n /** MIME patterns accepted as model inputs, e.g. image/* or application/pdf. */\n inputMediaTypes?: string[];\n}\n\n/** Per-message metadata the backend rides on the SSE `finish` part\n * (`messageMetadata`), applied by the AI SDK to the assistant `UIMessage`. */\nexport interface ChatMessageMetadata {\n usage?: ChatUsageBreakdown;\n costBreakdown?: ChatCostBreakdown;\n /** This turn's cost in USD. */\n cost?: number;\n /** Cumulative thread cost in USD (when the turn is persisted to a thread). */\n threadCostUsd?: number;\n /** This turn's input-token count, ≈ current context-window occupancy. */\n contextTokens?: number;\n}\n\n/** A flattened usage snapshot a chat surfaces for a gauge: tokens used out of the\n * model's context window, plus cumulative cost. */\nexport interface ChatUsageSummary {\n usedTokens: number;\n maxTokens: number;\n cost?: number;\n usage?: ChatUsageBreakdown;\n costBreakdown?: ChatCostBreakdown;\n messageCount: number;\n modelLabel?: string;\n}\n\nexport interface ChatBudgetConfig {\n /** Per-thread/request cost cap in USD. */\n cost?: number;\n /** Max output tokens for one model call. */\n maxTokens?: number;\n}\n\nexport interface ChatUsageBreakdown {\n inputTokens?: number;\n outputTokens?: number;\n reasoningTokens?: number;\n cacheReadTokens?: number;\n cacheWriteTokens?: number;\n totalTokens?: number;\n}\n\nexport interface ChatCostBreakdown {\n model?: string;\n inputUsd?: number;\n outputUsd?: number;\n reasoningUsd?: number;\n cacheReadUsd?: number;\n cacheWriteUsd?: number;\n totalUsd?: number;\n}\n\n/** A suggested prompt shown on the empty state. A bare string is both the label\n * and the submitted text; the object form separates them. */\nexport type Suggestion = string | { label: string; prompt: string };\n\n/** The label shown for a suggestion. */\nexport function suggestionLabel(s: Suggestion): string {\n return typeof s === \"string\" ? s : s.label;\n}\n\n/** The text submitted when a suggestion is clicked. */\nexport function suggestionPrompt(s: Suggestion): string {\n return typeof s === \"string\" ? s : s.prompt;\n}\n\n/** Returns true for an assistant reasoning (\"thinking\") part. */\nexport function isReasoningPart(part: {\n type: string;\n}): part is ReasoningUIPart {\n return part.type === \"reasoning\";\n}\n\n/** Returns true for a file/attachment part. */\nexport function isFilePart(part: { type: string }): part is FileUIPart {\n return part.type === \"file\";\n}\n\n/** A tool part as it appears in an assistant UIMessage — either a typed\n * `tool-<name>` part or the generic `dynamic-tool` part. clicky operations\n * surface as dynamic tools, so the chat UI renders both shapes. */\nexport type AnyToolPart = ToolUIPart | DynamicToolUIPart;\n\n/** Claude Agent SDK permission modes accepted by `permissionMode`. */\nexport const CLAUDE_PERMISSION_MODES = [\n \"default\",\n \"acceptEdits\",\n \"bypassPermissions\",\n \"plan\",\n \"dontAsk\",\n \"auto\",\n] as const;\n\nexport type ClaudePermissionMode = (typeof CLAUDE_PERMISSION_MODES)[number];\n\nexport type ClaudePermissionModeOption = {\n value: ClaudePermissionMode;\n label: string;\n description: string;\n};\n\nexport const CLAUDE_PERMISSION_MODE_OPTIONS: ClaudePermissionModeOption[] = [\n {\n value: \"default\",\n label: \"Default\",\n description:\n \"Prompt for dangerous operations using standard Claude behavior.\",\n },\n {\n value: \"auto\",\n label: \"Auto\",\n description:\n \"Use Claude's classifier to approve or deny permission prompts.\",\n },\n {\n value: \"acceptEdits\",\n label: \"Accept edits\",\n description: \"Automatically accept file edit operations.\",\n },\n {\n value: \"dontAsk\",\n label: \"Don't ask\",\n description: \"Do not prompt; deny actions that are not pre-approved.\",\n },\n {\n value: \"plan\",\n label: \"Plan\",\n description: \"Planning mode with no tool execution.\",\n },\n {\n value: \"bypassPermissions\",\n label: \"Bypass\",\n description:\n \"Bypass permission checks when explicitly allowed by the host.\",\n },\n];\n\n/** Tool metadata shared by the chat shell. It both configures the\n * tool-preferences popover (`name`/`label`/`group`) and carries the schema\n * derived from a clicky RPC operation (`description`/`inputSchema`). The Go\n * backend owns execution; the client uses this only for display and to scope\n * which tools a request may call (passed in the transport `body`). */\nexport type ToolMode = \"on\" | \"ask\" | \"off\" | \"auto\";\n\nexport interface ToolAnnotations {\n title?: string;\n readOnlyHint?: boolean;\n destructiveHint?: boolean;\n idempotentHint?: boolean;\n openWorldHint?: boolean;\n [key: string]: unknown;\n}\n\nexport interface ToolMeta {\n /** Stable tool name sent to the model (the operation id). */\n name: string;\n /** Human-readable label shown in the tool-preferences popover. */\n label: string;\n /** Bucket heading in the popover — the clicky surface for RPC operations. */\n group?: string;\n /** Display title of the tool's parent surface/entity (e.g. \"Xero Accounts\").\n * Used to nest tools under their entity within a group, and as the\n * disambiguating prefix in flat lists so sibling verbs (\"List\", \"Get\") stay\n * distinguishable. Resolved from the operation's `x-clicky.surface`. */\n parent?: string;\n /** Raw entity name of the tool's surface (e.g. \"accounts\"), when known. */\n entity?: string;\n /** Preference key sent to the backend. Defaults to `name`; group-backed\n * clicky tools set this to the backend tool group. */\n preferenceKey?: string;\n /** Initial backend-owned permission when the chat window first sees this tool. */\n defaultPermission?: ToolMode;\n /** Opaque icon name emitted by the backend, resolved by the host UI. */\n icon?: string;\n /** Description shown in tool pickers / tool-call headers. */\n description?: string;\n /** Short usage hints shown in the tool browser. */\n hints?: string[];\n source?: \"clicky\" | \"custom\" | \"mcp\" | string;\n server?: string;\n method?: string;\n path?: string;\n operationName?: string;\n title?: string;\n /** Whether the runtime should treat the tool input schema as strict/closed. */\n strict?: boolean;\n /** Runtime tool annotations/hints, e.g. MCP/Genkit well-known hints. */\n annotations?: ToolAnnotations;\n /** JSON-Schema for the tool's input, assembled from an operation's\n * parameters + request body. Omitted for hand-authored tools. */\n inputSchema?: ChatToolInputSchema;\n outputSchema?: ChatToolInputSchema;\n}\n\nexport type ChatToolInputSchema = JsonSchemaObject;\nexport type JsonSchemaProperty = FormJsonSchemaProperty;\nexport type JSONSchemaProperty = FormJsonSchemaProperty;\n\n/** Returns true for a `dynamic-tool` part (clicky operations surface this way). */\nexport function isDynamicToolPart(part: {\n type: string;\n}): part is DynamicToolUIPart {\n return part.type === \"dynamic-tool\";\n}\n\n/** Returns true for a typed `tool-<name>` part. */\nexport function isTypedToolPart(part: { type: string }): part is ToolUIPart {\n return part.type.startsWith(\"tool-\");\n}\n\n/** The display name of a tool part: the explicit `toolName` for dynamic tools,\n * otherwise the suffix after `tool-`. */\nexport function toolPartName(part: AnyToolPart): string {\n if (isDynamicToolPart(part)) {\n return part.toolName;\n }\n return part.type.slice(\"tool-\".length);\n}\n\nexport interface ToolResultRenderArgs {\n part: AnyToolPart;\n toolName: string;\n output: unknown;\n}\n\nexport type ToolResultRenderer = (args: ToolResultRenderArgs) => ReactNode;\n"],"names":[],"mappings":";;AA2HO,SAAS,gBAAgB,GAAuB;AACrD,SAAO,OAAO,MAAM,WAAW,IAAI,EAAE;AACvC;AAGO,SAAS,iBAAiB,GAAuB;AACtD,SAAO,OAAO,MAAM,WAAW,IAAI,EAAE;AACvC;AAGO,SAAS,gBAAgB,MAEJ;AAC1B,SAAO,KAAK,SAAS;AACvB;AAGO,SAAS,WAAW,MAA4C;AACrE,SAAO,KAAK,SAAS;AACvB;AAQO,MAAM,0BAA0B;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAUO,MAAM,iCAA+D;AAAA,EAC1E;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aACE;AAAA,EAAA;AAAA,EAEJ;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aACE;AAAA,EAAA;AAAA,EAEJ;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,EAAA;AAAA,EAEf;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,EAAA;AAAA,EAEf;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,EAAA;AAAA,EAEf;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aACE;AAAA,EAAA;AAEN;AAgEO,SAAS,kBAAkB,MAEJ;AAC5B,SAAO,KAAK,SAAS;AACvB;AAGO,SAAS,gBAAgB,MAA4C;AAC1E,SAAO,KAAK,KAAK,WAAW,OAAO;AACrC;AAIO,SAAS,aAAa,MAA2B;AACtD,MAAI,kBAAkB,IAAI,GAAG;AAC3B,WAAO,KAAK;AAAA,EACd;AACA,SAAO,KAAK,KAAK,MAAM,QAAQ,MAAM;AACvC;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"types.cjs","sources":["../../../src/data/chat/types.ts"],"sourcesContent":["import type {\n UIMessage,\n ToolUIPart,\n DynamicToolUIPart,\n ChatStatus,\n ReasoningUIPart,\n FileUIPart,\n} from \"ai\";\nimport type { ReactNode } from \"react\";\nimport type {\n JsonSchemaObject,\n JsonSchemaProperty as FormJsonSchemaProperty,\n} from \"../../components/json-schema-form-types\";\n\nexport type {\n UIMessage,\n ToolUIPart,\n DynamicToolUIPart,\n ChatStatus,\n ReasoningUIPart,\n FileUIPart,\n};\n\n/** A selectable chat model, as served by the backend's GET /api/chat/models.\n * `configured` is false for catalogued models whose provider has no API key. */\nexport interface ChatModelRuntime {\n model?: string;\n id?: string;\n backend?: string;\n mode?: string;\n temperature?: number;\n effort?: string;\n noCache?: boolean;\n fallbacks?: ChatModelRuntime[];\n}\n\nexport type RuntimeAvailabilityState =\n | \"available\"\n | \"disabled\"\n | \"missing_credentials\"\n | \"not_authenticated\"\n | \"missing_executable\"\n | \"missing_dependency\"\n | \"unsupported\"\n | \"unavailable\";\n\nexport interface RuntimeAvailability {\n state: RuntimeAvailabilityState;\n reason?: string;\n remediation?: string;\n}\n\nexport interface ChatModel {\n id: string;\n provider: string;\n label: string;\n /** Exact Captain Model wire value submitted when this display row is selected. */\n runtime?: ChatModelRuntime;\n reasoning: boolean;\n /** True when backend metadata is authoritative, including explicit unsupported values. */\n capabilitiesKnown?: boolean;\n /** Ordered reasoning-effort tiers accepted by this exact model. */\n supportedEfforts?: string[];\n /** Backend-recommended effort used when the current selection is invalid. */\n defaultEffort?: string;\n /** Whether the model honours the temperature sampling control. */\n temperature?: boolean;\n configured?: boolean;\n availability?: RuntimeAvailability;\n /**\n * The catalog's own declared default — the row a picker seeds with when the\n * caller names no model. At most one row carries it, and a catalog that\n * declares none (or whose default is unconfigured) falls back to the first\n * configured row.\n */\n default?: boolean;\n /** Concrete runtime backends that advertised this model. Empty/omitted means provider-wide. */\n backends?: string[];\n /** Max context tokens — the denominator for a usage gauge. */\n contextWindow?: number;\n /** MIME patterns accepted as model inputs, e.g. image/* or application/pdf. */\n inputMediaTypes?: string[];\n}\n\n/** Per-message metadata the backend rides on the SSE `finish` part\n * (`messageMetadata`), applied by the AI SDK to the assistant `UIMessage`. */\nexport interface ChatMessageMetadata {\n usage?: ChatUsageBreakdown;\n costBreakdown?: ChatCostBreakdown;\n /** This turn's cost in USD. */\n cost?: number;\n /** Cumulative thread cost in USD (when the turn is persisted to a thread). */\n threadCostUsd?: number;\n /** This turn's input-token count, ≈ current context-window occupancy. */\n contextTokens?: number;\n}\n\n/** A flattened usage snapshot a chat surfaces for a gauge: tokens used out of the\n * model's context window, plus cumulative cost. */\nexport interface ChatUsageSummary {\n usedTokens: number;\n maxTokens: number;\n cost?: number;\n usage?: ChatUsageBreakdown;\n costBreakdown?: ChatCostBreakdown;\n messageCount: number;\n modelLabel?: string;\n}\n\nexport interface ChatBudgetConfig {\n /** Per-thread/request cost cap in USD. */\n cost?: number;\n /** Max output tokens for one model call. */\n maxTokens?: number;\n}\n\nexport interface ChatUsageBreakdown {\n inputTokens?: number;\n outputTokens?: number;\n reasoningTokens?: number;\n cacheReadTokens?: number;\n cacheWriteTokens?: number;\n totalTokens?: number;\n}\n\nexport interface ChatCostBreakdown {\n model?: string;\n inputUsd?: number;\n outputUsd?: number;\n reasoningUsd?: number;\n cacheReadUsd?: number;\n cacheWriteUsd?: number;\n totalUsd?: number;\n}\n\n/** A suggested prompt shown on the empty state. A bare string is both the label\n * and the submitted text; the object form separates them. */\nexport type Suggestion = string | { label: string; prompt: string };\n\n/** The label shown for a suggestion. */\nexport function suggestionLabel(s: Suggestion): string {\n return typeof s === \"string\" ? s : s.label;\n}\n\n/** The text submitted when a suggestion is clicked. */\nexport function suggestionPrompt(s: Suggestion): string {\n return typeof s === \"string\" ? s : s.prompt;\n}\n\n/** Returns true for an assistant reasoning (\"thinking\") part. */\nexport function isReasoningPart(part: {\n type: string;\n}): part is ReasoningUIPart {\n return part.type === \"reasoning\";\n}\n\n/** Returns true for a file/attachment part. */\nexport function isFilePart(part: { type: string }): part is FileUIPart {\n return part.type === \"file\";\n}\n\n/** A tool part as it appears in an assistant UIMessage — either a typed\n * `tool-<name>` part or the generic `dynamic-tool` part. clicky operations\n * surface as dynamic tools, so the chat UI renders both shapes. */\nexport type AnyToolPart = ToolUIPart | DynamicToolUIPart;\n\n/** Claude Agent SDK permission modes accepted by `permissionMode`. */\nexport const CLAUDE_PERMISSION_MODES = [\n \"default\",\n \"acceptEdits\",\n \"bypassPermissions\",\n \"plan\",\n \"dontAsk\",\n \"auto\",\n] as const;\n\nexport type ClaudePermissionMode = (typeof CLAUDE_PERMISSION_MODES)[number];\n\nexport type ClaudePermissionModeOption = {\n value: ClaudePermissionMode;\n label: string;\n description: string;\n};\n\nexport const CLAUDE_PERMISSION_MODE_OPTIONS: ClaudePermissionModeOption[] = [\n {\n value: \"default\",\n label: \"Default\",\n description:\n \"Prompt for dangerous operations using standard Claude behavior.\",\n },\n {\n value: \"auto\",\n label: \"Auto\",\n description:\n \"Use Claude's classifier to approve or deny permission prompts.\",\n },\n {\n value: \"acceptEdits\",\n label: \"Accept edits\",\n description: \"Automatically accept file edit operations.\",\n },\n {\n value: \"dontAsk\",\n label: \"Don't ask\",\n description: \"Do not prompt; deny actions that are not pre-approved.\",\n },\n {\n value: \"plan\",\n label: \"Plan\",\n description: \"Planning mode with no tool execution.\",\n },\n {\n value: \"bypassPermissions\",\n label: \"Bypass\",\n description:\n \"Bypass permission checks when explicitly allowed by the host.\",\n },\n];\n\n/** Tool metadata shared by the chat shell. It both configures the\n * tool-preferences popover (`name`/`label`/`group`) and carries the schema\n * derived from a clicky RPC operation (`description`/`inputSchema`). The Go\n * backend owns execution; the client uses this only for display and to scope\n * which tools a request may call (passed in the transport `body`). */\nexport type ToolMode = \"on\" | \"ask\" | \"off\" | \"auto\";\n\nexport interface ToolAnnotations {\n title?: string;\n readOnlyHint?: boolean;\n destructiveHint?: boolean;\n idempotentHint?: boolean;\n openWorldHint?: boolean;\n [key: string]: unknown;\n}\n\nexport interface ToolMeta {\n /** Stable tool name sent to the model (the operation id). */\n name: string;\n /** Human-readable label shown in the tool-preferences popover. */\n label: string;\n /** Bucket heading in the popover — the clicky surface for RPC operations. */\n group?: string;\n /** Display title of the tool's parent surface/entity (e.g. \"Xero Accounts\").\n * Used to nest tools under their entity within a group, and as the\n * disambiguating prefix in flat lists so sibling verbs (\"List\", \"Get\") stay\n * distinguishable. Resolved from the operation's `x-clicky.surface`. */\n parent?: string;\n /** Raw entity name of the tool's surface (e.g. \"accounts\"), when known. */\n entity?: string;\n /** Preference key sent to the backend. Defaults to `name`; group-backed\n * clicky tools set this to the backend tool group. */\n preferenceKey?: string;\n /** Initial backend-owned permission when the chat window first sees this tool. */\n defaultPermission?: ToolMode;\n /** Opaque icon name emitted by the backend, resolved by the host UI. */\n icon?: string;\n /** Description shown in tool pickers / tool-call headers. */\n description?: string;\n /** Short usage hints shown in the tool browser. */\n hints?: string[];\n source?: \"clicky\" | \"custom\" | \"mcp\" | string;\n server?: string;\n method?: string;\n path?: string;\n operationName?: string;\n title?: string;\n /** Whether the runtime should treat the tool input schema as strict/closed. */\n strict?: boolean;\n /** Runtime tool annotations/hints, e.g. MCP/Genkit well-known hints. */\n annotations?: ToolAnnotations;\n /** JSON-Schema for the tool's input, assembled from an operation's\n * parameters + request body. Omitted for hand-authored tools. */\n inputSchema?: ChatToolInputSchema;\n outputSchema?: ChatToolInputSchema;\n}\n\nexport type ChatToolInputSchema = JsonSchemaObject;\nexport type JsonSchemaProperty = FormJsonSchemaProperty;\nexport type JSONSchemaProperty = FormJsonSchemaProperty;\n\n/** Returns true for a `dynamic-tool` part (clicky operations surface this way). */\nexport function isDynamicToolPart(part: {\n type: string;\n}): part is DynamicToolUIPart {\n return part.type === \"dynamic-tool\";\n}\n\n/** Returns true for a typed `tool-<name>` part. */\nexport function isTypedToolPart(part: { type: string }): part is ToolUIPart {\n return part.type.startsWith(\"tool-\");\n}\n\n/** The display name of a tool part: the explicit `toolName` for dynamic tools,\n * otherwise the suffix after `tool-`. */\nexport function toolPartName(part: AnyToolPart): string {\n if (isDynamicToolPart(part)) {\n return part.toolName;\n }\n return part.type.slice(\"tool-\".length);\n}\n\nexport interface ToolResultRenderArgs {\n part: AnyToolPart;\n toolName: string;\n output: unknown;\n}\n\nexport type ToolResultRenderer = (args: ToolResultRenderArgs) => ReactNode;\n"],"names":[],"mappings":";;AA4IO,SAAS,gBAAgB,GAAuB;AACrD,SAAO,OAAO,MAAM,WAAW,IAAI,EAAE;AACvC;AAGO,SAAS,iBAAiB,GAAuB;AACtD,SAAO,OAAO,MAAM,WAAW,IAAI,EAAE;AACvC;AAGO,SAAS,gBAAgB,MAEJ;AAC1B,SAAO,KAAK,SAAS;AACvB;AAGO,SAAS,WAAW,MAA4C;AACrE,SAAO,KAAK,SAAS;AACvB;AAQO,MAAM,0BAA0B;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAUO,MAAM,iCAA+D;AAAA,EAC1E;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aACE;AAAA,EAAA;AAAA,EAEJ;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aACE;AAAA,EAAA;AAAA,EAEJ;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,EAAA;AAAA,EAEf;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,EAAA;AAAA,EAEf;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,EAAA;AAAA,EAEf;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aACE;AAAA,EAAA;AAEN;AAgEO,SAAS,kBAAkB,MAEJ;AAC5B,SAAO,KAAK,SAAS;AACvB;AAGO,SAAS,gBAAgB,MAA4C;AAC1E,SAAO,KAAK,KAAK,WAAW,OAAO;AACrC;AAIO,SAAS,aAAa,MAA2B;AACtD,MAAI,kBAAkB,IAAI,GAAG;AAC3B,WAAO,KAAK;AAAA,EACd;AACA,SAAO,KAAK,KAAK,MAAM,QAAQ,MAAM;AACvC;;;;;;;;;;"}
|
|
@@ -14,6 +14,12 @@ export interface ChatModelRuntime {
|
|
|
14
14
|
noCache?: boolean;
|
|
15
15
|
fallbacks?: ChatModelRuntime[];
|
|
16
16
|
}
|
|
17
|
+
export type RuntimeAvailabilityState = "available" | "disabled" | "missing_credentials" | "not_authenticated" | "missing_executable" | "missing_dependency" | "unsupported" | "unavailable";
|
|
18
|
+
export interface RuntimeAvailability {
|
|
19
|
+
state: RuntimeAvailabilityState;
|
|
20
|
+
reason?: string;
|
|
21
|
+
remediation?: string;
|
|
22
|
+
}
|
|
17
23
|
export interface ChatModel {
|
|
18
24
|
id: string;
|
|
19
25
|
provider: string;
|
|
@@ -30,6 +36,7 @@ export interface ChatModel {
|
|
|
30
36
|
/** Whether the model honours the temperature sampling control. */
|
|
31
37
|
temperature?: boolean;
|
|
32
38
|
configured?: boolean;
|
|
39
|
+
availability?: RuntimeAvailability;
|
|
33
40
|
/**
|
|
34
41
|
* The catalog's own declared default — the row a picker seeds with when the
|
|
35
42
|
* caller names no model. At most one row carries it, and a catalog that
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/data/chat/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,eAAe,EACf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ED;0CAC0C;AAC1C,wBAAgB,YAAY,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,CAKtD;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,WAAW,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,MAAM,kBAAkB,GAAG,CAAC,IAAI,EAAE,oBAAoB,KAAK,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../../../src/data/chat/types.ts"],"sourcesContent":["import type {\n UIMessage,\n ToolUIPart,\n DynamicToolUIPart,\n ChatStatus,\n ReasoningUIPart,\n FileUIPart,\n} from \"ai\";\nimport type { ReactNode } from \"react\";\nimport type {\n JsonSchemaObject,\n JsonSchemaProperty as FormJsonSchemaProperty,\n} from \"../../components/json-schema-form-types\";\n\nexport type {\n UIMessage,\n ToolUIPart,\n DynamicToolUIPart,\n ChatStatus,\n ReasoningUIPart,\n FileUIPart,\n};\n\n/** A selectable chat model, as served by the backend's GET /api/chat/models.\n * `configured` is false for catalogued models whose provider has no API key. */\nexport interface ChatModelRuntime {\n model?: string;\n id?: string;\n backend?: string;\n mode?: string;\n temperature?: number;\n effort?: string;\n noCache?: boolean;\n fallbacks?: ChatModelRuntime[];\n}\n\nexport interface ChatModel {\n id: string;\n provider: string;\n label: string;\n /** Exact Captain Model wire value submitted when this display row is selected. */\n runtime?: ChatModelRuntime;\n reasoning: boolean;\n /** True when backend metadata is authoritative, including explicit unsupported values. */\n capabilitiesKnown?: boolean;\n /** Ordered reasoning-effort tiers accepted by this exact model. */\n supportedEfforts?: string[];\n /** Backend-recommended effort used when the current selection is invalid. */\n defaultEffort?: string;\n /** Whether the model honours the temperature sampling control. */\n temperature?: boolean;\n configured?: boolean;\n /**\n * The catalog's own declared default — the row a picker seeds with when the\n * caller names no model. At most one row carries it, and a catalog that\n * declares none (or whose default is unconfigured) falls back to the first\n * configured row.\n */\n default?: boolean;\n /** Concrete runtime backends that advertised this model. Empty/omitted means provider-wide. */\n backends?: string[];\n /** Max context tokens — the denominator for a usage gauge. */\n contextWindow?: number;\n /** MIME patterns accepted as model inputs, e.g. image/* or application/pdf. */\n inputMediaTypes?: string[];\n}\n\n/** Per-message metadata the backend rides on the SSE `finish` part\n * (`messageMetadata`), applied by the AI SDK to the assistant `UIMessage`. */\nexport interface ChatMessageMetadata {\n usage?: ChatUsageBreakdown;\n costBreakdown?: ChatCostBreakdown;\n /** This turn's cost in USD. */\n cost?: number;\n /** Cumulative thread cost in USD (when the turn is persisted to a thread). */\n threadCostUsd?: number;\n /** This turn's input-token count, ≈ current context-window occupancy. */\n contextTokens?: number;\n}\n\n/** A flattened usage snapshot a chat surfaces for a gauge: tokens used out of the\n * model's context window, plus cumulative cost. */\nexport interface ChatUsageSummary {\n usedTokens: number;\n maxTokens: number;\n cost?: number;\n usage?: ChatUsageBreakdown;\n costBreakdown?: ChatCostBreakdown;\n messageCount: number;\n modelLabel?: string;\n}\n\nexport interface ChatBudgetConfig {\n /** Per-thread/request cost cap in USD. */\n cost?: number;\n /** Max output tokens for one model call. */\n maxTokens?: number;\n}\n\nexport interface ChatUsageBreakdown {\n inputTokens?: number;\n outputTokens?: number;\n reasoningTokens?: number;\n cacheReadTokens?: number;\n cacheWriteTokens?: number;\n totalTokens?: number;\n}\n\nexport interface ChatCostBreakdown {\n model?: string;\n inputUsd?: number;\n outputUsd?: number;\n reasoningUsd?: number;\n cacheReadUsd?: number;\n cacheWriteUsd?: number;\n totalUsd?: number;\n}\n\n/** A suggested prompt shown on the empty state. A bare string is both the label\n * and the submitted text; the object form separates them. */\nexport type Suggestion = string | { label: string; prompt: string };\n\n/** The label shown for a suggestion. */\nexport function suggestionLabel(s: Suggestion): string {\n return typeof s === \"string\" ? s : s.label;\n}\n\n/** The text submitted when a suggestion is clicked. */\nexport function suggestionPrompt(s: Suggestion): string {\n return typeof s === \"string\" ? s : s.prompt;\n}\n\n/** Returns true for an assistant reasoning (\"thinking\") part. */\nexport function isReasoningPart(part: {\n type: string;\n}): part is ReasoningUIPart {\n return part.type === \"reasoning\";\n}\n\n/** Returns true for a file/attachment part. */\nexport function isFilePart(part: { type: string }): part is FileUIPart {\n return part.type === \"file\";\n}\n\n/** A tool part as it appears in an assistant UIMessage — either a typed\n * `tool-<name>` part or the generic `dynamic-tool` part. clicky operations\n * surface as dynamic tools, so the chat UI renders both shapes. */\nexport type AnyToolPart = ToolUIPart | DynamicToolUIPart;\n\n/** Claude Agent SDK permission modes accepted by `permissionMode`. */\nexport const CLAUDE_PERMISSION_MODES = [\n \"default\",\n \"acceptEdits\",\n \"bypassPermissions\",\n \"plan\",\n \"dontAsk\",\n \"auto\",\n] as const;\n\nexport type ClaudePermissionMode = (typeof CLAUDE_PERMISSION_MODES)[number];\n\nexport type ClaudePermissionModeOption = {\n value: ClaudePermissionMode;\n label: string;\n description: string;\n};\n\nexport const CLAUDE_PERMISSION_MODE_OPTIONS: ClaudePermissionModeOption[] = [\n {\n value: \"default\",\n label: \"Default\",\n description:\n \"Prompt for dangerous operations using standard Claude behavior.\",\n },\n {\n value: \"auto\",\n label: \"Auto\",\n description:\n \"Use Claude's classifier to approve or deny permission prompts.\",\n },\n {\n value: \"acceptEdits\",\n label: \"Accept edits\",\n description: \"Automatically accept file edit operations.\",\n },\n {\n value: \"dontAsk\",\n label: \"Don't ask\",\n description: \"Do not prompt; deny actions that are not pre-approved.\",\n },\n {\n value: \"plan\",\n label: \"Plan\",\n description: \"Planning mode with no tool execution.\",\n },\n {\n value: \"bypassPermissions\",\n label: \"Bypass\",\n description:\n \"Bypass permission checks when explicitly allowed by the host.\",\n },\n];\n\n/** Tool metadata shared by the chat shell. It both configures the\n * tool-preferences popover (`name`/`label`/`group`) and carries the schema\n * derived from a clicky RPC operation (`description`/`inputSchema`). The Go\n * backend owns execution; the client uses this only for display and to scope\n * which tools a request may call (passed in the transport `body`). */\nexport type ToolMode = \"on\" | \"ask\" | \"off\" | \"auto\";\n\nexport interface ToolAnnotations {\n title?: string;\n readOnlyHint?: boolean;\n destructiveHint?: boolean;\n idempotentHint?: boolean;\n openWorldHint?: boolean;\n [key: string]: unknown;\n}\n\nexport interface ToolMeta {\n /** Stable tool name sent to the model (the operation id). */\n name: string;\n /** Human-readable label shown in the tool-preferences popover. */\n label: string;\n /** Bucket heading in the popover — the clicky surface for RPC operations. */\n group?: string;\n /** Display title of the tool's parent surface/entity (e.g. \"Xero Accounts\").\n * Used to nest tools under their entity within a group, and as the\n * disambiguating prefix in flat lists so sibling verbs (\"List\", \"Get\") stay\n * distinguishable. Resolved from the operation's `x-clicky.surface`. */\n parent?: string;\n /** Raw entity name of the tool's surface (e.g. \"accounts\"), when known. */\n entity?: string;\n /** Preference key sent to the backend. Defaults to `name`; group-backed\n * clicky tools set this to the backend tool group. */\n preferenceKey?: string;\n /** Initial backend-owned permission when the chat window first sees this tool. */\n defaultPermission?: ToolMode;\n /** Opaque icon name emitted by the backend, resolved by the host UI. */\n icon?: string;\n /** Description shown in tool pickers / tool-call headers. */\n description?: string;\n /** Short usage hints shown in the tool browser. */\n hints?: string[];\n source?: \"clicky\" | \"custom\" | \"mcp\" | string;\n server?: string;\n method?: string;\n path?: string;\n operationName?: string;\n title?: string;\n /** Whether the runtime should treat the tool input schema as strict/closed. */\n strict?: boolean;\n /** Runtime tool annotations/hints, e.g. MCP/Genkit well-known hints. */\n annotations?: ToolAnnotations;\n /** JSON-Schema for the tool's input, assembled from an operation's\n * parameters + request body. Omitted for hand-authored tools. */\n inputSchema?: ChatToolInputSchema;\n outputSchema?: ChatToolInputSchema;\n}\n\nexport type ChatToolInputSchema = JsonSchemaObject;\nexport type JsonSchemaProperty = FormJsonSchemaProperty;\nexport type JSONSchemaProperty = FormJsonSchemaProperty;\n\n/** Returns true for a `dynamic-tool` part (clicky operations surface this way). */\nexport function isDynamicToolPart(part: {\n type: string;\n}): part is DynamicToolUIPart {\n return part.type === \"dynamic-tool\";\n}\n\n/** Returns true for a typed `tool-<name>` part. */\nexport function isTypedToolPart(part: { type: string }): part is ToolUIPart {\n return part.type.startsWith(\"tool-\");\n}\n\n/** The display name of a tool part: the explicit `toolName` for dynamic tools,\n * otherwise the suffix after `tool-`. */\nexport function toolPartName(part: AnyToolPart): string {\n if (isDynamicToolPart(part)) {\n return part.toolName;\n }\n return part.type.slice(\"tool-\".length);\n}\n\nexport interface ToolResultRenderArgs {\n part: AnyToolPart;\n toolName: string;\n output: unknown;\n}\n\nexport type ToolResultRenderer = (args: ToolResultRenderArgs) => ReactNode;\n"],"names":[],"mappings":"AA2HO,SAAS,gBAAgB,GAAuB;AACrD,SAAO,OAAO,MAAM,WAAW,IAAI,EAAE;AACvC;AAGO,SAAS,iBAAiB,GAAuB;AACtD,SAAO,OAAO,MAAM,WAAW,IAAI,EAAE;AACvC;AAGO,SAAS,gBAAgB,MAEJ;AAC1B,SAAO,KAAK,SAAS;AACvB;AAGO,SAAS,WAAW,MAA4C;AACrE,SAAO,KAAK,SAAS;AACvB;AAQO,MAAM,0BAA0B;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAUO,MAAM,iCAA+D;AAAA,EAC1E;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aACE;AAAA,EAAA;AAAA,EAEJ;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aACE;AAAA,EAAA;AAAA,EAEJ;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,EAAA;AAAA,EAEf;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,EAAA;AAAA,EAEf;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,EAAA;AAAA,EAEf;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aACE;AAAA,EAAA;AAEN;AAgEO,SAAS,kBAAkB,MAEJ;AAC5B,SAAO,KAAK,SAAS;AACvB;AAGO,SAAS,gBAAgB,MAA4C;AAC1E,SAAO,KAAK,KAAK,WAAW,OAAO;AACrC;AAIO,SAAS,aAAa,MAA2B;AACtD,MAAI,kBAAkB,IAAI,GAAG;AAC3B,WAAO,KAAK;AAAA,EACd;AACA,SAAO,KAAK,KAAK,MAAM,QAAQ,MAAM;AACvC;"}
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../../../src/data/chat/types.ts"],"sourcesContent":["import type {\n UIMessage,\n ToolUIPart,\n DynamicToolUIPart,\n ChatStatus,\n ReasoningUIPart,\n FileUIPart,\n} from \"ai\";\nimport type { ReactNode } from \"react\";\nimport type {\n JsonSchemaObject,\n JsonSchemaProperty as FormJsonSchemaProperty,\n} from \"../../components/json-schema-form-types\";\n\nexport type {\n UIMessage,\n ToolUIPart,\n DynamicToolUIPart,\n ChatStatus,\n ReasoningUIPart,\n FileUIPart,\n};\n\n/** A selectable chat model, as served by the backend's GET /api/chat/models.\n * `configured` is false for catalogued models whose provider has no API key. */\nexport interface ChatModelRuntime {\n model?: string;\n id?: string;\n backend?: string;\n mode?: string;\n temperature?: number;\n effort?: string;\n noCache?: boolean;\n fallbacks?: ChatModelRuntime[];\n}\n\nexport type RuntimeAvailabilityState =\n | \"available\"\n | \"disabled\"\n | \"missing_credentials\"\n | \"not_authenticated\"\n | \"missing_executable\"\n | \"missing_dependency\"\n | \"unsupported\"\n | \"unavailable\";\n\nexport interface RuntimeAvailability {\n state: RuntimeAvailabilityState;\n reason?: string;\n remediation?: string;\n}\n\nexport interface ChatModel {\n id: string;\n provider: string;\n label: string;\n /** Exact Captain Model wire value submitted when this display row is selected. */\n runtime?: ChatModelRuntime;\n reasoning: boolean;\n /** True when backend metadata is authoritative, including explicit unsupported values. */\n capabilitiesKnown?: boolean;\n /** Ordered reasoning-effort tiers accepted by this exact model. */\n supportedEfforts?: string[];\n /** Backend-recommended effort used when the current selection is invalid. */\n defaultEffort?: string;\n /** Whether the model honours the temperature sampling control. */\n temperature?: boolean;\n configured?: boolean;\n availability?: RuntimeAvailability;\n /**\n * The catalog's own declared default — the row a picker seeds with when the\n * caller names no model. At most one row carries it, and a catalog that\n * declares none (or whose default is unconfigured) falls back to the first\n * configured row.\n */\n default?: boolean;\n /** Concrete runtime backends that advertised this model. Empty/omitted means provider-wide. */\n backends?: string[];\n /** Max context tokens — the denominator for a usage gauge. */\n contextWindow?: number;\n /** MIME patterns accepted as model inputs, e.g. image/* or application/pdf. */\n inputMediaTypes?: string[];\n}\n\n/** Per-message metadata the backend rides on the SSE `finish` part\n * (`messageMetadata`), applied by the AI SDK to the assistant `UIMessage`. */\nexport interface ChatMessageMetadata {\n usage?: ChatUsageBreakdown;\n costBreakdown?: ChatCostBreakdown;\n /** This turn's cost in USD. */\n cost?: number;\n /** Cumulative thread cost in USD (when the turn is persisted to a thread). */\n threadCostUsd?: number;\n /** This turn's input-token count, ≈ current context-window occupancy. */\n contextTokens?: number;\n}\n\n/** A flattened usage snapshot a chat surfaces for a gauge: tokens used out of the\n * model's context window, plus cumulative cost. */\nexport interface ChatUsageSummary {\n usedTokens: number;\n maxTokens: number;\n cost?: number;\n usage?: ChatUsageBreakdown;\n costBreakdown?: ChatCostBreakdown;\n messageCount: number;\n modelLabel?: string;\n}\n\nexport interface ChatBudgetConfig {\n /** Per-thread/request cost cap in USD. */\n cost?: number;\n /** Max output tokens for one model call. */\n maxTokens?: number;\n}\n\nexport interface ChatUsageBreakdown {\n inputTokens?: number;\n outputTokens?: number;\n reasoningTokens?: number;\n cacheReadTokens?: number;\n cacheWriteTokens?: number;\n totalTokens?: number;\n}\n\nexport interface ChatCostBreakdown {\n model?: string;\n inputUsd?: number;\n outputUsd?: number;\n reasoningUsd?: number;\n cacheReadUsd?: number;\n cacheWriteUsd?: number;\n totalUsd?: number;\n}\n\n/** A suggested prompt shown on the empty state. A bare string is both the label\n * and the submitted text; the object form separates them. */\nexport type Suggestion = string | { label: string; prompt: string };\n\n/** The label shown for a suggestion. */\nexport function suggestionLabel(s: Suggestion): string {\n return typeof s === \"string\" ? s : s.label;\n}\n\n/** The text submitted when a suggestion is clicked. */\nexport function suggestionPrompt(s: Suggestion): string {\n return typeof s === \"string\" ? s : s.prompt;\n}\n\n/** Returns true for an assistant reasoning (\"thinking\") part. */\nexport function isReasoningPart(part: {\n type: string;\n}): part is ReasoningUIPart {\n return part.type === \"reasoning\";\n}\n\n/** Returns true for a file/attachment part. */\nexport function isFilePart(part: { type: string }): part is FileUIPart {\n return part.type === \"file\";\n}\n\n/** A tool part as it appears in an assistant UIMessage — either a typed\n * `tool-<name>` part or the generic `dynamic-tool` part. clicky operations\n * surface as dynamic tools, so the chat UI renders both shapes. */\nexport type AnyToolPart = ToolUIPart | DynamicToolUIPart;\n\n/** Claude Agent SDK permission modes accepted by `permissionMode`. */\nexport const CLAUDE_PERMISSION_MODES = [\n \"default\",\n \"acceptEdits\",\n \"bypassPermissions\",\n \"plan\",\n \"dontAsk\",\n \"auto\",\n] as const;\n\nexport type ClaudePermissionMode = (typeof CLAUDE_PERMISSION_MODES)[number];\n\nexport type ClaudePermissionModeOption = {\n value: ClaudePermissionMode;\n label: string;\n description: string;\n};\n\nexport const CLAUDE_PERMISSION_MODE_OPTIONS: ClaudePermissionModeOption[] = [\n {\n value: \"default\",\n label: \"Default\",\n description:\n \"Prompt for dangerous operations using standard Claude behavior.\",\n },\n {\n value: \"auto\",\n label: \"Auto\",\n description:\n \"Use Claude's classifier to approve or deny permission prompts.\",\n },\n {\n value: \"acceptEdits\",\n label: \"Accept edits\",\n description: \"Automatically accept file edit operations.\",\n },\n {\n value: \"dontAsk\",\n label: \"Don't ask\",\n description: \"Do not prompt; deny actions that are not pre-approved.\",\n },\n {\n value: \"plan\",\n label: \"Plan\",\n description: \"Planning mode with no tool execution.\",\n },\n {\n value: \"bypassPermissions\",\n label: \"Bypass\",\n description:\n \"Bypass permission checks when explicitly allowed by the host.\",\n },\n];\n\n/** Tool metadata shared by the chat shell. It both configures the\n * tool-preferences popover (`name`/`label`/`group`) and carries the schema\n * derived from a clicky RPC operation (`description`/`inputSchema`). The Go\n * backend owns execution; the client uses this only for display and to scope\n * which tools a request may call (passed in the transport `body`). */\nexport type ToolMode = \"on\" | \"ask\" | \"off\" | \"auto\";\n\nexport interface ToolAnnotations {\n title?: string;\n readOnlyHint?: boolean;\n destructiveHint?: boolean;\n idempotentHint?: boolean;\n openWorldHint?: boolean;\n [key: string]: unknown;\n}\n\nexport interface ToolMeta {\n /** Stable tool name sent to the model (the operation id). */\n name: string;\n /** Human-readable label shown in the tool-preferences popover. */\n label: string;\n /** Bucket heading in the popover — the clicky surface for RPC operations. */\n group?: string;\n /** Display title of the tool's parent surface/entity (e.g. \"Xero Accounts\").\n * Used to nest tools under their entity within a group, and as the\n * disambiguating prefix in flat lists so sibling verbs (\"List\", \"Get\") stay\n * distinguishable. Resolved from the operation's `x-clicky.surface`. */\n parent?: string;\n /** Raw entity name of the tool's surface (e.g. \"accounts\"), when known. */\n entity?: string;\n /** Preference key sent to the backend. Defaults to `name`; group-backed\n * clicky tools set this to the backend tool group. */\n preferenceKey?: string;\n /** Initial backend-owned permission when the chat window first sees this tool. */\n defaultPermission?: ToolMode;\n /** Opaque icon name emitted by the backend, resolved by the host UI. */\n icon?: string;\n /** Description shown in tool pickers / tool-call headers. */\n description?: string;\n /** Short usage hints shown in the tool browser. */\n hints?: string[];\n source?: \"clicky\" | \"custom\" | \"mcp\" | string;\n server?: string;\n method?: string;\n path?: string;\n operationName?: string;\n title?: string;\n /** Whether the runtime should treat the tool input schema as strict/closed. */\n strict?: boolean;\n /** Runtime tool annotations/hints, e.g. MCP/Genkit well-known hints. */\n annotations?: ToolAnnotations;\n /** JSON-Schema for the tool's input, assembled from an operation's\n * parameters + request body. Omitted for hand-authored tools. */\n inputSchema?: ChatToolInputSchema;\n outputSchema?: ChatToolInputSchema;\n}\n\nexport type ChatToolInputSchema = JsonSchemaObject;\nexport type JsonSchemaProperty = FormJsonSchemaProperty;\nexport type JSONSchemaProperty = FormJsonSchemaProperty;\n\n/** Returns true for a `dynamic-tool` part (clicky operations surface this way). */\nexport function isDynamicToolPart(part: {\n type: string;\n}): part is DynamicToolUIPart {\n return part.type === \"dynamic-tool\";\n}\n\n/** Returns true for a typed `tool-<name>` part. */\nexport function isTypedToolPart(part: { type: string }): part is ToolUIPart {\n return part.type.startsWith(\"tool-\");\n}\n\n/** The display name of a tool part: the explicit `toolName` for dynamic tools,\n * otherwise the suffix after `tool-`. */\nexport function toolPartName(part: AnyToolPart): string {\n if (isDynamicToolPart(part)) {\n return part.toolName;\n }\n return part.type.slice(\"tool-\".length);\n}\n\nexport interface ToolResultRenderArgs {\n part: AnyToolPart;\n toolName: string;\n output: unknown;\n}\n\nexport type ToolResultRenderer = (args: ToolResultRenderArgs) => ReactNode;\n"],"names":[],"mappings":"AA4IO,SAAS,gBAAgB,GAAuB;AACrD,SAAO,OAAO,MAAM,WAAW,IAAI,EAAE;AACvC;AAGO,SAAS,iBAAiB,GAAuB;AACtD,SAAO,OAAO,MAAM,WAAW,IAAI,EAAE;AACvC;AAGO,SAAS,gBAAgB,MAEJ;AAC1B,SAAO,KAAK,SAAS;AACvB;AAGO,SAAS,WAAW,MAA4C;AACrE,SAAO,KAAK,SAAS;AACvB;AAQO,MAAM,0BAA0B;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAUO,MAAM,iCAA+D;AAAA,EAC1E;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aACE;AAAA,EAAA;AAAA,EAEJ;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aACE;AAAA,EAAA;AAAA,EAEJ;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,EAAA;AAAA,EAEf;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,EAAA;AAAA,EAEf;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,EAAA;AAAA,EAEf;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aACE;AAAA,EAAA;AAEN;AAgEO,SAAS,kBAAkB,MAEJ;AAC5B,SAAO,KAAK,SAAS;AACvB;AAGO,SAAS,gBAAgB,MAA4C;AAC1E,SAAO,KAAK,KAAK,WAAW,OAAO;AACrC;AAIO,SAAS,aAAa,MAA2B;AACtD,MAAI,kBAAkB,IAAI,GAAG;AAC3B,WAAO,KAAK;AAAA,EACd;AACA,SAAO,KAAK,KAAK,MAAM,QAAQ,MAAM;AACvC;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
function usageSnapshotFromMetadata(metadata, options) {
|
|
4
|
+
var _a, _b;
|
|
5
|
+
const cost = metadata.threadCostUsd ?? ((_a = metadata.costBreakdown) == null ? void 0 : _a.totalUsd) ?? metadata.cost;
|
|
6
|
+
return {
|
|
7
|
+
usedTokens: metadata.contextTokens ?? ((_b = metadata.usage) == null ? void 0 : _b.totalTokens) ?? 0,
|
|
8
|
+
maxTokens: options.contextWindow ?? 0,
|
|
9
|
+
messageCount: options.messageCount,
|
|
10
|
+
...cost != null ? { cost } : {},
|
|
11
|
+
...metadata.usage ? { usage: metadata.usage } : {},
|
|
12
|
+
...metadata.costBreakdown ? { costBreakdown: metadata.costBreakdown } : {},
|
|
13
|
+
...options.modelLabel ? { modelLabel: options.modelLabel } : {}
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
exports.usageSnapshotFromMetadata = usageSnapshotFromMetadata;
|
|
17
|
+
//# sourceMappingURL=usage-snapshot.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage-snapshot.cjs","sources":["../../../src/data/chat/usage-snapshot.ts"],"sourcesContent":["import type { ChatMessageMetadata, ChatUsageSummary } from \"./types\";\n\n/**\n * Builds the usage snapshot a chat surfaces (gauge, hover card, config panel)\n * from the last settled assistant turn's metadata.\n *\n * The cost precedence matters: `threadCostUsd` is the conversation's running\n * total, while `cost` is only the turn that just finished. Preferring the\n * cumulative figure is what makes the meter report what the conversation has\n * actually spent — on a multi-turn thread the two differ by roughly the number\n * of turns taken. Backends that do not report a thread total still degrade to\n * the per-turn value rather than showing nothing.\n *\n * Token fields stay per-turn; the whole-conversation breakdown is served\n * separately by the thread costs endpoint.\n */\nexport function usageSnapshotFromMetadata(\n metadata: ChatMessageMetadata,\n options: { contextWindow?: number | undefined; modelLabel?: string | undefined; messageCount: number },\n): ChatUsageSummary {\n const cost =\n metadata.threadCostUsd ?? metadata.costBreakdown?.totalUsd ?? metadata.cost;\n return {\n usedTokens: metadata.contextTokens ?? metadata.usage?.totalTokens ?? 0,\n maxTokens: options.contextWindow ?? 0,\n messageCount: options.messageCount,\n ...(cost != null ? { cost } : {}),\n ...(metadata.usage ? { usage: metadata.usage } : {}),\n ...(metadata.costBreakdown ? { costBreakdown: metadata.costBreakdown } : {}),\n ...(options.modelLabel ? { modelLabel: options.modelLabel } : {}),\n };\n}\n"],"names":[],"mappings":";;AAgBO,SAAS,0BACd,UACA,SACkB;;AAClB,QAAM,OACJ,SAAS,mBAAiB,cAAS,kBAAT,mBAAwB,aAAY,SAAS;AACzE,SAAO;AAAA,IACL,YAAY,SAAS,mBAAiB,cAAS,UAAT,mBAAgB,gBAAe;AAAA,IACrE,WAAW,QAAQ,iBAAiB;AAAA,IACpC,cAAc,QAAQ;AAAA,IACtB,GAAI,QAAQ,OAAO,EAAE,KAAA,IAAS,CAAA;AAAA,IAC9B,GAAI,SAAS,QAAQ,EAAE,OAAO,SAAS,MAAA,IAAU,CAAA;AAAA,IACjD,GAAI,SAAS,gBAAgB,EAAE,eAAe,SAAS,cAAA,IAAkB,CAAA;AAAA,IACzE,GAAI,QAAQ,aAAa,EAAE,YAAY,QAAQ,WAAA,IAAe,CAAA;AAAA,EAAC;AAEnE;;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ChatMessageMetadata, ChatUsageSummary } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Builds the usage snapshot a chat surfaces (gauge, hover card, config panel)
|
|
4
|
+
* from the last settled assistant turn's metadata.
|
|
5
|
+
*
|
|
6
|
+
* The cost precedence matters: `threadCostUsd` is the conversation's running
|
|
7
|
+
* total, while `cost` is only the turn that just finished. Preferring the
|
|
8
|
+
* cumulative figure is what makes the meter report what the conversation has
|
|
9
|
+
* actually spent — on a multi-turn thread the two differ by roughly the number
|
|
10
|
+
* of turns taken. Backends that do not report a thread total still degrade to
|
|
11
|
+
* the per-turn value rather than showing nothing.
|
|
12
|
+
*
|
|
13
|
+
* Token fields stay per-turn; the whole-conversation breakdown is served
|
|
14
|
+
* separately by the thread costs endpoint.
|
|
15
|
+
*/
|
|
16
|
+
export declare function usageSnapshotFromMetadata(metadata: ChatMessageMetadata, options: {
|
|
17
|
+
contextWindow?: number | undefined;
|
|
18
|
+
modelLabel?: string | undefined;
|
|
19
|
+
messageCount: number;
|
|
20
|
+
}): ChatUsageSummary;
|
|
21
|
+
//# sourceMappingURL=usage-snapshot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage-snapshot.d.ts","sourceRoot":"","sources":["../../../src/data/chat/usage-snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAErE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,mBAAmB,EAC7B,OAAO,EAAE;IAAE,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,GACrG,gBAAgB,CAYlB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
function usageSnapshotFromMetadata(metadata, options) {
|
|
2
|
+
var _a, _b;
|
|
3
|
+
const cost = metadata.threadCostUsd ?? ((_a = metadata.costBreakdown) == null ? void 0 : _a.totalUsd) ?? metadata.cost;
|
|
4
|
+
return {
|
|
5
|
+
usedTokens: metadata.contextTokens ?? ((_b = metadata.usage) == null ? void 0 : _b.totalTokens) ?? 0,
|
|
6
|
+
maxTokens: options.contextWindow ?? 0,
|
|
7
|
+
messageCount: options.messageCount,
|
|
8
|
+
...cost != null ? { cost } : {},
|
|
9
|
+
...metadata.usage ? { usage: metadata.usage } : {},
|
|
10
|
+
...metadata.costBreakdown ? { costBreakdown: metadata.costBreakdown } : {},
|
|
11
|
+
...options.modelLabel ? { modelLabel: options.modelLabel } : {}
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
usageSnapshotFromMetadata
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=usage-snapshot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage-snapshot.js","sources":["../../../src/data/chat/usage-snapshot.ts"],"sourcesContent":["import type { ChatMessageMetadata, ChatUsageSummary } from \"./types\";\n\n/**\n * Builds the usage snapshot a chat surfaces (gauge, hover card, config panel)\n * from the last settled assistant turn's metadata.\n *\n * The cost precedence matters: `threadCostUsd` is the conversation's running\n * total, while `cost` is only the turn that just finished. Preferring the\n * cumulative figure is what makes the meter report what the conversation has\n * actually spent — on a multi-turn thread the two differ by roughly the number\n * of turns taken. Backends that do not report a thread total still degrade to\n * the per-turn value rather than showing nothing.\n *\n * Token fields stay per-turn; the whole-conversation breakdown is served\n * separately by the thread costs endpoint.\n */\nexport function usageSnapshotFromMetadata(\n metadata: ChatMessageMetadata,\n options: { contextWindow?: number | undefined; modelLabel?: string | undefined; messageCount: number },\n): ChatUsageSummary {\n const cost =\n metadata.threadCostUsd ?? metadata.costBreakdown?.totalUsd ?? metadata.cost;\n return {\n usedTokens: metadata.contextTokens ?? metadata.usage?.totalTokens ?? 0,\n maxTokens: options.contextWindow ?? 0,\n messageCount: options.messageCount,\n ...(cost != null ? { cost } : {}),\n ...(metadata.usage ? { usage: metadata.usage } : {}),\n ...(metadata.costBreakdown ? { costBreakdown: metadata.costBreakdown } : {}),\n ...(options.modelLabel ? { modelLabel: options.modelLabel } : {}),\n };\n}\n"],"names":[],"mappings":"AAgBO,SAAS,0BACd,UACA,SACkB;AAHb;AAIL,QAAM,OACJ,SAAS,mBAAiB,cAAS,kBAAT,mBAAwB,aAAY,SAAS;AACzE,SAAO;AAAA,IACL,YAAY,SAAS,mBAAiB,cAAS,UAAT,mBAAgB,gBAAe;AAAA,IACrE,WAAW,QAAQ,iBAAiB;AAAA,IACpC,cAAc,QAAQ;AAAA,IACtB,GAAI,QAAQ,OAAO,EAAE,KAAA,IAAS,CAAA;AAAA,IAC9B,GAAI,SAAS,QAAQ,EAAE,OAAO,SAAS,MAAA,IAAU,CAAA;AAAA,IACjD,GAAI,SAAS,gBAAgB,EAAE,eAAe,SAAS,cAAA,IAAkB,CAAA;AAAA,IACzE,GAAI,QAAQ,aAAa,EAAE,YAAY,QAAQ,WAAA,IAAe,CAAA;AAAA,EAAC;AAEnE;"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
function isMultiFilterEscapable(char) {
|
|
4
|
+
return char === "\\" || char === "!" || char === "," || /\s/.test(char);
|
|
5
|
+
}
|
|
6
|
+
function isUnescapedSpace(entry) {
|
|
7
|
+
return !entry.escaped && /\s/.test(entry.char);
|
|
8
|
+
}
|
|
9
|
+
function splitMultiFilterItems(value) {
|
|
10
|
+
const items = [[]];
|
|
11
|
+
for (let index = 0; index < value.length; index++) {
|
|
12
|
+
const char = value[index];
|
|
13
|
+
const next = value[index + 1];
|
|
14
|
+
if (char === "\\" && next !== void 0 && isMultiFilterEscapable(next)) {
|
|
15
|
+
items[items.length - 1].push({ char: next, escaped: true });
|
|
16
|
+
index++;
|
|
17
|
+
} else if (char === ",") {
|
|
18
|
+
items.push([]);
|
|
19
|
+
} else {
|
|
20
|
+
items[items.length - 1].push({ char, escaped: false });
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return items.map((item) => {
|
|
24
|
+
let start = 0;
|
|
25
|
+
let end = item.length;
|
|
26
|
+
while (start < end && isUnescapedSpace(item[start])) start++;
|
|
27
|
+
while (end > start && isUnescapedSpace(item[end - 1])) end--;
|
|
28
|
+
return item.slice(start, end);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function parseMultiFilterValue(value) {
|
|
32
|
+
const parsed = {};
|
|
33
|
+
for (const item of splitMultiFilterItems(value)) {
|
|
34
|
+
if (item.length === 0) continue;
|
|
35
|
+
const excluded = item.length > 1 && item[0].char === "!" && !item[0].escaped;
|
|
36
|
+
const key = (excluded ? item.slice(1) : item).map((entry) => entry.char).join("");
|
|
37
|
+
if (key) parsed[key] = excluded ? "exclude" : "include";
|
|
38
|
+
}
|
|
39
|
+
return parsed;
|
|
40
|
+
}
|
|
41
|
+
function escapeMultiFilterKey(key) {
|
|
42
|
+
let escaped = "";
|
|
43
|
+
for (let index = 0; index < key.length; index++) {
|
|
44
|
+
const char = key[index];
|
|
45
|
+
const isBoundary = index === 0 || index === key.length - 1;
|
|
46
|
+
if (char === ",") {
|
|
47
|
+
escaped += "\\,";
|
|
48
|
+
} else if (char === "\\" && isMultiFilterEscapable(key[index + 1] ?? "")) {
|
|
49
|
+
escaped += "\\\\";
|
|
50
|
+
} else if (isBoundary && /\s/.test(char)) {
|
|
51
|
+
escaped += `\\${char}`;
|
|
52
|
+
} else {
|
|
53
|
+
escaped += char;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return escaped;
|
|
57
|
+
}
|
|
58
|
+
function serializeMultiFilterValue(value) {
|
|
59
|
+
return Object.entries(value).flatMap(([key, mode]) => {
|
|
60
|
+
if (!key) return [];
|
|
61
|
+
const escaped = escapeMultiFilterKey(key);
|
|
62
|
+
if (mode === "include") return [key.startsWith("!") ? `\\${escaped}` : escaped];
|
|
63
|
+
if (mode === "exclude") return [`!${escaped}`];
|
|
64
|
+
return [];
|
|
65
|
+
}).join(",");
|
|
66
|
+
}
|
|
67
|
+
function splitCommaValues(value) {
|
|
68
|
+
return value.split(",").map((item) => item.trim()).filter(Boolean);
|
|
69
|
+
}
|
|
70
|
+
function parseBoundsValue(raw) {
|
|
71
|
+
const bounds = {};
|
|
72
|
+
for (const token of raw.split(",")) {
|
|
73
|
+
const trimmed = token.trim();
|
|
74
|
+
if (trimmed.startsWith(">")) {
|
|
75
|
+
bounds.min = trimmed.replace(/^>=?/, "");
|
|
76
|
+
} else if (trimmed.startsWith("<")) {
|
|
77
|
+
bounds.max = trimmed.replace(/^<=?/, "");
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return bounds;
|
|
81
|
+
}
|
|
82
|
+
function serializeBoundsValue(value) {
|
|
83
|
+
const tokens = [];
|
|
84
|
+
if (value.min) tokens.push(`>=${value.min}`);
|
|
85
|
+
if (value.max) tokens.push(`<=${value.max}`);
|
|
86
|
+
return tokens.join(",");
|
|
87
|
+
}
|
|
88
|
+
function updateFilterSelection(selection, key, serialized) {
|
|
89
|
+
const next = { ...selection };
|
|
90
|
+
if (serialized) {
|
|
91
|
+
next[key] = serialized;
|
|
92
|
+
} else {
|
|
93
|
+
delete next[key];
|
|
94
|
+
}
|
|
95
|
+
return next;
|
|
96
|
+
}
|
|
97
|
+
exports.parseBoundsValue = parseBoundsValue;
|
|
98
|
+
exports.parseMultiFilterValue = parseMultiFilterValue;
|
|
99
|
+
exports.serializeBoundsValue = serializeBoundsValue;
|
|
100
|
+
exports.serializeMultiFilterValue = serializeMultiFilterValue;
|
|
101
|
+
exports.splitCommaValues = splitCommaValues;
|
|
102
|
+
exports.updateFilterSelection = updateFilterSelection;
|
|
103
|
+
//# sourceMappingURL=data-table-filter-values.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-table-filter-values.cjs","sources":["../../src/data/data-table-filter-values.ts"],"sourcesContent":["import type { FilterBarMultiFilterMode } from \"../components/filter-bar-field-utils\";\n\n/**\n * A filter selection as one flat, URL-safe record: filter key → comma-joined\n * values, each optionally `!`-prefixed to exclude. It is the one encoding the\n * profile catalog (which syncs it to the URL) and the ad-hoc query browser both\n * speak, so a selection means the same thing wherever it is read.\n */\nexport type DataTableFilterSelection = Record<string, string>;\n\n// The serialized multi-filter value is a wire contract, not internal state: it\n// is packed into a query parameter and parsed server-side by clicky's\n// `entity.MultiFilter` (collections.MatchItems semantics — `,` separates\n// patterns, a leading `!` negates). That grammar has no escape sequence, so a\n// value that itself starts with `!` or contains `,` cannot be expressed on the\n// wire at all. Backslash escapes below therefore only ever apply to values the\n// server could never represent, leaving every representable value byte\n// identical, while making the local parse/serialize pair lossless so an\n// *included* \"!failed\" is not read back as an *exclusion* of \"failed\" on the\n// next render.\n//\n// WORKAROUND(no-server-escape-syntax): the escapes are understood by this\n// module only; a backslash sent to the server is matched literally.\n// Correct fix: teach entity.MultiFilter / collections.MatchItems an escape\n// sequence, then drop this note.\n// Ref: PR review, discussed with user 2026-08-05\n//\n// Grammar: `\\\\`, `\\!`, `\\,` and `\\<whitespace>` decode to the bare character; a\n// backslash before anything else is literal. Unescaped whitespace around an\n// item is trimmed (hand-edited URLs), unescaped `,` separates items, and an\n// unescaped leading `!` marks an exclusion. Empty keys are not representable\n// and are dropped.\ntype MultiFilterChar = { char: string; escaped: boolean };\n\nfunction isMultiFilterEscapable(char: string) {\n return char === \"\\\\\" || char === \"!\" || char === \",\" || /\\s/.test(char);\n}\n\nfunction isUnescapedSpace(entry: MultiFilterChar) {\n return !entry.escaped && /\\s/.test(entry.char);\n}\n\nfunction splitMultiFilterItems(value: string): MultiFilterChar[][] {\n const items: MultiFilterChar[][] = [[]];\n for (let index = 0; index < value.length; index++) {\n const char = value[index]!;\n const next = value[index + 1];\n if (char === \"\\\\\" && next !== undefined && isMultiFilterEscapable(next)) {\n items[items.length - 1]!.push({ char: next, escaped: true });\n index++;\n } else if (char === \",\") {\n items.push([]);\n } else {\n items[items.length - 1]!.push({ char, escaped: false });\n }\n }\n return items.map((item) => {\n let start = 0;\n let end = item.length;\n while (start < end && isUnescapedSpace(item[start]!)) start++;\n while (end > start && isUnescapedSpace(item[end - 1]!)) end--;\n return item.slice(start, end);\n });\n}\n\nexport function parseMultiFilterValue(value: string): Record<string, FilterBarMultiFilterMode> {\n const parsed: Record<string, FilterBarMultiFilterMode> = {};\n for (const item of splitMultiFilterItems(value)) {\n if (item.length === 0) continue;\n const excluded = item.length > 1 && item[0]!.char === \"!\" && !item[0]!.escaped;\n const key = (excluded ? item.slice(1) : item).map((entry) => entry.char).join(\"\");\n if (key) parsed[key] = excluded ? \"exclude\" : \"include\";\n }\n return parsed;\n}\n\nfunction escapeMultiFilterKey(key: string): string {\n let escaped = \"\";\n for (let index = 0; index < key.length; index++) {\n const char = key[index]!;\n const isBoundary = index === 0 || index === key.length - 1;\n if (char === \",\") {\n escaped += \"\\\\,\";\n } else if (char === \"\\\\\" && isMultiFilterEscapable(key[index + 1] ?? \"\")) {\n escaped += \"\\\\\\\\\";\n } else if (isBoundary && /\\s/.test(char)) {\n escaped += `\\\\${char}`;\n } else {\n escaped += char;\n }\n }\n return escaped;\n}\n\nexport function serializeMultiFilterValue(value: Record<string, FilterBarMultiFilterMode>): string {\n return Object.entries(value)\n .flatMap(([key, mode]) => {\n if (!key) return [];\n const escaped = escapeMultiFilterKey(key);\n if (mode === \"include\") return [key.startsWith(\"!\") ? `\\\\${escaped}` : escaped];\n if (mode === \"exclude\") return [`!${escaped}`];\n return [];\n })\n .join(\",\");\n}\n\nexport function splitCommaValues(value: string): string[] {\n return value\n .split(\",\")\n .map((item) => item.trim())\n .filter(Boolean);\n}\n\n/**\n * A bounded selection: both edges under one key, each token carrying its own\n * comparison operator. It is the other half of the selection grammar, and the\n * one a range and a time bound share.\n */\nexport type FilterBoundsValue = {\n min?: string;\n max?: string;\n};\n\n/**\n * Reads a bounded selection. The bar's controls are inclusive on both edges, so\n * that is what they write back — but a bound typed by hand or arriving in a URL\n * keeps whatever operator it came with.\n */\nexport function parseBoundsValue(raw: string): FilterBoundsValue {\n const bounds: FilterBoundsValue = {};\n for (const token of raw.split(\",\")) {\n const trimmed = token.trim();\n if (trimmed.startsWith(\">\")) {\n bounds.min = trimmed.replace(/^>=?/, \"\");\n } else if (trimmed.startsWith(\"<\")) {\n bounds.max = trimmed.replace(/^<=?/, \"\");\n }\n }\n return bounds;\n}\n\nexport function serializeBoundsValue(value: FilterBoundsValue): string {\n const tokens: string[] = [];\n if (value.min) tokens.push(`>=${value.min}`);\n if (value.max) tokens.push(`<=${value.max}`);\n return tokens.join(\",\");\n}\n\n/**\n * Writes a serialized value into a selection, dropping the key when it is\n * empty. An absent key and a key holding \"\" would send different query strings\n * for the same \"nothing selected\", so only one of them is ever built.\n */\nexport function updateFilterSelection(\n selection: DataTableFilterSelection,\n key: string,\n serialized: string,\n): DataTableFilterSelection {\n const next = { ...selection };\n if (serialized) {\n next[key] = serialized;\n } else {\n delete next[key];\n }\n return next;\n}\n"],"names":[],"mappings":";;AAkCA,SAAS,uBAAuB,MAAc;AAC5C,SAAO,SAAS,QAAQ,SAAS,OAAO,SAAS,OAAO,KAAK,KAAK,IAAI;AACxE;AAEA,SAAS,iBAAiB,OAAwB;AAChD,SAAO,CAAC,MAAM,WAAW,KAAK,KAAK,MAAM,IAAI;AAC/C;AAEA,SAAS,sBAAsB,OAAoC;AACjE,QAAM,QAA6B,CAAC,EAAE;AACtC,WAAS,QAAQ,GAAG,QAAQ,MAAM,QAAQ,SAAS;AACjD,UAAM,OAAO,MAAM,KAAK;AACxB,UAAM,OAAO,MAAM,QAAQ,CAAC;AAC5B,QAAI,SAAS,QAAQ,SAAS,UAAa,uBAAuB,IAAI,GAAG;AACvE,YAAM,MAAM,SAAS,CAAC,EAAG,KAAK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,WAAO,KAAK,GAAG;AAAA,EACjB;AACA,SAAO;AACT;;;;;;;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { FilterBarMultiFilterMode } from '../components/filter-bar-field-utils';
|
|
2
|
+
/**
|
|
3
|
+
* A filter selection as one flat, URL-safe record: filter key → comma-joined
|
|
4
|
+
* values, each optionally `!`-prefixed to exclude. It is the one encoding the
|
|
5
|
+
* profile catalog (which syncs it to the URL) and the ad-hoc query browser both
|
|
6
|
+
* speak, so a selection means the same thing wherever it is read.
|
|
7
|
+
*/
|
|
8
|
+
export type DataTableFilterSelection = Record<string, string>;
|
|
9
|
+
export declare function parseMultiFilterValue(value: string): Record<string, FilterBarMultiFilterMode>;
|
|
10
|
+
export declare function serializeMultiFilterValue(value: Record<string, FilterBarMultiFilterMode>): string;
|
|
11
|
+
export declare function splitCommaValues(value: string): string[];
|
|
12
|
+
/**
|
|
13
|
+
* A bounded selection: both edges under one key, each token carrying its own
|
|
14
|
+
* comparison operator. It is the other half of the selection grammar, and the
|
|
15
|
+
* one a range and a time bound share.
|
|
16
|
+
*/
|
|
17
|
+
export type FilterBoundsValue = {
|
|
18
|
+
min?: string;
|
|
19
|
+
max?: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Reads a bounded selection. The bar's controls are inclusive on both edges, so
|
|
23
|
+
* that is what they write back — but a bound typed by hand or arriving in a URL
|
|
24
|
+
* keeps whatever operator it came with.
|
|
25
|
+
*/
|
|
26
|
+
export declare function parseBoundsValue(raw: string): FilterBoundsValue;
|
|
27
|
+
export declare function serializeBoundsValue(value: FilterBoundsValue): string;
|
|
28
|
+
/**
|
|
29
|
+
* Writes a serialized value into a selection, dropping the key when it is
|
|
30
|
+
* empty. An absent key and a key holding "" would send different query strings
|
|
31
|
+
* for the same "nothing selected", so only one of them is ever built.
|
|
32
|
+
*/
|
|
33
|
+
export declare function updateFilterSelection(selection: DataTableFilterSelection, key: string, serialized: string): DataTableFilterSelection;
|
|
34
|
+
//# sourceMappingURL=data-table-filter-values.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-table-filter-values.d.ts","sourceRoot":"","sources":["../../src/data/data-table-filter-values.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAErF;;;;;GAKG;AACH,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAyD9D,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAS7F;AAoBD,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,GAAG,MAAM,CAUjG;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAKxD;AAED;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB,CAW/D;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAKrE;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,wBAAwB,EACnC,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,MAAM,GACjB,wBAAwB,CAQ1B"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
function isMultiFilterEscapable(char) {
|
|
2
|
+
return char === "\\" || char === "!" || char === "," || /\s/.test(char);
|
|
3
|
+
}
|
|
4
|
+
function isUnescapedSpace(entry) {
|
|
5
|
+
return !entry.escaped && /\s/.test(entry.char);
|
|
6
|
+
}
|
|
7
|
+
function splitMultiFilterItems(value) {
|
|
8
|
+
const items = [[]];
|
|
9
|
+
for (let index = 0; index < value.length; index++) {
|
|
10
|
+
const char = value[index];
|
|
11
|
+
const next = value[index + 1];
|
|
12
|
+
if (char === "\\" && next !== void 0 && isMultiFilterEscapable(next)) {
|
|
13
|
+
items[items.length - 1].push({ char: next, escaped: true });
|
|
14
|
+
index++;
|
|
15
|
+
} else if (char === ",") {
|
|
16
|
+
items.push([]);
|
|
17
|
+
} else {
|
|
18
|
+
items[items.length - 1].push({ char, escaped: false });
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return items.map((item) => {
|
|
22
|
+
let start = 0;
|
|
23
|
+
let end = item.length;
|
|
24
|
+
while (start < end && isUnescapedSpace(item[start])) start++;
|
|
25
|
+
while (end > start && isUnescapedSpace(item[end - 1])) end--;
|
|
26
|
+
return item.slice(start, end);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function parseMultiFilterValue(value) {
|
|
30
|
+
const parsed = {};
|
|
31
|
+
for (const item of splitMultiFilterItems(value)) {
|
|
32
|
+
if (item.length === 0) continue;
|
|
33
|
+
const excluded = item.length > 1 && item[0].char === "!" && !item[0].escaped;
|
|
34
|
+
const key = (excluded ? item.slice(1) : item).map((entry) => entry.char).join("");
|
|
35
|
+
if (key) parsed[key] = excluded ? "exclude" : "include";
|
|
36
|
+
}
|
|
37
|
+
return parsed;
|
|
38
|
+
}
|
|
39
|
+
function escapeMultiFilterKey(key) {
|
|
40
|
+
let escaped = "";
|
|
41
|
+
for (let index = 0; index < key.length; index++) {
|
|
42
|
+
const char = key[index];
|
|
43
|
+
const isBoundary = index === 0 || index === key.length - 1;
|
|
44
|
+
if (char === ",") {
|
|
45
|
+
escaped += "\\,";
|
|
46
|
+
} else if (char === "\\" && isMultiFilterEscapable(key[index + 1] ?? "")) {
|
|
47
|
+
escaped += "\\\\";
|
|
48
|
+
} else if (isBoundary && /\s/.test(char)) {
|
|
49
|
+
escaped += `\\${char}`;
|
|
50
|
+
} else {
|
|
51
|
+
escaped += char;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return escaped;
|
|
55
|
+
}
|
|
56
|
+
function serializeMultiFilterValue(value) {
|
|
57
|
+
return Object.entries(value).flatMap(([key, mode]) => {
|
|
58
|
+
if (!key) return [];
|
|
59
|
+
const escaped = escapeMultiFilterKey(key);
|
|
60
|
+
if (mode === "include") return [key.startsWith("!") ? `\\${escaped}` : escaped];
|
|
61
|
+
if (mode === "exclude") return [`!${escaped}`];
|
|
62
|
+
return [];
|
|
63
|
+
}).join(",");
|
|
64
|
+
}
|
|
65
|
+
function splitCommaValues(value) {
|
|
66
|
+
return value.split(",").map((item) => item.trim()).filter(Boolean);
|
|
67
|
+
}
|
|
68
|
+
function parseBoundsValue(raw) {
|
|
69
|
+
const bounds = {};
|
|
70
|
+
for (const token of raw.split(",")) {
|
|
71
|
+
const trimmed = token.trim();
|
|
72
|
+
if (trimmed.startsWith(">")) {
|
|
73
|
+
bounds.min = trimmed.replace(/^>=?/, "");
|
|
74
|
+
} else if (trimmed.startsWith("<")) {
|
|
75
|
+
bounds.max = trimmed.replace(/^<=?/, "");
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return bounds;
|
|
79
|
+
}
|
|
80
|
+
function serializeBoundsValue(value) {
|
|
81
|
+
const tokens = [];
|
|
82
|
+
if (value.min) tokens.push(`>=${value.min}`);
|
|
83
|
+
if (value.max) tokens.push(`<=${value.max}`);
|
|
84
|
+
return tokens.join(",");
|
|
85
|
+
}
|
|
86
|
+
function updateFilterSelection(selection, key, serialized) {
|
|
87
|
+
const next = { ...selection };
|
|
88
|
+
if (serialized) {
|
|
89
|
+
next[key] = serialized;
|
|
90
|
+
} else {
|
|
91
|
+
delete next[key];
|
|
92
|
+
}
|
|
93
|
+
return next;
|
|
94
|
+
}
|
|
95
|
+
export {
|
|
96
|
+
parseBoundsValue,
|
|
97
|
+
parseMultiFilterValue,
|
|
98
|
+
serializeBoundsValue,
|
|
99
|
+
serializeMultiFilterValue,
|
|
100
|
+
splitCommaValues,
|
|
101
|
+
updateFilterSelection
|
|
102
|
+
};
|
|
103
|
+
//# sourceMappingURL=data-table-filter-values.js.map
|