@parallelworks/ui 0.77.0 → 0.79.0
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 +42 -6
- package/dist/access/AccessDrawer.d.ts +49 -7
- package/dist/access/AccessDrawer.js +243 -38
- package/dist/access/AccessList.d.ts +19 -1
- package/dist/access/AccessList.js +220 -9
- package/dist/access/GrantView.d.ts +3 -1
- package/dist/access/GrantView.js +17 -4
- package/dist/access/PrincipalPicker.js +5 -5
- package/dist/access/focus.js +1 -1
- package/dist/access/index.d.ts +2 -2
- package/dist/access/index.js +2 -2
- package/dist/access/strings.d.ts +25 -1
- package/dist/access/strings.js +27 -3
- package/dist/access/types.d.ts +26 -0
- package/dist/ai/components/AllocationSelector.js +1 -1
- package/dist/ai/components/AttachmentManager.js +5 -5
- package/dist/ai/components/AttachmentUpload.js +2 -2
- package/dist/ai/components/BranchNavigator.js +1 -1
- package/dist/ai/components/ChatActivity.js +1 -1
- package/dist/ai/components/ChatEmptyState.js +3 -3
- package/dist/ai/components/ChatInput.js +3 -5
- package/dist/ai/components/ChatLayout.js +1 -1
- package/dist/ai/components/ChatMessage.js +1 -1
- package/dist/ai/components/ChatMessageList.js +23 -8
- package/dist/ai/components/ChatSidebar.js +3 -3
- package/dist/ai/components/ChatThread.js +4 -4
- package/dist/ai/components/ComposerAddMenu.js +9 -20
- package/dist/ai/components/ModelSelector.js +3 -3
- package/dist/ai/components/PastedText.js +5 -5
- package/dist/ai/components/SessionView.js +1 -1
- package/dist/ai/components/ShareDialog.js +3 -3
- package/dist/ai/components/SlashMenu.d.ts +31 -4
- package/dist/ai/components/SlashMenu.js +36 -63
- package/dist/ai/components/agent/ActivityLine.js +1 -1
- package/dist/ai/components/agent/AgentMessageParts.js +13 -13
- package/dist/ai/components/conversationActions.js +3 -3
- package/dist/ai/core/ChatProvider.js +1 -1
- package/dist/ai/core/config.js +1 -1
- package/dist/ai/ui/ConversationSidebar.js +3 -3
- package/dist/ai/ui/sidebar.js +3 -3
- package/dist/assets/yaml.worker-DOBV2lND.js +884 -0
- package/dist/components/ActionMenu.d.ts +38 -9
- package/dist/components/ActionMenu.js +48 -22
- package/dist/components/Avatar.d.ts +66 -6
- package/dist/components/Avatar.js +130 -18
- package/dist/components/Breadcrumbs.d.ts +4 -0
- package/dist/components/Breadcrumbs.js +26 -10
- package/dist/components/Button.d.ts +3 -2
- package/dist/components/Button.js +11 -1
- package/dist/components/Callout.d.ts +3 -2
- package/dist/components/Callout.js +3 -2
- package/dist/components/Card.d.ts +33 -9
- package/dist/components/Card.js +24 -8
- package/dist/components/Checkbox.d.ts +3 -1
- package/dist/components/Checkbox.js +4 -2
- package/dist/components/ColorInput.js +1 -1
- package/dist/components/Combobox.d.ts +23 -0
- package/dist/components/Combobox.js +252 -86
- package/dist/components/ConfirmModal.d.ts +28 -2
- package/dist/components/ConfirmModal.js +100 -15
- package/dist/components/ContextMenu.d.ts +29 -2
- package/dist/components/ContextMenu.js +60 -8
- package/dist/components/CopyButton.d.ts +21 -8
- package/dist/components/CopyButton.js +29 -9
- package/dist/components/CreateModal.d.ts +20 -4
- package/dist/components/CreateModal.js +28 -17
- package/dist/components/DatePicker.d.ts +31 -1
- package/dist/components/DatePicker.js +178 -47
- package/dist/components/DescriptionList.d.ts +13 -3
- package/dist/components/DescriptionList.js +43 -11
- package/dist/components/Disclosure.d.ts +10 -2
- package/dist/components/Disclosure.js +18 -7
- package/dist/components/Drawer.js +5 -5
- package/dist/components/EmptyState.d.ts +12 -4
- package/dist/components/EmptyState.js +18 -10
- package/dist/components/ErrorPage.d.ts +40 -0
- package/dist/components/ErrorPage.js +101 -0
- package/dist/components/ExternalLink.d.ts +4 -1
- package/dist/components/ExternalLink.js +4 -5
- package/dist/components/Field.d.ts +21 -6
- package/dist/components/Field.js +32 -16
- package/dist/components/FileButton.d.ts +19 -0
- package/dist/components/FileButton.js +32 -0
- package/dist/components/HoverCard.d.ts +26 -6
- package/dist/components/HoverCard.js +11 -5
- package/dist/components/IconButton.js +4 -2
- package/dist/components/InfoTip.js +3 -3
- package/dist/components/Input.d.ts +33 -3
- package/dist/components/Input.js +149 -14
- package/dist/components/Kbd.d.ts +40 -0
- package/dist/components/Kbd.js +168 -0
- package/dist/components/Listbox.d.ts +103 -0
- package/dist/components/Listbox.js +190 -0
- package/dist/components/Loader.d.ts +8 -2
- package/dist/components/Loader.js +16 -1
- package/dist/components/Markdown.js +1 -1
- package/dist/components/MarkdownImpl.js +1 -1
- package/dist/components/Menu.d.ts +20 -2
- package/dist/components/Menu.js +48 -19
- package/dist/components/MenuEntries.d.ts +41 -4
- package/dist/components/MenuEntries.js +266 -39
- package/dist/components/Meter.d.ts +50 -11
- package/dist/components/Meter.js +71 -21
- package/dist/components/Modal.d.ts +9 -3
- package/dist/components/Modal.js +68 -29
- package/dist/components/OneTimeCodeInput.js +1 -1
- package/dist/components/PageHeader.js +111 -7
- package/dist/components/PageHeaderAction.d.ts +8 -3
- package/dist/components/PageHeaderAction.js +122 -34
- package/dist/components/Pagination.d.ts +13 -1
- package/dist/components/Pagination.js +90 -19
- package/dist/components/Popover.d.ts +16 -2
- package/dist/components/Popover.js +20 -21
- package/dist/components/Provider.d.ts +172 -5
- package/dist/components/Provider.js +157 -14
- package/dist/components/RefreshButton.d.ts +13 -6
- package/dist/components/RefreshButton.js +17 -9
- package/dist/components/RunStatusIcon.d.ts +16 -7
- package/dist/components/RunStatusIcon.js +21 -8
- package/dist/components/Section.d.ts +11 -4
- package/dist/components/Section.js +33 -22
- package/dist/components/SegmentedControl.d.ts +16 -3
- package/dist/components/SegmentedControl.js +7 -3
- package/dist/components/Select.d.ts +19 -3
- package/dist/components/Select.js +114 -68
- package/dist/components/SelectionCopy.d.ts +10 -0
- package/dist/components/SelectionCopy.js +105 -0
- package/dist/components/SettingModeOption.js +1 -1
- package/dist/components/SettingsCard.js +1 -1
- package/dist/components/Skeleton.js +1 -1
- package/dist/components/StatusBadge.d.ts +55 -10
- package/dist/components/StatusBadge.js +91 -15
- package/dist/components/StickyBar.js +1 -1
- package/dist/components/Table.d.ts +22 -4
- package/dist/components/Table.js +46 -24
- package/dist/components/Tabs.d.ts +9 -4
- package/dist/components/Tabs.js +9 -4
- package/dist/components/Tag.d.ts +49 -0
- package/dist/components/Tag.js +199 -0
- package/dist/components/ThemeEditor.js +1 -1
- package/dist/components/Toast.js +1 -1
- package/dist/components/ToggleGroup.d.ts +4 -1
- package/dist/components/ToggleGroup.js +30 -13
- package/dist/components/Tooltip.d.ts +9 -3
- package/dist/components/Tooltip.js +55 -39
- package/dist/components/buttonClasses.d.ts +5 -2
- package/dist/components/buttonClasses.js +11 -10
- package/dist/components/chart.d.ts +69 -0
- package/dist/components/chart.js +145 -0
- package/dist/components/comboboxItems.d.ts +7 -1
- package/dist/components/comboboxItems.js +6 -2
- package/dist/components/dismiss.d.ts +5 -1
- package/dist/components/dismiss.js +6 -2
- package/dist/components/floating.d.ts +4 -4
- package/dist/components/floating.js +5 -5
- package/dist/components/headerActionsFit.d.ts +37 -0
- package/dist/components/headerActionsFit.js +81 -0
- package/dist/components/pageHeaderStore.d.ts +3 -0
- package/dist/components/pageHeaderStore.js +3 -0
- package/dist/components/pathBreaks.js +2 -2
- package/dist/components/popupContainer.d.ts +17 -0
- package/dist/components/popupContainer.js +69 -0
- package/dist/components/relativeTime.d.ts +21 -10
- package/dist/components/relativeTime.js +50 -22
- package/dist/components/segmented.d.ts +18 -4
- package/dist/components/segmented.js +48 -6
- package/dist/components/typedDate.d.ts +5 -0
- package/dist/components/typedDate.js +50 -0
- package/dist/components/useClosingValue.d.ts +4 -0
- package/dist/components/useClosingValue.js +12 -0
- package/dist/components/useCopy.d.ts +6 -0
- package/dist/components/useCopy.js +3 -3
- package/dist/components/useNarrow.d.ts +2 -0
- package/dist/components/useNarrow.js +16 -0
- package/dist/editor/Editor.js +1 -1
- package/dist/editor/FormCodePanel.js +1 -1
- package/dist/editor/Monaco.js +1 -1
- package/dist/editor/workers.js +1 -1
- package/dist/file-explorer/FileExplorer.js +16 -15
- package/dist/file-explorer/FileExplorerContext.js +2 -2
- package/dist/file-explorer/FilePreview/Viewer.js +3 -3
- package/dist/file-explorer/FilePreview/index.js +2 -2
- package/dist/file-explorer/FileRowsWindow.js +3 -3
- package/dist/file-explorer/FileTable.js +1 -1
- package/dist/file-explorer/LoadMoreRow.js +1 -1
- package/dist/file-explorer/TreeView.js +5 -5
- package/dist/file-explorer/helpers.js +2 -2
- package/dist/file-explorer/toasts.js +2 -2
- package/dist/form/Fields/CheckboxGroupField.js +1 -1
- package/dist/form/Fields/DropdownField.js +1 -1
- package/dist/form/Fields/DurationField.js +2 -2
- package/dist/form/Fields/MultiDropdownField.js +1 -1
- package/dist/form/Fields/NumberField.js +1 -1
- package/dist/form/Fields/ObjectField.js +1 -1
- package/dist/form/Fields/RangeField.js +1 -1
- package/dist/form/Fields/StringField.js +1 -1
- package/dist/form/Form.js +3 -3
- package/dist/form/FormLayout.js +1 -1
- package/dist/form/Wizard/WizardContainer.js +1 -1
- package/dist/form/Wizard/WizardNavigation.js +1 -1
- package/dist/form/Wizard/WizardStepContent.js +1 -1
- package/dist/form/fieldRegistry.js +1 -1
- package/dist/form/formEditing.js +1 -1
- package/dist/format.d.ts +17 -7
- package/dist/format.js +39 -16
- package/dist/graph/AnnotationBanner.js +2 -2
- package/dist/graph/Connectors.js +5 -5
- package/dist/graph/DependencyGraph.js +10 -9
- package/dist/graph/GraphEditor.js +4 -4
- package/dist/graph/GraphEditorDialogs.js +13 -12
- package/dist/graph/GraphNode.js +1 -1
- package/dist/graph/InputDialog.js +5 -5
- package/dist/graph/InputsEditor.js +10 -9
- package/dist/graph/MatrixGroup.js +2 -2
- package/dist/graph/ProblemPageLink.d.ts +9 -0
- package/dist/graph/ProblemPageLink.js +21 -0
- package/dist/graph/ProblemsButton.js +26 -16
- package/dist/graph/Reveal.js +1 -1
- package/dist/graph/RunWarningsList.js +21 -12
- package/dist/graph/ShortcutsButton.js +25 -8
- package/dist/graph/StepSummaries.js +1 -1
- package/dist/graph/TreeView.js +2 -2
- package/dist/graph/WorkflowSettingsDialog.js +3 -3
- package/dist/graph/editorApi.d.ts +10 -0
- package/dist/graph/editorFields.js +3 -3
- package/dist/graph/editorPrimitives.js +1 -1
- package/dist/graph/editorRows.js +8 -6
- package/dist/graph/editorStrings.d.ts +1 -0
- package/dist/graph/editorStrings.js +1 -0
- package/dist/graph/fieldProblems.js +2 -2
- package/dist/graph/inputRefs.js +7 -6
- package/dist/graph/runWarnings.d.ts +12 -1
- package/dist/graph/stepWith.js +2 -2
- package/dist/index.d.ts +30 -21
- package/dist/index.js +20 -12
- package/dist/list/ActionToolbar.d.ts +4 -0
- package/dist/list/ActionToolbar.js +35 -12
- package/dist/list/ListFilterBar.d.ts +42 -0
- package/dist/list/ListFilterBar.js +789 -0
- package/dist/list/ListPage.d.ts +42 -4
- package/dist/list/ListPage.js +56 -22
- package/dist/list/ListTable.d.ts +27 -3
- package/dist/list/ListTable.js +48 -23
- package/dist/list/ListToolbar.d.ts +31 -0
- package/dist/list/ListToolbar.js +43 -0
- package/dist/list/ListViewControls.d.ts +8 -4
- package/dist/list/ListViewControls.js +22 -14
- package/dist/list/UserHoverCard.d.ts +8 -2
- package/dist/list/UserHoverCard.js +26 -13
- package/dist/list/filterModel.d.ts +122 -0
- package/dist/list/filterModel.js +308 -0
- package/dist/list/index.d.ts +6 -2
- package/dist/list/index.js +6 -2
- package/dist/list/listSearch.d.ts +1 -1
- package/dist/list/listSearch.js +8 -4
- package/dist/list/listView.d.ts +24 -2
- package/dist/list/listView.js +47 -45
- package/dist/list/rowMenu.d.ts +10 -5
- package/dist/list/rowMenu.js +17 -7
- package/dist/list/useListFilters.d.ts +68 -0
- package/dist/list/useListFilters.js +252 -0
- package/dist/logviewer/LogViewer.js +4 -4
- package/dist/styles/theme.css +94 -0
- package/dist/styles.css +1 -1
- package/package.json +11 -11
- package/dist/assets/yaml.worker-k9AdOqzf.js +0 -1441
- package/dist/components/fullscreen.d.ts +0 -4
- package/dist/components/fullscreen.js +0 -18
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ListboxOption, ListboxPanel, useListboxNavigation } from "../../components/Listbox.js";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { useEffect, useId, useState } from "react";
|
|
5
4
|
//#region src/ai/components/SlashMenu.tsx
|
|
6
5
|
var MAX_SHOWN = 8;
|
|
7
6
|
var TYPING_NAME = /^\/([\w:-]*)$/;
|
|
@@ -16,8 +15,6 @@ function slashMatches(input, commands) {
|
|
|
16
15
|
* from a multi-line composer, so the textarea stays a textbox that points at the list:
|
|
17
16
|
* spread `inputProps` on it. */
|
|
18
17
|
function useSlashMenu(input, config, setInput) {
|
|
19
|
-
const listId = useId();
|
|
20
|
-
const [active, setActive] = useState(0);
|
|
21
18
|
const [dismissed, setDismissed] = useState(false);
|
|
22
19
|
const matches = config ? slashMatches(input, config.commands) : [];
|
|
23
20
|
const exact = matches.length === 1 && `/${matches[0]?.name}` === input;
|
|
@@ -27,80 +24,56 @@ function useSlashMenu(input, config, setInput) {
|
|
|
27
24
|
useEffect(() => {
|
|
28
25
|
if (startsCommand) onOpen?.();
|
|
29
26
|
}, [startsCommand, onOpen]);
|
|
27
|
+
const choose = (name) => setInput(`/${name} `);
|
|
28
|
+
const list = useListboxNavigation({
|
|
29
|
+
items: matches,
|
|
30
|
+
open,
|
|
31
|
+
onChoose: (command) => choose(command.name),
|
|
32
|
+
onDismiss: () => setDismissed(true)
|
|
33
|
+
});
|
|
30
34
|
const query = TYPING_NAME.exec(input)?.[1] ?? null;
|
|
31
35
|
const [shownQuery, setShownQuery] = useState(query);
|
|
32
36
|
if (query !== shownQuery) {
|
|
33
37
|
setShownQuery(query);
|
|
34
|
-
setActive(0);
|
|
38
|
+
list.setActive(0);
|
|
35
39
|
setDismissed(false);
|
|
36
40
|
}
|
|
37
|
-
const choose = (name) => setInput(`/${name} `);
|
|
38
|
-
const shown = Math.min(active, matches.length - 1);
|
|
39
41
|
/** True when the key belonged to the menu. */
|
|
40
|
-
const handleKey = (e) =>
|
|
41
|
-
if (!open) return false;
|
|
42
|
-
switch (e.key) {
|
|
43
|
-
case "ArrowDown":
|
|
44
|
-
setActive((i) => (i + 1) % matches.length);
|
|
45
|
-
break;
|
|
46
|
-
case "ArrowUp":
|
|
47
|
-
setActive((i) => (i - 1 + matches.length) % matches.length);
|
|
48
|
-
break;
|
|
49
|
-
case "Tab":
|
|
50
|
-
case "Enter": {
|
|
51
|
-
if (e.shiftKey) return false;
|
|
52
|
-
const pick = matches[shown];
|
|
53
|
-
if (!pick) return false;
|
|
54
|
-
choose(pick.name);
|
|
55
|
-
break;
|
|
56
|
-
}
|
|
57
|
-
case "Escape":
|
|
58
|
-
setDismissed(true);
|
|
59
|
-
break;
|
|
60
|
-
default: return false;
|
|
61
|
-
}
|
|
62
|
-
e.preventDefault();
|
|
63
|
-
return true;
|
|
64
|
-
};
|
|
42
|
+
const handleKey = (e) => list.handleKey(e);
|
|
65
43
|
return {
|
|
66
44
|
open,
|
|
67
45
|
matches,
|
|
68
|
-
active:
|
|
46
|
+
active: list.active,
|
|
69
47
|
choose,
|
|
70
48
|
handleKey,
|
|
71
|
-
listId,
|
|
72
|
-
inputProps:
|
|
73
|
-
|
|
74
|
-
"aria-controls": open ? listId : void 0,
|
|
75
|
-
"aria-activedescendant": open ? optionId(listId, shown) : void 0
|
|
76
|
-
}
|
|
49
|
+
listId: list.listId,
|
|
50
|
+
inputProps: list.hostProps,
|
|
51
|
+
list
|
|
77
52
|
};
|
|
78
53
|
}
|
|
79
|
-
|
|
80
|
-
function SlashMenu({ label, listId, matches, active, onChoose }) {
|
|
54
|
+
function SlashMenu({ label, menu, onChoose }) {
|
|
81
55
|
return /* @__PURE__ */ jsx("div", {
|
|
82
|
-
id: listId,
|
|
83
|
-
role: "listbox",
|
|
84
|
-
"aria-label": label,
|
|
85
56
|
"data-testid": "slash-menu",
|
|
86
|
-
className:
|
|
87
|
-
children:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
57
|
+
className: "absolute bottom-full left-0 right-0 z-20 mb-2",
|
|
58
|
+
children: /* @__PURE__ */ jsx(ListboxPanel, {
|
|
59
|
+
listProps: menu.list.listProps,
|
|
60
|
+
"aria-label": label,
|
|
61
|
+
children: menu.matches.map((c, i) => {
|
|
62
|
+
const option = menu.list.optionProps(i);
|
|
63
|
+
return /* @__PURE__ */ jsx(ListboxOption, {
|
|
64
|
+
option: {
|
|
65
|
+
...option,
|
|
66
|
+
onClick: () => onChoose(c.name)
|
|
67
|
+
},
|
|
68
|
+
inline: true,
|
|
69
|
+
label: /* @__PURE__ */ jsxs("span", {
|
|
70
|
+
className: "font-mono",
|
|
71
|
+
children: ["/", c.name]
|
|
72
|
+
}),
|
|
73
|
+
description: c.description
|
|
74
|
+
}, c.name);
|
|
75
|
+
})
|
|
76
|
+
})
|
|
104
77
|
});
|
|
105
78
|
}
|
|
106
79
|
//#endregion
|
|
@@ -4,8 +4,8 @@ import { Loader } from "../../../components/Loader.js";
|
|
|
4
4
|
import { formatCount, formatDuration } from "../../../format.js";
|
|
5
5
|
import { useElapsed } from "../../../components/relativeTime.js";
|
|
6
6
|
import { useChatConfig } from "../../core/config.js";
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
7
|
import { useEffect, useRef, useState } from "react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
//#region src/ai/components/agent/ActivityLine.tsx
|
|
10
10
|
function randomIndex() {
|
|
11
11
|
return Math.floor(Math.random() * 1e6);
|
|
@@ -17,14 +17,14 @@ import { useChatConfig } from "../../core/config.js";
|
|
|
17
17
|
import Markdown from "../../ui/Markdown.js";
|
|
18
18
|
import { chatProseClasses } from "../../ui/prose.js";
|
|
19
19
|
import { Reasoning, ReasoningBody } from "../Reasoning.js";
|
|
20
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
21
20
|
import { memo, useEffect, useId, useMemo, useState } from "react";
|
|
21
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
22
22
|
import { DateTime } from "luxon";
|
|
23
23
|
//#region src/ai/components/agent/AgentMessageParts.tsx
|
|
24
24
|
var COLLAPSED_RESULT_LINES = 12;
|
|
25
25
|
function LineSpans({ text, tokens, emphasis }) {
|
|
26
26
|
const pieces = tokens ?? [{ content: text }];
|
|
27
|
-
if (!emphasis || emphasis.length === 0) return /* @__PURE__ */ jsx(Fragment, { children: pieces.map((t, i) => /* @__PURE__ */ jsx("span", {
|
|
27
|
+
if (!emphasis || emphasis.length === 0) return /* @__PURE__ */ jsx(Fragment$1, { children: pieces.map((t, i) => /* @__PURE__ */ jsx("span", {
|
|
28
28
|
style: t.color ? { color: t.color } : void 0,
|
|
29
29
|
children: t.content
|
|
30
30
|
}, i)) });
|
|
@@ -47,7 +47,7 @@ function LineSpans({ text, tokens, emphasis }) {
|
|
|
47
47
|
}
|
|
48
48
|
offset += t.content.length;
|
|
49
49
|
}
|
|
50
|
-
return /* @__PURE__ */ jsx(Fragment, { children: out });
|
|
50
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children: out });
|
|
51
51
|
}
|
|
52
52
|
function DiffRows({ rows, lang }) {
|
|
53
53
|
const [tokens, setTokens] = useState(null);
|
|
@@ -188,7 +188,7 @@ function ResultBody({ part }) {
|
|
|
188
188
|
/** A status mark, which color alone tells apart, with its status in words for
|
|
189
189
|
* a screen reader. */
|
|
190
190
|
function StatusMark({ status, children }) {
|
|
191
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
191
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
|
|
192
192
|
"aria-hidden": "true",
|
|
193
193
|
className: "contents",
|
|
194
194
|
children
|
|
@@ -262,7 +262,7 @@ function ToolCallBlock({ part, children }) {
|
|
|
262
262
|
onOpenChange: setExpanded,
|
|
263
263
|
disabled: isDiff,
|
|
264
264
|
summaryClassName: rowSummaryClasses,
|
|
265
|
-
summary: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ToolStatusDot, { part }), /* @__PURE__ */ jsxs("span", {
|
|
265
|
+
summary: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(ToolStatusDot, { part }), /* @__PURE__ */ jsxs("span", {
|
|
266
266
|
className: "font-mono text-[13px] leading-5 min-w-0 truncate",
|
|
267
267
|
children: [/* @__PURE__ */ jsx("span", {
|
|
268
268
|
className: "font-semibold",
|
|
@@ -320,14 +320,14 @@ function DecisionLine({ decision }) {
|
|
|
320
320
|
className: "flex min-w-0 flex-wrap items-baseline gap-x-1",
|
|
321
321
|
children: [
|
|
322
322
|
/* @__PURE__ */ jsx("span", { children: decisionLabel(decision, strings.agentTranscript) }),
|
|
323
|
-
decision.at && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
323
|
+
decision.at && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
|
|
324
324
|
"aria-hidden": "true",
|
|
325
325
|
children: "·"
|
|
326
326
|
}), /* @__PURE__ */ jsx(RelativeTime, {
|
|
327
327
|
value: decision.at,
|
|
328
328
|
className: "shrink-0"
|
|
329
329
|
})] }),
|
|
330
|
-
decision.note && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
330
|
+
decision.note && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
|
|
331
331
|
"aria-hidden": "true",
|
|
332
332
|
children: "·"
|
|
333
333
|
}), /* @__PURE__ */ jsx("span", {
|
|
@@ -362,7 +362,7 @@ function SubagentCard({ part }) {
|
|
|
362
362
|
onOpenChange: setExpanded,
|
|
363
363
|
disabled: !canExpand,
|
|
364
364
|
summaryClassName: rowSummaryClasses,
|
|
365
|
-
summary: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(StatusMark, {
|
|
365
|
+
summary: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(StatusMark, {
|
|
366
366
|
status: part.status === "running" ? t.running : part.status === "failed" ? t.failed : t.done,
|
|
367
367
|
children: part.status === "running" ? /* @__PURE__ */ jsx("span", {
|
|
368
368
|
className: "mt-[3px]",
|
|
@@ -437,7 +437,7 @@ function ConfirmApproval({ part, onAnswer }) {
|
|
|
437
437
|
path: [t.allowPath, t.denyPath],
|
|
438
438
|
call: [t.allowCall, t.denyCall]
|
|
439
439
|
}[part.subject ?? "command"];
|
|
440
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
440
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
441
441
|
part.command && /* @__PURE__ */ jsx("pre", {
|
|
442
442
|
className: "overflow-x-auto rounded-md bg-(--theme-muted-panel-bg) p-2 font-mono text-xs whitespace-pre-wrap",
|
|
443
443
|
children: part.command
|
|
@@ -525,7 +525,7 @@ function AskApproval({ part, onAnswer }) {
|
|
|
525
525
|
kind: "ask",
|
|
526
526
|
text
|
|
527
527
|
});
|
|
528
|
-
if (!onAnswer) return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
528
|
+
if (!onAnswer) return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
529
529
|
part.question && /* @__PURE__ */ jsx("div", {
|
|
530
530
|
className: "text-sm",
|
|
531
531
|
children: part.question
|
|
@@ -542,7 +542,7 @@ function AskApproval({ part, onAnswer }) {
|
|
|
542
542
|
children: t.approvalPending
|
|
543
543
|
})
|
|
544
544
|
] });
|
|
545
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [part.question && /* @__PURE__ */ jsx("div", {
|
|
545
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [part.question && /* @__PURE__ */ jsx("div", {
|
|
546
546
|
className: "text-sm",
|
|
547
547
|
children: part.question
|
|
548
548
|
}), own === null ? /* @__PURE__ */ jsxs("div", {
|
|
@@ -617,7 +617,7 @@ function ApprovalBlock({ part, onApprovalAnswer }) {
|
|
|
617
617
|
function PlanApproval({ part }) {
|
|
618
618
|
const { strings } = useChatConfig();
|
|
619
619
|
const t = strings.agentTranscript;
|
|
620
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
|
|
620
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
|
|
621
621
|
className: "text-xs theme-muted-text",
|
|
622
622
|
children: t.planPending
|
|
623
623
|
}), part.plan && /* @__PURE__ */ jsx("div", {
|
|
@@ -877,7 +877,7 @@ function RollupGroup({ members, message }) {
|
|
|
877
877
|
children: /* @__PURE__ */ jsx(Disclosure, {
|
|
878
878
|
keepMounted: true,
|
|
879
879
|
summaryClassName: rowSummaryClasses,
|
|
880
|
-
summary: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
880
|
+
summary: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
|
|
881
881
|
className: "text-(--theme-success) leading-none",
|
|
882
882
|
"aria-hidden": "true",
|
|
883
883
|
children: "●"
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
import { useContextMenu } from "../../components/ContextMenu.js";
|
|
1
2
|
import { toast } from "../../components/Toast.js";
|
|
2
3
|
import { useStrings } from "../../components/Provider.js";
|
|
3
|
-
import { useContextMenu } from "../../components/ContextMenu.js";
|
|
4
4
|
import { useChatConfig } from "../core/config.js";
|
|
5
5
|
import { useChat } from "../core/ChatProvider.js";
|
|
6
6
|
import { useRowDialogs, useSessionMenu } from "../ui/sidebar.js";
|
|
7
7
|
import { conversationToMarkdown, downloadText, exportFilename } from "../core/exportConversation.js";
|
|
8
8
|
import ShareDialog from "./ShareDialog.js";
|
|
9
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
9
|
import { useState } from "react";
|
|
10
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { DateTime } from "luxon";
|
|
12
12
|
//#region src/ai/components/conversationActions.tsx
|
|
13
13
|
/** Conversations by how long ago they last changed, the time each row shows,
|
|
@@ -73,7 +73,7 @@ function useConversationActions() {
|
|
|
73
73
|
return {
|
|
74
74
|
menuItems,
|
|
75
75
|
openMenu,
|
|
76
|
-
overlays: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
76
|
+
overlays: /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
77
77
|
contextMenu,
|
|
78
78
|
dialogs,
|
|
79
79
|
sharing && /* @__PURE__ */ jsx(ShareDialog, {
|
|
@@ -6,8 +6,8 @@ import { ChatConfigProvider, resolveChatConfig } from "./config.js";
|
|
|
6
6
|
import { providerIssueFor } from "./providerIssues.js";
|
|
7
7
|
import { ReportSidebarPresentationContext, useControllable, useOwnSidebar } from "./sidebarState.js";
|
|
8
8
|
import { useSSEStream } from "./useSSEStream.js";
|
|
9
|
-
import { jsx } from "react/jsx-runtime";
|
|
10
9
|
import { createContext, useCallback, useContext, useEffect, useMemo, useReducer, useRef, useState } from "react";
|
|
10
|
+
import { jsx } from "react/jsx-runtime";
|
|
11
11
|
import { DateTime } from "luxon";
|
|
12
12
|
//#region src/ai/core/ChatProvider.tsx
|
|
13
13
|
function generateTitleFromMessage(content) {
|
package/dist/ai/core/config.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AppLink } from "../../components/AppLink.js";
|
|
2
2
|
import { defaultChatStrings } from "../strings.js";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
3
|
import { createContext, useContext } from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/ai/core/config.tsx
|
|
6
6
|
function hrefFor(target) {
|
|
7
7
|
switch (target.kind) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { cx } from "../../cx.js";
|
|
2
|
-
import { positionKeys } from "../../components/keys.js";
|
|
3
2
|
import { usePersistedState } from "../../components/Provider.js";
|
|
3
|
+
import { positionKeys } from "../../components/keys.js";
|
|
4
4
|
import { LoadingRegion, Skeleton } from "../../components/Skeleton.js";
|
|
5
5
|
import { useSplitter } from "../../components/splitter.js";
|
|
6
6
|
import { Drawer } from "../../components/Drawer.js";
|
|
7
7
|
import { SidebarGroupHeading, SidebarPanel, SidebarToggle } from "./sidebar.js";
|
|
8
|
+
import { Fragment, useEffect, useRef } from "react";
|
|
8
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
import { Fragment as Fragment$1, useEffect, useRef } from "react";
|
|
10
10
|
/** A conversation list's drawer on a layout too narrow to keep it beside the
|
|
11
11
|
* content: it covers the chat's own positioned container, not the window, and
|
|
12
12
|
* stays mounted so the list keeps its scroll and search between openings. */
|
|
@@ -101,7 +101,7 @@ function ConversationSidebar({ label, collapsed: collapsedProp, onToggle, toggle
|
|
|
101
101
|
children: group.label
|
|
102
102
|
}), /* @__PURE__ */ jsx("ul", {
|
|
103
103
|
className: "space-y-0.5",
|
|
104
|
-
children: group.items.map((item) => /* @__PURE__ */ jsx(Fragment
|
|
104
|
+
children: group.items.map((item) => /* @__PURE__ */ jsx(Fragment, { children: renderRow(item) }, getKey(item)))
|
|
105
105
|
})]
|
|
106
106
|
}, group.key))
|
|
107
107
|
}),
|
package/dist/ai/ui/sidebar.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { cx } from "../../cx.js";
|
|
2
|
+
import { EmptyState } from "../../components/EmptyState.js";
|
|
2
3
|
import { DownloadIcon, RenameIcon, ShareIcon, SidebarIcon, TrashIcon } from "../../icons.js";
|
|
3
4
|
import { Tooltip } from "../../components/Tooltip.js";
|
|
4
5
|
import { useStrings } from "../../components/Provider.js";
|
|
5
6
|
import { AppLink, isPlainClick } from "../../components/AppLink.js";
|
|
6
|
-
import { EmptyState } from "../../components/EmptyState.js";
|
|
7
7
|
import { menuDivider } from "../../components/MenuEntries.js";
|
|
8
8
|
import { IconButton } from "../../components/IconButton.js";
|
|
9
9
|
import { fieldBox } from "../../components/fieldBox.js";
|
|
10
10
|
import { focusOnMount } from "../../components/focus.js";
|
|
11
11
|
import { ConfirmModal } from "../../components/ConfirmModal.js";
|
|
12
12
|
import { MoreButton, rowContextMenuProps, useRowMenuActive } from "../../list/rowMenu.js";
|
|
13
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
14
13
|
import { useState } from "react";
|
|
14
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
15
15
|
//#region src/ai/ui/sidebar.tsx
|
|
16
16
|
var SIDEBAR_RAIL_WIDTH_PX = 48;
|
|
17
17
|
var HIGHLIGHT_SELECTED = "bg-[color-mix(in_oklab,var(--theme-accent)_12%,transparent)]";
|
|
@@ -214,7 +214,7 @@ function useRowDialogs({ strings, nameOf, onDelete, onRename }) {
|
|
|
214
214
|
setName(nameOf(item));
|
|
215
215
|
setToRename(item);
|
|
216
216
|
},
|
|
217
|
-
dialogs: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ConfirmModal, {
|
|
217
|
+
dialogs: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(ConfirmModal, {
|
|
218
218
|
open: toDelete !== null,
|
|
219
219
|
onClose: () => setToDelete(null),
|
|
220
220
|
align: "center",
|