@parallelworks/ui 0.18.0 → 0.19.1
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/README.md +86 -6
- package/dist/ai/adapter/memoryStore.d.ts +8 -0
- package/dist/ai/adapter/memoryStore.js +152 -0
- package/dist/ai/adapter/mock/index.d.ts +2 -0
- package/dist/ai/adapter/mock/index.js +3 -0
- package/dist/ai/adapter/mock/mockAdapter.d.ts +4 -0
- package/dist/ai/adapter/mock/mockAdapter.js +81 -0
- package/dist/ai/adapter/openai/createOpenAIStream.d.ts +9 -0
- package/dist/ai/adapter/openai/createOpenAIStream.js +33 -0
- package/dist/ai/adapter/openai/errors.d.ts +3 -0
- package/dist/ai/adapter/openai/errors.js +37 -0
- package/dist/ai/adapter/openai/index.d.ts +6 -0
- package/dist/ai/adapter/openai/index.js +6 -0
- package/dist/ai/adapter/openai/openaiAdapter.d.ts +9 -0
- package/dist/ai/adapter/openai/openaiAdapter.js +54 -0
- package/dist/ai/adapter/openai/responses.d.ts +4 -0
- package/dist/ai/adapter/openai/responses.js +108 -0
- package/dist/ai/adapter/openai/sse.d.ts +24 -0
- package/dist/ai/adapter/openai/sse.js +112 -0
- package/dist/ai/adapter/openai/wire.d.ts +40 -0
- package/dist/ai/adapter/types.d.ts +131 -0
- package/dist/ai/adapter/types.js +11 -0
- package/dist/ai/agent/classifier.d.ts +2 -0
- package/dist/ai/agent/classifier.js +12 -0
- package/dist/ai/agent/diff.d.ts +35 -0
- package/dist/ai/agent/diff.js +223 -0
- package/dist/ai/agent/diffHighlight.d.ts +6 -0
- package/dist/ai/agent/diffHighlight.js +101 -0
- package/dist/ai/agent/index.d.ts +6 -0
- package/dist/ai/agent/permissions.d.ts +11 -0
- package/dist/ai/agent/permissions.js +29 -0
- package/dist/ai/agent/toolfmt.d.ts +18 -0
- package/dist/ai/agent/toolfmt.js +383 -0
- package/dist/ai/agent/transcript.d.ts +38 -0
- package/dist/ai/agent/transcript.js +127 -0
- package/dist/ai/ai.css +325 -0
- package/dist/ai/components/AllocationSelector.d.ts +4 -0
- package/dist/ai/components/AllocationSelector.js +56 -0
- package/dist/ai/components/AttachmentManager.d.ts +1 -0
- package/dist/ai/components/AttachmentManager.js +144 -0
- package/dist/ai/components/AttachmentUpload.d.ts +24 -0
- package/dist/ai/components/AttachmentUpload.js +179 -0
- package/dist/ai/components/BlockedGroupBanner.d.ts +1 -0
- package/dist/ai/components/BlockedGroupBanner.js +29 -0
- package/dist/ai/components/BranchNavigator.d.ts +8 -0
- package/dist/ai/components/BranchNavigator.js +57 -0
- package/dist/ai/components/ChatEmptyState.d.ts +3 -0
- package/dist/ai/components/ChatEmptyState.js +171 -0
- package/dist/ai/components/ChatInput.d.ts +45 -0
- package/dist/ai/components/ChatInput.js +265 -0
- package/dist/ai/components/ChatLayout.d.ts +5 -0
- package/dist/ai/components/ChatLayout.js +15 -0
- package/dist/ai/components/ChatMessage.d.ts +24 -0
- package/dist/ai/components/ChatMessage.js +338 -0
- package/dist/ai/components/ChatMessageList.d.ts +35 -0
- package/dist/ai/components/ChatMessageList.js +301 -0
- package/dist/ai/components/ChatSidebar.d.ts +5 -0
- package/dist/ai/components/ChatSidebar.js +345 -0
- package/dist/ai/components/ChatThread.d.ts +3 -0
- package/dist/ai/components/ChatThread.js +198 -0
- package/dist/ai/components/ComposerChrome.d.ts +18 -0
- package/dist/ai/components/ComposerChrome.js +50 -0
- package/dist/ai/components/ComposerFrame.d.ts +16 -0
- package/dist/ai/components/ComposerFrame.js +33 -0
- package/dist/ai/components/DragOverlay.d.ts +5 -0
- package/dist/ai/components/DragOverlay.js +20 -0
- package/dist/ai/components/ModelSelector.d.ts +6 -0
- package/dist/ai/components/ModelSelector.js +343 -0
- package/dist/ai/components/ShareDialog.d.ts +11 -0
- package/dist/ai/components/ShareDialog.js +260 -0
- package/dist/ai/components/SlashMenu.d.ts +28 -0
- package/dist/ai/components/SlashMenu.js +91 -0
- package/dist/ai/components/agent/ActivityLine.d.ts +21 -0
- package/dist/ai/components/agent/ActivityLine.js +151 -0
- package/dist/ai/components/agent/AgentMessageParts.d.ts +54 -0
- package/dist/ai/components/agent/AgentMessageParts.js +721 -0
- package/dist/ai/components/agent/PermissionPicker.d.ts +11 -0
- package/dist/ai/components/agent/PermissionPicker.js +38 -0
- package/dist/ai/components/attachmentKeys.d.ts +4 -0
- package/dist/ai/components/attachmentKeys.js +10 -0
- package/dist/ai/core/ChatProvider.d.ts +66 -0
- package/dist/ai/core/ChatProvider.js +848 -0
- package/dist/ai/core/KeyboardShortcutsProvider.d.ts +5 -0
- package/dist/ai/core/KeyboardShortcutsProvider.js +9 -0
- package/dist/ai/core/chatReducer.d.ts +114 -0
- package/dist/ai/core/chatReducer.js +223 -0
- package/dist/ai/core/config.d.ts +47 -0
- package/dist/ai/core/config.js +45 -0
- package/dist/ai/core/events.d.ts +1 -0
- package/dist/ai/core/events.js +4 -0
- package/dist/ai/core/exportConversation.d.ts +4 -0
- package/dist/ai/core/exportConversation.js +42 -0
- package/dist/ai/core/greeting.d.ts +3 -0
- package/dist/ai/core/greeting.js +38 -0
- package/dist/ai/core/parts.d.ts +11 -0
- package/dist/ai/core/parts.js +84 -0
- package/dist/ai/core/useDragDrop.d.ts +14 -0
- package/dist/ai/core/useDragDrop.js +36 -0
- package/dist/ai/core/useKeyboardShortcuts.d.ts +12 -0
- package/dist/ai/core/useKeyboardShortcuts.js +77 -0
- package/dist/ai/core/useSSEStream.d.ts +34 -0
- package/dist/ai/core/useSSEStream.js +98 -0
- package/dist/ai/index.d.ts +40 -0
- package/dist/ai/index.js +44 -0
- package/dist/ai/strings.d.ts +167 -0
- package/dist/ai/strings.js +175 -0
- package/dist/ai/types.d.ts +236 -0
- package/dist/ai/ui/Avatar.d.ts +8 -0
- package/dist/ai/ui/Avatar.js +35 -0
- package/dist/ai/ui/Dropdown.d.ts +31 -0
- package/dist/ai/ui/Dropdown.js +110 -0
- package/dist/ai/ui/Markdown.d.ts +8 -0
- package/dist/ai/ui/Markdown.js +79 -0
- package/dist/ai/ui/Notice.d.ts +21 -0
- package/dist/ai/ui/Notice.js +77 -0
- package/dist/ai/ui/buttons.d.ts +1 -0
- package/dist/ai/ui/codeBreaks.d.ts +16 -0
- package/dist/ai/ui/codeBreaks.js +36 -0
- package/dist/ai/ui/prose.d.ts +1 -0
- package/dist/ai/ui/prose.js +13 -0
- package/dist/ai/ui/sidebar.d.ts +81 -0
- package/dist/ai/ui/sidebar.js +148 -0
- package/dist/ai/utils.d.ts +4 -0
- package/dist/ai/utils.js +23 -0
- package/dist/assets/{editor.worker-CuBRIwi-.js → editor.worker-BmHUIVG4.js} +194 -163
- package/dist/assets/{json.worker-8ytS02vz.js → json.worker-D8bJ92nw.js} +384 -338
- package/dist/assets/{yaml.worker-DJC-VUcv.js → yaml.worker-C4gyGAko.js} +15657 -13823
- package/dist/components/AddMenu.js +46 -0
- package/dist/components/Avatar.d.ts +1 -1
- package/dist/components/Avatar.js +46 -0
- package/dist/{chunks/BareModal-BtRiQezg.js → components/BareModal.js} +1 -1
- package/dist/components/Breadcrumbs.d.ts +1 -1
- package/dist/components/Breadcrumbs.js +83 -0
- package/dist/components/Button.js +83 -0
- package/dist/components/Callout.js +23 -0
- package/dist/components/Card.js +31 -0
- package/dist/components/CollapsiblePanel.js +77 -0
- package/dist/components/ConfirmModal.js +74 -0
- package/dist/components/CopyToClipboard.js +81 -0
- package/dist/{chunks/CreateModal-BY6DLmur.js → components/CreateModal.js} +10 -189
- package/dist/components/DescriptionList.js +42 -0
- package/dist/components/Dropdown.d.ts +1 -1
- package/dist/components/Dropdown.js +349 -0
- package/dist/components/EmptyState.d.ts +1 -1
- package/dist/components/EmptyState.js +27 -0
- package/dist/components/Filter.js +32 -0
- package/dist/components/FilterPill.js +13 -0
- package/dist/components/IconButton.js +34 -0
- package/dist/components/Indicator.d.ts +2 -2
- package/dist/{chunks/Indicator-hBSIxOPK.js → components/Indicator.js} +1 -1
- package/dist/components/Input.d.ts +1 -1
- package/dist/components/Input.js +88 -0
- package/dist/components/LetterBadge.d.ts +1 -1
- package/dist/components/LetterBadge.js +13 -0
- package/dist/components/Listbox.js +123 -0
- package/dist/{chunks/Loader-BXoXTZGc.js → components/Loader.js} +1 -1
- package/dist/components/Markdown.js +15 -0
- package/dist/components/MarkdownImpl.d.ts +1 -1
- package/dist/components/MultiSelect.js +171 -0
- package/dist/components/Overview.js +39 -0
- package/dist/components/PageHeader.js +194 -0
- package/dist/components/Pagination.js +35 -0
- package/dist/components/Provider.d.ts +16 -65
- package/dist/{chunks/Provider-Ghua9PkN.js → components/Provider.js} +54 -20
- package/dist/{chunks/RequiredMark-DfLdYbYZ.js → components/RequiredMark.js} +1 -1
- package/dist/components/SectionHeader.js +11 -0
- package/dist/components/SettingModeOption.js +30 -0
- package/dist/components/SettingRow.d.ts +1 -1
- package/dist/components/SettingRow.js +35 -0
- package/dist/components/SettingsCard.js +31 -0
- package/dist/components/SettingsGroup.d.ts +1 -1
- package/dist/components/SettingsGroup.js +17 -0
- package/dist/components/Sort.js +42 -0
- package/dist/components/StatusBadge.js +63 -0
- package/dist/components/SwitchToggle.js +59 -0
- package/dist/{chunks/SwitchToggleSmall-FcsaYSTs.js → components/SwitchToggleSmall.js} +1 -1
- package/dist/{chunks/Table-4OHjdKdO.js → components/Table.js} +7 -5
- package/dist/components/Toggle.js +20 -0
- package/dist/{chunks/Tooltip-Crxo_eU_.js → components/Tooltip.js} +6 -4
- package/dist/{chunks/StatusBadge-C1Blx_cW.js → components/dropdownUtils.js} +2 -63
- package/dist/components/focus.d.ts +2 -0
- package/dist/components/focus.js +7 -0
- package/dist/components/ghostButton.js +7 -0
- package/dist/components/inputClasses.js +4 -0
- package/dist/components/keys.d.ts +12 -0
- package/dist/components/keys.js +27 -0
- package/dist/components/relativeTime.js +32 -0
- package/dist/{chunks/useCssIsDark-DHr05dG2.js → components/useCssIsDark.js} +1 -1
- package/dist/duration.d.ts +3 -0
- package/dist/duration.js +17 -0
- package/dist/editor/Editor.js +13 -0
- package/dist/editor/EditorField.js +53 -0
- package/dist/editor/FormCodePanel.js +173 -0
- package/dist/editor/Monaco.d.ts +1 -20
- package/dist/editor/Monaco.js +112 -0
- package/dist/editor/index.d.ts +2 -1
- package/dist/editor/index.js +7 -2
- package/dist/editor/themes.js +91 -0
- package/dist/editor/workers.js +29 -0
- package/dist/editor/yaml.d.ts +5 -0
- package/dist/editor/yaml.js +15 -0
- package/dist/engine.d.ts +98 -0
- package/dist/file-explorer/FileExplorer.d.ts +11 -2
- package/dist/file-explorer/FileExplorer.js +1402 -0
- package/dist/file-explorer/FileExplorerContext.d.ts +1 -1
- package/dist/file-explorer/FileExplorerContext.js +370 -0
- package/dist/file-explorer/FilePreview/CodePreviewEditor.d.ts +1 -1
- package/dist/{chunks/CodePreviewEditor-4lx3kE-w.js → file-explorer/FilePreview/CodePreviewEditor.js} +3 -2
- package/dist/file-explorer/FilePreview/Inline.js +45 -0
- package/dist/file-explorer/FilePreview/StreamedBadge.js +16 -0
- package/dist/file-explorer/FilePreview/Viewer.js +526 -0
- package/dist/file-explorer/FilePreview/index.js +266 -0
- package/dist/file-explorer/FilePreview/parse.js +63 -0
- package/dist/file-explorer/FilePreview/previewCache.js +98 -0
- package/dist/file-explorer/FilePreview/previewType.d.ts +1 -1
- package/dist/file-explorer/FilePreview/previewType.js +151 -0
- package/dist/file-explorer/FilePreview/readCappedBytes.js +196 -0
- package/dist/file-explorer/FilePreview/useObjectBlobUrl.js +95 -0
- package/dist/file-explorer/FilePreview/useObjectText.js +109 -0
- package/dist/file-explorer/FilePreview/usePresignedUrl.js +73 -0
- package/dist/file-explorer/FileRow.d.ts +1 -1
- package/dist/file-explorer/FileRow.js +165 -0
- package/dist/file-explorer/FileRowsWindow.js +92 -0
- package/dist/file-explorer/FileTable.js +172 -0
- package/dist/file-explorer/FileTableHeaders.js +49 -0
- package/dist/file-explorer/LoadMoreRow.js +46 -0
- package/dist/file-explorer/TreeView.js +376 -0
- package/dist/file-explorer/helpers.d.ts +4 -4
- package/dist/file-explorer/helpers.js +537 -0
- package/dist/file-explorer/index.d.ts +3 -3
- package/dist/file-explorer/index.js +7 -5705
- package/dist/file-explorer/lib/batch.js +39 -0
- package/dist/file-explorer/lib/errors.js +9 -0
- package/dist/file-explorer/lib/paging.js +124 -0
- package/dist/file-explorer/lib/types.d.ts +6 -1
- package/dist/file-explorer/lib/utils.d.ts +1 -3
- package/dist/file-explorer/lib/utils.js +322 -0
- package/dist/file-explorer/toasts.js +400 -0
- package/dist/file-explorer/treeRows.js +73 -0
- package/dist/file-explorer/useNearEnd.d.ts +1 -1
- package/dist/file-explorer/useNearEnd.js +27 -0
- package/dist/form/FieldWrapper.d.ts +2 -2
- package/dist/form/FieldWrapper.js +54 -0
- package/dist/form/Fields/BooleanField.js +51 -0
- package/dist/form/Fields/CheckboxGroupField.js +72 -0
- package/dist/form/Fields/ColorField.js +33 -0
- package/dist/form/Fields/DropdownField.js +49 -0
- package/dist/form/Fields/DurationField.js +130 -0
- package/dist/form/Fields/LabelField.js +19 -0
- package/dist/form/Fields/MultiDropdownField.js +40 -0
- package/dist/form/Fields/NumberField.js +51 -0
- package/dist/form/Fields/ObjectField.js +54 -0
- package/dist/form/Fields/RadioField.js +49 -0
- package/dist/form/Fields/RangeField.js +58 -0
- package/dist/form/Fields/ResourceOptionIcon.d.ts +1 -1
- package/dist/form/Fields/ResourceOptionIcon.js +21 -0
- package/dist/form/Fields/StepField.js +6 -0
- package/dist/form/Fields/StringField.js +37 -0
- package/dist/form/Fields/TextAreaField.js +31 -0
- package/dist/form/Fields/durationValidity.js +11 -0
- package/dist/form/Form.d.ts +4 -21
- package/dist/form/Form.js +643 -0
- package/dist/form/SpecialTypes/DropdownWrapper.js +30 -0
- package/dist/form/SpecialTypes/FormikCustomDropdown.js +122 -0
- package/dist/form/SpecialTypes/FormikCustomInput.js +111 -0
- package/dist/form/SpecialTypes/FormikMultiSelectDropdown.js +31 -0
- package/dist/form/SpecialTypes/FormikNumericInput.js +60 -0
- package/dist/form/Wizard/WizardContainer.js +138 -0
- package/dist/form/Wizard/WizardNavigation.js +92 -0
- package/dist/form/Wizard/WizardStepContent.js +35 -0
- package/dist/form/Wizard/WizardStepIndicator.js +108 -0
- package/dist/form/Wizard/useWizardState.js +118 -0
- package/dist/form/Wizard/utils.js +34 -0
- package/dist/form/fieldContext.js +26 -0
- package/dist/form/fieldRegistry.js +50 -0
- package/dist/form/index.d.ts +11 -12
- package/dist/form/index.js +18 -2445
- package/dist/form/lib.d.ts +6 -1
- package/dist/{chunks/FieldWrapper-Bef01EWO.js → form/lib.js} +5 -104
- package/dist/form/types/fieldComponentTypes.d.ts +3 -2
- package/dist/form/types/fieldTypes.d.ts +6 -20
- package/dist/form/useParsedOpts.d.ts +1 -1
- package/dist/form/useParsedOpts.js +62 -0
- package/dist/form/usePrevious.js +11 -0
- package/dist/form/utils/checkShowIfObject.js +14 -0
- package/dist/form/utils/{slurmDuration.d.ts → duration.d.ts} +2 -2
- package/dist/form/utils/duration.js +69 -0
- package/dist/form/utils/getParentValue.js +23 -0
- package/dist/form/utils/getPlaceholder.js +9 -0
- package/dist/form/utils/getValueUsingPath.js +23 -0
- package/dist/form/utils/secondaryField.js +22 -0
- package/dist/graph/AnnotationBanner.js +141 -0
- package/dist/graph/Collapse.js +41 -0
- package/dist/{workflow/index.js → graph/DependencyGraph.js} +76 -1163
- package/dist/graph/JobSummary.js +104 -0
- package/dist/{workflow → graph}/MatrixGroup.d.ts +2 -2
- package/dist/graph/MatrixGroup.js +107 -0
- package/dist/graph/Reveal.js +57 -0
- package/dist/graph/TreeView.js +711 -0
- package/dist/{workflow → graph}/index.d.ts +1 -1
- package/dist/graph/index.js +2 -0
- package/dist/{workflow → graph}/types.d.ts +3 -3
- package/dist/graph/types.js +6 -0
- package/dist/icons.d.ts +20 -21
- package/dist/index.d.ts +38 -40
- package/dist/index.js +47 -599
- package/dist/list/ActionToolbar.js +184 -0
- package/dist/list/HoverCard.js +73 -0
- package/dist/list/ListPage.js +145 -0
- package/dist/list/ListPager.js +59 -0
- package/dist/list/ListTable.d.ts +1 -1
- package/dist/list/ListTable.js +163 -0
- package/dist/list/ListViewControls.d.ts +2 -2
- package/dist/list/ListViewControls.js +372 -0
- package/dist/list/RowContextMenu.js +350 -0
- package/dist/list/UserHoverCard.js +117 -0
- package/dist/list/index.d.ts +9 -9
- package/dist/list/index.js +11 -2
- package/dist/list/listSearch.js +137 -0
- package/dist/list/listView.js +210 -0
- package/dist/list/textEntry.js +10 -0
- package/dist/logviewer/LogViewer.d.ts +1 -1
- package/dist/logviewer/LogViewer.js +750 -0
- package/dist/logviewer/index.d.ts +1 -0
- package/dist/logviewer/index.js +3 -742
- package/dist/logviewer/segments.d.ts +9 -0
- package/dist/logviewer/segments.js +80 -0
- package/dist/styles/fonts.css +4 -4
- package/dist/styles/theme.css +6 -4
- package/dist/styles.css +1 -1
- package/dist/theme/index.js +2 -2
- package/package.json +38 -14
- package/LICENSE +0 -202
- package/dist/chunks/Monaco-C1POOdVv.js +0 -1046
- package/dist/chunks/PageHeader-l49p1nM9.js +0 -690
- package/dist/chunks/SwitchToggle-CHPP8uZQ.js +0 -755
- package/dist/chunks/editor-9_uVtUyy.js +0 -347
- package/dist/chunks/list-qrojZZNv.js +0 -1411
- package/dist/editor/usesGitlab.d.ts +0 -97
- package/dist/form/Fields/BucketReadOnlyField.d.ts +0 -7
- package/dist/form/types/workflow-schema.d.ts +0 -1145
- package/dist/form/utils/pwResolver.d.ts +0 -18
- package/dist/{chunks/MarkdownImpl-Bq4QhrtA.js → components/MarkdownImpl.js} +1 -1
- /package/dist/{workflow → graph}/AnnotationBanner.d.ts +0 -0
- /package/dist/{workflow → graph}/Collapse.d.ts +0 -0
- /package/dist/{workflow → graph}/DependencyGraph.d.ts +0 -0
- /package/dist/{workflow → graph}/JobSummary.d.ts +0 -0
- /package/dist/{workflow → graph}/Reveal.d.ts +0 -0
- /package/dist/{workflow → graph}/TreeView.d.ts +0 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { useCallback, useRef, useState } from "react";
|
|
2
|
+
//#region src/ai/core/useDragDrop.ts
|
|
3
|
+
function useDragDrop({ onFilesDropped }) {
|
|
4
|
+
const [isDragging, setIsDragging] = useState(false);
|
|
5
|
+
const dragCounterRef = useRef(0);
|
|
6
|
+
return {
|
|
7
|
+
isDragging,
|
|
8
|
+
dragHandlers: {
|
|
9
|
+
onDragEnter: useCallback((e) => {
|
|
10
|
+
e.preventDefault();
|
|
11
|
+
e.stopPropagation();
|
|
12
|
+
dragCounterRef.current++;
|
|
13
|
+
if (e.dataTransfer.types.includes("Files")) setIsDragging(true);
|
|
14
|
+
}, []),
|
|
15
|
+
onDragLeave: useCallback((e) => {
|
|
16
|
+
e.preventDefault();
|
|
17
|
+
e.stopPropagation();
|
|
18
|
+
dragCounterRef.current--;
|
|
19
|
+
if (dragCounterRef.current === 0) setIsDragging(false);
|
|
20
|
+
}, []),
|
|
21
|
+
onDragOver: useCallback((e) => {
|
|
22
|
+
e.preventDefault();
|
|
23
|
+
e.stopPropagation();
|
|
24
|
+
}, []),
|
|
25
|
+
onDrop: useCallback((e) => {
|
|
26
|
+
e.preventDefault();
|
|
27
|
+
e.stopPropagation();
|
|
28
|
+
dragCounterRef.current = 0;
|
|
29
|
+
setIsDragging(false);
|
|
30
|
+
if (e.dataTransfer.files.length > 0) onFilesDropped(e.dataTransfer.files);
|
|
31
|
+
}, [onFilesDropped])
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { useDragDrop as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ChatMessage } from '../types.js';
|
|
2
|
+
interface UseKeyboardShortcutsOptions {
|
|
3
|
+
enabled?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function useKeyboardShortcuts(options?: UseKeyboardShortcutsOptions): {
|
|
6
|
+
getLastUserMessage: () => ChatMessage | null;
|
|
7
|
+
getLastAssistantMessage: () => string | null | undefined;
|
|
8
|
+
handleNewConversation: () => void;
|
|
9
|
+
handleCopyLastResponse: () => Promise<void>;
|
|
10
|
+
handleStopGeneration: () => void;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { useChat } from "./ChatProvider.js";
|
|
2
|
+
import { isMac } from "../utils.js";
|
|
3
|
+
import { FOCUS_SIDEBAR_SEARCH_EVENT } from "./events.js";
|
|
4
|
+
import { useCallback, useEffect } from "react";
|
|
5
|
+
//#region src/ai/core/useKeyboardShortcuts.ts
|
|
6
|
+
function useKeyboardShortcuts(options = {}) {
|
|
7
|
+
const { enabled = true } = options;
|
|
8
|
+
const { currentConversation, isStreaming, stopStreaming, clearCurrentConversation, navigation, notify } = useChat();
|
|
9
|
+
const getLastAssistantMessage = useCallback(() => {
|
|
10
|
+
const messages = currentConversation?.messages || [];
|
|
11
|
+
for (let i = messages.length - 1; i >= 0; i--) if (messages[i].role === "assistant" && messages[i].content) return messages[i].content;
|
|
12
|
+
return null;
|
|
13
|
+
}, [currentConversation?.messages]);
|
|
14
|
+
const getLastUserMessage = useCallback(() => {
|
|
15
|
+
const messages = currentConversation?.messages || [];
|
|
16
|
+
for (let i = messages.length - 1; i >= 0; i--) if (messages[i].role === "user") return messages[i];
|
|
17
|
+
return null;
|
|
18
|
+
}, [currentConversation?.messages]);
|
|
19
|
+
const handleNewConversation = useCallback(() => {
|
|
20
|
+
clearCurrentConversation();
|
|
21
|
+
navigation.toNewChat();
|
|
22
|
+
}, [clearCurrentConversation, navigation]);
|
|
23
|
+
const handleCopyLastResponse = useCallback(async () => {
|
|
24
|
+
const content = getLastAssistantMessage();
|
|
25
|
+
if (content) try {
|
|
26
|
+
await navigator.clipboard.writeText(content);
|
|
27
|
+
notify.success("Copied to clipboard");
|
|
28
|
+
} catch {
|
|
29
|
+
notify.error("Failed to copy");
|
|
30
|
+
}
|
|
31
|
+
else notify.info("No response to copy");
|
|
32
|
+
}, [getLastAssistantMessage, notify]);
|
|
33
|
+
const handleStopGeneration = useCallback(() => {
|
|
34
|
+
if (isStreaming) stopStreaming();
|
|
35
|
+
}, [isStreaming, stopStreaming]);
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
if (!enabled) return;
|
|
38
|
+
const handleKeyDown = (e) => {
|
|
39
|
+
const cmdKey = isMac() ? e.metaKey : e.ctrlKey;
|
|
40
|
+
if (e.key === "Escape") {
|
|
41
|
+
handleStopGeneration();
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
if (cmdKey && e.shiftKey && e.key === "O") {
|
|
45
|
+
e.preventDefault();
|
|
46
|
+
handleNewConversation();
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
if (cmdKey && e.shiftKey && e.key === "C") {
|
|
50
|
+
e.preventDefault();
|
|
51
|
+
handleCopyLastResponse();
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
if (cmdKey && e.shiftKey && e.key === "F") {
|
|
55
|
+
e.preventDefault();
|
|
56
|
+
document.dispatchEvent(new Event(FOCUS_SIDEBAR_SEARCH_EVENT));
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
61
|
+
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
62
|
+
}, [
|
|
63
|
+
enabled,
|
|
64
|
+
handleNewConversation,
|
|
65
|
+
handleCopyLastResponse,
|
|
66
|
+
handleStopGeneration
|
|
67
|
+
]);
|
|
68
|
+
return {
|
|
69
|
+
getLastUserMessage,
|
|
70
|
+
getLastAssistantMessage,
|
|
71
|
+
handleNewConversation,
|
|
72
|
+
handleCopyLastResponse,
|
|
73
|
+
handleStopGeneration
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
//#endregion
|
|
77
|
+
export { useKeyboardShortcuts };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { MessagePart } from '../types.js';
|
|
2
|
+
import type { ChatAction } from './chatReducer.js';
|
|
3
|
+
interface BackgroundStream {
|
|
4
|
+
content: string;
|
|
5
|
+
reasoning: string;
|
|
6
|
+
parts: MessagePart[];
|
|
7
|
+
messageId: string | null;
|
|
8
|
+
isActive: boolean;
|
|
9
|
+
}
|
|
10
|
+
interface UseSSEStreamResult {
|
|
11
|
+
/** Feed a chunk of text into the animation buffer */
|
|
12
|
+
onStreamingChunk: (chunk: string) => void;
|
|
13
|
+
/** Start the animation loop for a conversation */
|
|
14
|
+
startStreaming: (conversationId: string) => void;
|
|
15
|
+
/** Stop the animation loop, flush remaining content */
|
|
16
|
+
stopAnimationLoop: () => {
|
|
17
|
+
unrevealed: string;
|
|
18
|
+
conversationId: string | null;
|
|
19
|
+
};
|
|
20
|
+
/** Reset all animation refs (used when navigating away) */
|
|
21
|
+
resetAnimationRefs: () => void;
|
|
22
|
+
/** Ref to the target content buffer */
|
|
23
|
+
targetStreamContentRef: React.RefObject<string>;
|
|
24
|
+
/** Ref tracking whether streaming is active */
|
|
25
|
+
streamActiveRef: React.MutableRefObject<boolean>;
|
|
26
|
+
/** Ref tracking which conversation is being streamed */
|
|
27
|
+
streamingConversationIdRef: React.MutableRefObject<string | null>;
|
|
28
|
+
/** Per-conversation background stream storage */
|
|
29
|
+
backgroundStreamsRef: React.MutableRefObject<Map<string, BackgroundStream>>;
|
|
30
|
+
/** AbortController ref for cancelling fetch requests */
|
|
31
|
+
abortControllerRef: React.MutableRefObject<AbortController | null>;
|
|
32
|
+
}
|
|
33
|
+
export declare function useSSEStream(dispatch: React.Dispatch<ChatAction>): UseSSEStreamResult;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { useCallback, useEffect, useRef } from "react";
|
|
2
|
+
//#region src/ai/core/useSSEStream.ts
|
|
3
|
+
function useSSEStream(dispatch) {
|
|
4
|
+
const targetStreamContentRef = useRef("");
|
|
5
|
+
const revealedLengthRef = useRef(0);
|
|
6
|
+
const streamRafRef = useRef(null);
|
|
7
|
+
const streamActiveRef = useRef(false);
|
|
8
|
+
const lastFrameTimeRef = useRef(0);
|
|
9
|
+
const lastDispatchTimeRef = useRef(0);
|
|
10
|
+
const streamingConversationIdRef = useRef(null);
|
|
11
|
+
const backgroundStreamsRef = useRef(/* @__PURE__ */ new Map());
|
|
12
|
+
const abortControllerRef = useRef(null);
|
|
13
|
+
const animateStreamContent = useCallback(() => {
|
|
14
|
+
const now = performance.now();
|
|
15
|
+
const target = targetStreamContentRef.current;
|
|
16
|
+
const revealed = revealedLengthRef.current;
|
|
17
|
+
const remaining = target.length - revealed;
|
|
18
|
+
const conversationId = streamingConversationIdRef.current;
|
|
19
|
+
const timeSinceDispatch = now - lastDispatchTimeRef.current;
|
|
20
|
+
if (remaining > 0 && timeSinceDispatch >= 32 && conversationId) {
|
|
21
|
+
const dt = lastFrameTimeRef.current ? now - lastFrameTimeRef.current : 32;
|
|
22
|
+
const newRevealed = revealed + Math.min(remaining, Math.max(1, Math.round((remaining > 360 ? .48 : .24) * dt)));
|
|
23
|
+
revealedLengthRef.current = newRevealed;
|
|
24
|
+
dispatch({
|
|
25
|
+
type: "APPEND_STREAMING_CONTENT",
|
|
26
|
+
content: target.slice(revealed, newRevealed),
|
|
27
|
+
conversationId
|
|
28
|
+
});
|
|
29
|
+
lastDispatchTimeRef.current = now;
|
|
30
|
+
}
|
|
31
|
+
lastFrameTimeRef.current = now;
|
|
32
|
+
if (streamActiveRef.current || revealedLengthRef.current < targetStreamContentRef.current.length) streamRafRef.current = requestAnimationFrame(animateStreamContent);
|
|
33
|
+
else {
|
|
34
|
+
streamRafRef.current = null;
|
|
35
|
+
lastFrameTimeRef.current = 0;
|
|
36
|
+
}
|
|
37
|
+
}, [dispatch]);
|
|
38
|
+
const onStreamingChunk = useCallback((chunk) => {
|
|
39
|
+
const convId = streamingConversationIdRef.current;
|
|
40
|
+
if (convId) {
|
|
41
|
+
const bgStream = backgroundStreamsRef.current.get(convId);
|
|
42
|
+
if (bgStream) bgStream.content += chunk;
|
|
43
|
+
}
|
|
44
|
+
if (!streamActiveRef.current) return;
|
|
45
|
+
targetStreamContentRef.current += chunk;
|
|
46
|
+
if (streamRafRef.current === null) streamRafRef.current = requestAnimationFrame(animateStreamContent);
|
|
47
|
+
}, [animateStreamContent]);
|
|
48
|
+
const startStreaming = useCallback((conversationId) => {
|
|
49
|
+
streamingConversationIdRef.current = conversationId;
|
|
50
|
+
streamActiveRef.current = true;
|
|
51
|
+
}, []);
|
|
52
|
+
const stopAnimationLoop = useCallback(() => {
|
|
53
|
+
const conversationId = streamingConversationIdRef.current;
|
|
54
|
+
streamActiveRef.current = false;
|
|
55
|
+
if (streamRafRef.current !== null) {
|
|
56
|
+
cancelAnimationFrame(streamRafRef.current);
|
|
57
|
+
streamRafRef.current = null;
|
|
58
|
+
}
|
|
59
|
+
const unrevealed = targetStreamContentRef.current.slice(revealedLengthRef.current);
|
|
60
|
+
targetStreamContentRef.current = "";
|
|
61
|
+
revealedLengthRef.current = 0;
|
|
62
|
+
lastFrameTimeRef.current = 0;
|
|
63
|
+
lastDispatchTimeRef.current = 0;
|
|
64
|
+
return {
|
|
65
|
+
unrevealed,
|
|
66
|
+
conversationId
|
|
67
|
+
};
|
|
68
|
+
}, []);
|
|
69
|
+
const resetAnimationRefs = useCallback(() => {
|
|
70
|
+
streamActiveRef.current = false;
|
|
71
|
+
if (streamRafRef.current !== null) {
|
|
72
|
+
cancelAnimationFrame(streamRafRef.current);
|
|
73
|
+
streamRafRef.current = null;
|
|
74
|
+
}
|
|
75
|
+
targetStreamContentRef.current = "";
|
|
76
|
+
revealedLengthRef.current = 0;
|
|
77
|
+
lastFrameTimeRef.current = 0;
|
|
78
|
+
lastDispatchTimeRef.current = 0;
|
|
79
|
+
}, []);
|
|
80
|
+
useEffect(() => {
|
|
81
|
+
return () => {
|
|
82
|
+
if (streamRafRef.current !== null) cancelAnimationFrame(streamRafRef.current);
|
|
83
|
+
};
|
|
84
|
+
}, []);
|
|
85
|
+
return {
|
|
86
|
+
onStreamingChunk,
|
|
87
|
+
startStreaming,
|
|
88
|
+
stopAnimationLoop,
|
|
89
|
+
resetAnimationRefs,
|
|
90
|
+
targetStreamContentRef,
|
|
91
|
+
streamActiveRef,
|
|
92
|
+
streamingConversationIdRef,
|
|
93
|
+
backgroundStreamsRef,
|
|
94
|
+
abortControllerRef
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
//#endregion
|
|
98
|
+
export { useSSEStream };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export { durationToAbsHumanDuration } from '../duration.js';
|
|
2
|
+
export * from './adapter/types.js';
|
|
3
|
+
export * from './agent/index.js';
|
|
4
|
+
export { default as AllocationSelector } from './components/AllocationSelector.js';
|
|
5
|
+
export { default as AttachmentManager } from './components/AttachmentManager.js';
|
|
6
|
+
export { type Attachment, type AttachmentUploadHandle, default as AttachmentUpload, } from './components/AttachmentUpload.js';
|
|
7
|
+
export { compactCount, default as ActivityLine, formatElapsed, } from './components/agent/ActivityLine.js';
|
|
8
|
+
export { ApprovalBlock, default as AgentMessageParts, } from './components/agent/AgentMessageParts.js';
|
|
9
|
+
export { default as PermissionPicker } from './components/agent/PermissionPicker.js';
|
|
10
|
+
export { default as BlockedGroupBanner } from './components/BlockedGroupBanner.js';
|
|
11
|
+
export { default as BranchNavigator } from './components/BranchNavigator.js';
|
|
12
|
+
export { default as ChatEmptyState } from './components/ChatEmptyState.js';
|
|
13
|
+
export { type ChatInputHandle, default as ChatInput, } from './components/ChatInput.js';
|
|
14
|
+
export { default as ChatLayout } from './components/ChatLayout.js';
|
|
15
|
+
export { default as ChatMessageView } from './components/ChatMessage.js';
|
|
16
|
+
export { default as ChatMessageList } from './components/ChatMessageList.js';
|
|
17
|
+
export { default as ChatSidebar } from './components/ChatSidebar.js';
|
|
18
|
+
export { default as ChatThread } from './components/ChatThread.js';
|
|
19
|
+
export { ComposerContext, ComposerControls, ComposerSettings, ConnectToolsLink, } from './components/ComposerChrome.js';
|
|
20
|
+
export { default as ComposerFrame } from './components/ComposerFrame.js';
|
|
21
|
+
export { default as DragOverlay } from './components/DragOverlay.js';
|
|
22
|
+
export { default as ModelSelector, getProviderKeyFromModelId, } from './components/ModelSelector.js';
|
|
23
|
+
export { default as ShareDialog, ShareButton, } from './components/ShareDialog.js';
|
|
24
|
+
export { type SlashCommandOption, type SlashMenuConfig, slashMatches, } from './components/SlashMenu.js';
|
|
25
|
+
export { ChatProvider, type ChatProviderProps, useChat, } from './core/ChatProvider.js';
|
|
26
|
+
export { type ChatAction, type ChatState, chatReducer, initialState, } from './core/chatReducer.js';
|
|
27
|
+
export type { PartRendererProps } from './core/config.js';
|
|
28
|
+
export { type ChatLinkProps, type ChatUIConfig, resolveChatConfig, useChatConfig, } from './core/config.js';
|
|
29
|
+
export { FOCUS_SIDEBAR_SEARCH_EVENT } from './core/events.js';
|
|
30
|
+
export { getGreeting } from './core/greeting.js';
|
|
31
|
+
export { KeyboardShortcutsProvider } from './core/KeyboardShortcutsProvider.js';
|
|
32
|
+
export { applyPartDelta, finalizeParts } from './core/parts.js';
|
|
33
|
+
export { default as useDragDrop } from './core/useDragDrop.js';
|
|
34
|
+
export { useKeyboardShortcuts } from './core/useKeyboardShortcuts.js';
|
|
35
|
+
export { type ChatStrings, defaultChatStrings } from './strings.js';
|
|
36
|
+
export * from './types.js';
|
|
37
|
+
export { type DropdownOption, default as Dropdown } from './ui/Dropdown.js';
|
|
38
|
+
export { NoticeBar, NoticeCard, type NoticeTone } from './ui/Notice.js';
|
|
39
|
+
export { RenameDialog, type RowDialogStrings, SidebarGroupHeading, SidebarPanel, SidebarRailItem, SidebarRow, SidebarToggle, useRowDialogs, } from './ui/sidebar.js';
|
|
40
|
+
export { formatFileSize, isMac, isOrgModel } from './utils.js';
|
package/dist/ai/index.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { durationToAbsHumanDuration } from "../duration.js";
|
|
2
|
+
import { ChatAdapterError } from "./adapter/types.js";
|
|
3
|
+
import { classifyPseudoUserMessage } from "./agent/classifier.js";
|
|
4
|
+
import { AGENT_COLOR_NAMES, agentColorHex, bashExitCode, clip, fullToolArgs, isGroupableTool, plural, resultFailed, rollupSentence, sanitizeLabel, sanitizePanelText, summarizeToolArgs, toolHeaderFor, toolSummary } from "./agent/toolfmt.js";
|
|
5
|
+
import { MAX_EDIT_DIFF_LINES, MAX_WRITE_DIFF_LINES, computeEditDiff, computeWriteRows, editSummary, isEditDiffTool, lineDelta, parseEditArgs, wordEmphasisRanges } from "./agent/diff.js";
|
|
6
|
+
import { languageForPath, tokenizeDiffLines } from "./agent/diffHighlight.js";
|
|
7
|
+
import { DEFAULT_PERMISSION_MODE, NAMED_PERMISSION_MODES, clampPermissionMode, isNamedPermissionMode, permissionModesUpTo } from "./agent/permissions.js";
|
|
8
|
+
import { INTERRUPTED_NOTICE, agentTypeLabel, askQuestionFromArgs, firstNonEmptyLine, hiddenTranscriptTool, interruptionNotice, parseSubagentNotice, planFromArgs, subagentDeliveryLine, taskCallFromArgs, thinkingHeading } from "./agent/transcript.js";
|
|
9
|
+
import { applyPartDelta, finalizeParts } from "./core/parts.js";
|
|
10
|
+
import { chatReducer, initialState } from "./core/chatReducer.js";
|
|
11
|
+
import { defaultChatStrings } from "./strings.js";
|
|
12
|
+
import { resolveChatConfig, useChatConfig } from "./core/config.js";
|
|
13
|
+
import { ChatProvider, useChat } from "./core/ChatProvider.js";
|
|
14
|
+
import Dropdown from "./ui/Dropdown.js";
|
|
15
|
+
import { formatFileSize, isMac, isOrgModel } from "./utils.js";
|
|
16
|
+
import AllocationSelector from "./components/AllocationSelector.js";
|
|
17
|
+
import AttachmentManager from "./components/AttachmentManager.js";
|
|
18
|
+
import AttachmentUpload from "./components/AttachmentUpload.js";
|
|
19
|
+
import ActivityLine, { compactCount, formatElapsed } from "./components/agent/ActivityLine.js";
|
|
20
|
+
import AgentMessageParts, { ApprovalBlock } from "./components/agent/AgentMessageParts.js";
|
|
21
|
+
import PermissionPicker from "./components/agent/PermissionPicker.js";
|
|
22
|
+
import ModelSelector, { getProviderKeyFromModelId } from "./components/ModelSelector.js";
|
|
23
|
+
import BlockedGroupBanner from "./components/BlockedGroupBanner.js";
|
|
24
|
+
import BranchNavigator from "./components/BranchNavigator.js";
|
|
25
|
+
import { getGreeting } from "./core/greeting.js";
|
|
26
|
+
import useDragDrop from "./core/useDragDrop.js";
|
|
27
|
+
import { ComposerContext, ComposerControls, ComposerSettings, ConnectToolsLink } from "./components/ComposerChrome.js";
|
|
28
|
+
import DragOverlay from "./components/DragOverlay.js";
|
|
29
|
+
import { slashMatches } from "./components/SlashMenu.js";
|
|
30
|
+
import ChatInput from "./components/ChatInput.js";
|
|
31
|
+
import ChatEmptyState from "./components/ChatEmptyState.js";
|
|
32
|
+
import { FOCUS_SIDEBAR_SEARCH_EVENT } from "./core/events.js";
|
|
33
|
+
import { useKeyboardShortcuts } from "./core/useKeyboardShortcuts.js";
|
|
34
|
+
import { KeyboardShortcutsProvider } from "./core/KeyboardShortcutsProvider.js";
|
|
35
|
+
import { RenameDialog, SidebarGroupHeading, SidebarPanel, SidebarRailItem, SidebarRow, SidebarToggle, useRowDialogs } from "./ui/sidebar.js";
|
|
36
|
+
import ShareDialog, { ShareButton } from "./components/ShareDialog.js";
|
|
37
|
+
import ChatSidebar from "./components/ChatSidebar.js";
|
|
38
|
+
import ChatLayout from "./components/ChatLayout.js";
|
|
39
|
+
import ChatMessage_default from "./components/ChatMessage.js";
|
|
40
|
+
import ChatMessageList from "./components/ChatMessageList.js";
|
|
41
|
+
import ChatThread from "./components/ChatThread.js";
|
|
42
|
+
import ComposerFrame from "./components/ComposerFrame.js";
|
|
43
|
+
import { NoticeBar, NoticeCard } from "./ui/Notice.js";
|
|
44
|
+
export { AGENT_COLOR_NAMES, ActivityLine, AgentMessageParts, AllocationSelector, ApprovalBlock, AttachmentManager, AttachmentUpload, BlockedGroupBanner, BranchNavigator, ChatAdapterError, ChatEmptyState, ChatInput, ChatLayout, ChatMessageList, ChatMessage_default as ChatMessageView, ChatProvider, ChatSidebar, ChatThread, ComposerContext, ComposerControls, ComposerFrame, ComposerSettings, ConnectToolsLink, DEFAULT_PERMISSION_MODE, DragOverlay, Dropdown, FOCUS_SIDEBAR_SEARCH_EVENT, INTERRUPTED_NOTICE, KeyboardShortcutsProvider, MAX_EDIT_DIFF_LINES, MAX_WRITE_DIFF_LINES, ModelSelector, NAMED_PERMISSION_MODES, NoticeBar, NoticeCard, PermissionPicker, RenameDialog, ShareButton, ShareDialog, SidebarGroupHeading, SidebarPanel, SidebarRailItem, SidebarRow, SidebarToggle, agentColorHex, agentTypeLabel, applyPartDelta, askQuestionFromArgs, bashExitCode, chatReducer, clampPermissionMode, classifyPseudoUserMessage, clip, compactCount, computeEditDiff, computeWriteRows, defaultChatStrings, durationToAbsHumanDuration, editSummary, finalizeParts, firstNonEmptyLine, formatElapsed, formatFileSize, fullToolArgs, getGreeting, getProviderKeyFromModelId, hiddenTranscriptTool, initialState, interruptionNotice, isEditDiffTool, isGroupableTool, isMac, isNamedPermissionMode, isOrgModel, languageForPath, lineDelta, parseEditArgs, parseSubagentNotice, permissionModesUpTo, planFromArgs, plural, resolveChatConfig, resultFailed, rollupSentence, sanitizeLabel, sanitizePanelText, slashMatches, subagentDeliveryLine, summarizeToolArgs, taskCallFromArgs, thinkingHeading, tokenizeDiffLines, toolHeaderFor, toolSummary, useChat, useChatConfig, useDragDrop, useKeyboardShortcuts, useRowDialogs, wordEmphasisRanges };
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface ChatStrings {
|
|
3
|
+
modal: {
|
|
4
|
+
cancel: string;
|
|
5
|
+
save: string;
|
|
6
|
+
loading: string;
|
|
7
|
+
};
|
|
8
|
+
shareConversation: {
|
|
9
|
+
title: string;
|
|
10
|
+
loadError: string;
|
|
11
|
+
saveSuccess: string;
|
|
12
|
+
orgAccess: string;
|
|
13
|
+
orgCanView: string;
|
|
14
|
+
allowCollaboration: string;
|
|
15
|
+
groupAccess: string;
|
|
16
|
+
noGroups: string;
|
|
17
|
+
viewOnly: string;
|
|
18
|
+
canCollaborate: string;
|
|
19
|
+
remove: string;
|
|
20
|
+
addGroups: string;
|
|
21
|
+
info: ReactNode;
|
|
22
|
+
shareButton: string;
|
|
23
|
+
};
|
|
24
|
+
blockedGroup: {
|
|
25
|
+
title: string;
|
|
26
|
+
message: string;
|
|
27
|
+
};
|
|
28
|
+
queue: {
|
|
29
|
+
remove: string;
|
|
30
|
+
};
|
|
31
|
+
activity: {
|
|
32
|
+
tokens: (input: string, output: string) => string;
|
|
33
|
+
stop: string;
|
|
34
|
+
};
|
|
35
|
+
emptyState: {
|
|
36
|
+
greeting: string | null;
|
|
37
|
+
modernSubtitle: string;
|
|
38
|
+
noProvidersTitle: string;
|
|
39
|
+
noProvidersBody: string;
|
|
40
|
+
addProvider: string;
|
|
41
|
+
sessionUnreachableTitle: (session: string) => ReactNode;
|
|
42
|
+
sessionUnreachableBody: string;
|
|
43
|
+
retry: string;
|
|
44
|
+
};
|
|
45
|
+
input: {
|
|
46
|
+
placeholder: string;
|
|
47
|
+
placeholderLoading: string;
|
|
48
|
+
placeholderNoProviders: string;
|
|
49
|
+
attachFiles: string;
|
|
50
|
+
stopGenerating: string;
|
|
51
|
+
sendMessage: string;
|
|
52
|
+
filesAttached: (count: number) => string;
|
|
53
|
+
};
|
|
54
|
+
thinking: {
|
|
55
|
+
label: string;
|
|
56
|
+
ellipsis: string;
|
|
57
|
+
thoughtFor: (duration: string) => string;
|
|
58
|
+
activity: string;
|
|
59
|
+
};
|
|
60
|
+
thread: {
|
|
61
|
+
viewOnly: string;
|
|
62
|
+
};
|
|
63
|
+
sidebar: {
|
|
64
|
+
groupToday: string;
|
|
65
|
+
groupYesterday: string;
|
|
66
|
+
groupThisWeek: string;
|
|
67
|
+
groupThisMonth: string;
|
|
68
|
+
groupOlder: string;
|
|
69
|
+
untitled: string;
|
|
70
|
+
rename: string;
|
|
71
|
+
share: string;
|
|
72
|
+
delete: string;
|
|
73
|
+
sharedWithYou: string;
|
|
74
|
+
moreOptions: string;
|
|
75
|
+
openSidebar: string;
|
|
76
|
+
closeSidebar: string;
|
|
77
|
+
newChat: string;
|
|
78
|
+
attachments: string;
|
|
79
|
+
connectTools: string;
|
|
80
|
+
manageProviders: string;
|
|
81
|
+
noConversations: string;
|
|
82
|
+
deleteTitle: string;
|
|
83
|
+
deleteBody: string;
|
|
84
|
+
deleteAction: string;
|
|
85
|
+
renameTitle: string;
|
|
86
|
+
renameAction: string;
|
|
87
|
+
renameLabel: string;
|
|
88
|
+
renamePlaceholder: string;
|
|
89
|
+
};
|
|
90
|
+
attachmentUpload: {
|
|
91
|
+
fileTooLarge: (maxSize: string) => string;
|
|
92
|
+
maxFilesAllowed: (max: number) => string;
|
|
93
|
+
remove: string;
|
|
94
|
+
dropFilesHere: string;
|
|
95
|
+
addFiles: string;
|
|
96
|
+
};
|
|
97
|
+
attachmentManager: {
|
|
98
|
+
title: string;
|
|
99
|
+
empty: string;
|
|
100
|
+
download: string;
|
|
101
|
+
delete: string;
|
|
102
|
+
loadMore: string;
|
|
103
|
+
loading: string;
|
|
104
|
+
};
|
|
105
|
+
branch: {
|
|
106
|
+
previous: string;
|
|
107
|
+
next: string;
|
|
108
|
+
};
|
|
109
|
+
chrome: {
|
|
110
|
+
searchPlaceholder: string;
|
|
111
|
+
searchLabel: string;
|
|
112
|
+
noMatches: string;
|
|
113
|
+
download: string;
|
|
114
|
+
exportError: string;
|
|
115
|
+
jumpToLatest: string;
|
|
116
|
+
};
|
|
117
|
+
messageMeta: {
|
|
118
|
+
stopped: string;
|
|
119
|
+
showMore: string;
|
|
120
|
+
showLess: string;
|
|
121
|
+
tokens: (total: number) => string;
|
|
122
|
+
tokensBreakdown: (prompt: number, completion: number) => string;
|
|
123
|
+
copy: string;
|
|
124
|
+
edit: string;
|
|
125
|
+
regenerate: string;
|
|
126
|
+
retry: string;
|
|
127
|
+
editPlaceholder: string;
|
|
128
|
+
cancel: string;
|
|
129
|
+
send: string;
|
|
130
|
+
};
|
|
131
|
+
permissions: {
|
|
132
|
+
choose: string;
|
|
133
|
+
readOnly: string;
|
|
134
|
+
acceptEdits: string;
|
|
135
|
+
bypassPermissions: string;
|
|
136
|
+
plan: string;
|
|
137
|
+
readOnlyHint: string;
|
|
138
|
+
acceptEditsHint: string;
|
|
139
|
+
bypassPermissionsHint: string;
|
|
140
|
+
planHint: string;
|
|
141
|
+
};
|
|
142
|
+
agentTranscript: {
|
|
143
|
+
showMore: string;
|
|
144
|
+
showLess: string;
|
|
145
|
+
running: string;
|
|
146
|
+
done: string;
|
|
147
|
+
failed: string;
|
|
148
|
+
interrupted: string;
|
|
149
|
+
noOutput: string;
|
|
150
|
+
diffTruncated: string;
|
|
151
|
+
moreLines: string;
|
|
152
|
+
allowOnce: string;
|
|
153
|
+
allowDirectory: string;
|
|
154
|
+
deny: string;
|
|
155
|
+
denyWithFeedback: string;
|
|
156
|
+
feedbackPlaceholder: string;
|
|
157
|
+
send: string;
|
|
158
|
+
answered: string;
|
|
159
|
+
writeOwnAnswer: string;
|
|
160
|
+
subagent: string;
|
|
161
|
+
tasks: string;
|
|
162
|
+
planPending: string;
|
|
163
|
+
approvalPending: string;
|
|
164
|
+
approvalOptions: string;
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
export declare const defaultChatStrings: ChatStrings;
|