@mcp-b/react-components 0.20.1 → 0.20.5
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/{CodeBlock-Bb-IPBc_.js → CodeBlock-ygtuzqJd.js} +1 -1
- package/dist/{FileTree-CUlXfnmc.js → FileTree-CdgfccsM.js} +5 -5
- package/dist/{Message-rZEaaD8Q.js → Message-DzuteocT.js} +4 -3
- package/dist/{ModelSelector-4GsCWcZV.js → ModelSelector-pecWyOFI.js} +4 -3
- package/dist/{WorkspaceFileView-CEdArlOT.js → WorkspaceFileView-Bxx4wEzJ.js} +5 -11
- package/dist/components/Accordion.js +4 -4
- package/dist/components/Activity.js +2 -2
- package/dist/components/AgentActivity.js +1 -1
- package/dist/components/AgentActivityPreview.js +1 -1
- package/dist/components/AgentAttention.js +2 -2
- package/dist/components/AgentChat.js +4 -4
- package/dist/components/AgentConnection.js +2 -2
- package/dist/components/AgentMessageParts.js +1 -1
- package/dist/components/AgentToolDetail.js +1 -1
- package/dist/components/AlertDialog.js +8 -8
- package/dist/components/AppTopBar.js +1 -1
- package/dist/components/Approval.js +1 -1
- package/dist/components/Artifact.js +1 -1
- package/dist/components/Autocomplete.js +11 -11
- package/dist/components/Avatar.js +6 -6
- package/dist/components/BrowserLiveView.js +2 -2
- package/dist/components/BrowserReplay.js +4 -7
- package/dist/components/BrowserRunPanel.js +2 -2
- package/dist/components/Card.js +8 -11
- package/dist/components/ChainOfThought.js +2 -2
- package/dist/components/ChatGptSignInScreen.js +2 -2
- package/dist/components/Checkbox.js +2 -2
- package/dist/components/CheckboxGroup.js +7 -7
- package/dist/components/Checkpoint.js +1 -1
- package/dist/components/CodeBlock.js +1 -1
- package/dist/components/CodexModelSelector.js +5 -4
- package/dist/components/Collapsible.js +2 -2
- package/dist/components/Combobox.js +11 -11
- package/dist/components/Commit.js +4 -4
- package/dist/components/Context.js +3 -1
- package/dist/components/ContextMenu.js +13 -13
- package/dist/components/Conversation.js +3 -8
- package/dist/components/Dialog.js +6 -6
- package/dist/components/EnvironmentVariables.js +3 -3
- package/dist/components/Field.js +7 -7
- package/dist/components/Fieldset.js +3 -3
- package/dist/components/FileTree.js +1 -1
- package/dist/components/Form.js +1 -1
- package/dist/components/InlineCitation.js +2 -2
- package/dist/components/Input.js +1 -1
- package/dist/components/Label.js +2 -1
- package/dist/components/McpConnectionRequest.js +1 -1
- package/dist/components/McpServerPicker.js +3 -3
- package/dist/components/MediaPreviewCard.js +5 -4
- package/dist/components/Menu.js +17 -17
- package/dist/components/Menubar.js +14 -14
- package/dist/components/Message.js +1 -1
- package/dist/components/MessageScroller.js +2 -1
- package/dist/components/Meter.js +5 -5
- package/dist/components/ModelSelector.js +1 -1
- package/dist/components/NaniteScene.js +2 -1
- package/dist/components/NavigationMenu.js +11 -11
- package/dist/components/NumberField.js +6 -6
- package/dist/components/Plan.js +1 -1
- package/dist/components/Popover.js +12 -14
- package/dist/components/PreviewCard.js +6 -6
- package/dist/components/PricingPage.js +2 -1
- package/dist/components/PricingPlanCard.js +1 -1
- package/dist/components/Progress.js +4 -4
- package/dist/components/PromptInput.js +10 -12
- package/dist/components/Queue.js +1 -1
- package/dist/components/RadioGroup.js +4 -4
- package/dist/components/Reasoning.js +2 -2
- package/dist/components/ResizableSidePanel.js +3 -5
- package/dist/components/ResponsiveSidebarShell.js +4 -3
- package/dist/components/ScrollArea.js +6 -6
- package/dist/components/SearchField.js +1 -1
- package/dist/components/Select.js +15 -15
- package/dist/components/Slider.js +7 -7
- package/dist/components/Sources.js +2 -2
- package/dist/components/Stepper.js +2 -6
- package/dist/components/SubagentRunDetails.js +2 -1
- package/dist/components/SubagentRunIndicator.js +1 -1
- package/dist/components/SubagentRunSelector.js +1 -1
- package/dist/components/Switch.js +3 -3
- package/dist/components/Tabs.js +2 -2
- package/dist/components/Task.js +2 -2
- package/dist/components/Terminal.js +2 -2
- package/dist/components/TestResults.js +18 -18
- package/dist/components/ThemeModeControl.js +1 -1
- package/dist/components/ThinkChatActivity.js +2 -1
- package/dist/components/ThinkChatActivitySummary.js +14 -5
- package/dist/components/ThinkChatToolPanels.js +1 -1
- package/dist/components/ThinkExecutionDetail.js +1 -1
- package/dist/components/ThinkExecutionRun.js +2 -2
- package/dist/components/ThinkExecutionStatus.js +1 -1
- package/dist/components/ThinkExecutionWorkbench.js +2 -2
- package/dist/components/ThinkFullApp.js +4 -74
- package/dist/components/ThinkPendingApproval.js +1 -3
- package/dist/components/ThinkRoutine.d.ts +1 -1
- package/dist/components/ThinkRoutine.js +3 -10
- package/dist/components/ThinkRoutineBrowser.js +9 -9
- package/dist/components/ThinkRoutineDetail.js +1 -1
- package/dist/components/ThinkRoutineForm.js +1 -1
- package/dist/components/ThinkRoutineLibrary.js +1 -1
- package/dist/components/ThinkThreadPicker.js +4 -3
- package/dist/components/ThinkThreadShell.js +2 -1
- package/dist/components/Toast.js +6 -6
- package/dist/components/ToggleGroup.js +2 -2
- package/dist/components/Tooltip.js +4 -4
- package/dist/components/WebPreview.js +1 -1
- package/dist/components/WorkspaceBrowser.js +1 -1
- package/dist/components/WorkspaceExplorer.js +2 -2
- package/dist/components/WorkspaceFileView.js +1 -1
- package/dist/components/WorkspaceHeader.js +1 -1
- package/dist/components/icons.js +1 -1
- package/dist/{copy-button-BtRwhRks.js → copy-button-vo1paUSi.js} +1 -1
- package/dist/format-S6uWyoSb.js +38 -0
- package/dist/{icons-DKXiSepE.js → icons-DyOM0EJs.js} +2 -1
- package/dist/{merge-refs-KlanQB7A.js → merge-refs-DF_7w2x_.js} +1 -1
- package/dist/styles/accordion.css +2 -1
- package/dist/styles/activity-header.css +4 -18
- package/dist/styles/activity.css +1 -1
- package/dist/styles/agent-activity-preview-overlay.css +12 -0
- package/dist/styles/agent-activity-preview.css +3 -3
- package/dist/styles/agent-attention.css +7 -21
- package/dist/styles/agent-connection.css +3 -3
- package/dist/styles/app-top-bar.css +2 -5
- package/dist/styles/artifact.css +1 -1
- package/dist/styles/attachment-preview.css +1 -1
- package/dist/styles/badge.css +1 -1
- package/dist/styles/base.css +15 -0
- package/dist/styles/browser-control-overlay.css +4 -3
- package/dist/styles/browser-live-view.css +2 -11
- package/dist/styles/browser-replay.css +3 -3
- package/dist/styles/browser-run-panel.css +3 -12
- package/dist/styles/button.css +1 -1
- package/dist/styles/chain-of-thought.css +3 -15
- package/dist/styles/chatgpt-sign-in-screen.css +2 -2
- package/dist/styles/checkbox-group.css +1 -7
- package/dist/styles/code-block.css +5 -5
- package/dist/styles/codex-model-selector.css +0 -6
- package/dist/styles/commit.css +2 -8
- package/dist/styles/environment-variables.css +4 -7
- package/dist/styles/fieldset.css +1 -1
- package/dist/styles/file-tree.css +2 -2
- package/dist/styles/github-motion-mark.css +1 -1
- package/dist/styles/inline-citation.css +1 -4
- package/dist/styles/label.css +1 -1
- package/dist/styles/mcp-server-picker.css +1 -4
- package/dist/styles/menu.css +1 -1
- package/dist/styles/message-scroller.css +3 -21
- package/dist/styles/message.css +1 -7
- package/dist/styles/model-selector.css +1 -1
- package/dist/styles/plan.css +1 -1
- package/dist/styles/pricing-page.css +37 -35
- package/dist/styles/prompt-input.css +4 -35
- package/dist/styles/queue.css +2 -2
- package/dist/styles/recipes.css +26 -2
- package/dist/styles/sources.css +2 -5
- package/dist/styles/stepper.css +1 -7
- package/dist/styles/streamdown.css +28 -25
- package/dist/styles/subagent-run.css +0 -3
- package/dist/styles/task.css +2 -2
- package/dist/styles/terminal.css +4 -4
- package/dist/styles/test-results.css +3 -18
- package/dist/styles/theme-mode-control.css +3 -4
- package/dist/styles/think-execution-status.css +1 -7
- package/dist/styles/think-execution-workbench.css +1 -4
- package/dist/styles/think-full-app.css +1 -4
- package/dist/styles/think-routine-library.css +8 -8
- package/dist/styles/think-thread-picker.css +14 -36
- package/dist/styles/toggle-group.css +1 -1
- package/dist/styles/utilities.css +6 -2
- package/dist/styles/web-preview.css +4 -4
- package/dist/styles/workspace-explorer.css +3 -3
- package/dist/view-transitions-DyUP0lSg.js +77 -0
- package/package.json +2 -2
|
@@ -35,7 +35,7 @@ import { Slider as Slider$1 } from "@base-ui/react/slider";
|
|
|
35
35
|
* @see {@link https://base-ui.com/react/components/slider | Base UI Slider}
|
|
36
36
|
*/
|
|
37
37
|
function SliderRoot({ className, ref, ...props }) {
|
|
38
|
-
const classes = mergeBaseClassName(
|
|
38
|
+
const classes = mergeBaseClassName("slider", className);
|
|
39
39
|
return /* @__PURE__ */ jsx(Slider$1.Root, {
|
|
40
40
|
ref,
|
|
41
41
|
"data-slot": "slider",
|
|
@@ -47,7 +47,7 @@ function SliderRoot({ className, ref, ...props }) {
|
|
|
47
47
|
* The control area for the Slider (handles interactions).
|
|
48
48
|
*/
|
|
49
49
|
function SliderControl({ className, ref, ...props }) {
|
|
50
|
-
const classes = mergeBaseClassName(
|
|
50
|
+
const classes = mergeBaseClassName("slider__control", className);
|
|
51
51
|
return /* @__PURE__ */ jsx(Slider$1.Control, {
|
|
52
52
|
ref,
|
|
53
53
|
"data-slot": "slider-control",
|
|
@@ -59,7 +59,7 @@ function SliderControl({ className, ref, ...props }) {
|
|
|
59
59
|
* The track container for the Slider.
|
|
60
60
|
*/
|
|
61
61
|
function SliderTrack({ className, ref, ...props }) {
|
|
62
|
-
const classes = mergeBaseClassName(
|
|
62
|
+
const classes = mergeBaseClassName("slider__track", className);
|
|
63
63
|
return /* @__PURE__ */ jsx(Slider$1.Track, {
|
|
64
64
|
ref,
|
|
65
65
|
"data-slot": "slider-track",
|
|
@@ -71,7 +71,7 @@ function SliderTrack({ className, ref, ...props }) {
|
|
|
71
71
|
* The filled indicator showing current value position.
|
|
72
72
|
*/
|
|
73
73
|
function SliderIndicator({ className, ref, ...props }) {
|
|
74
|
-
const classes = mergeBaseClassName(
|
|
74
|
+
const classes = mergeBaseClassName("slider__indicator", className);
|
|
75
75
|
return /* @__PURE__ */ jsx(Slider$1.Indicator, {
|
|
76
76
|
ref,
|
|
77
77
|
"data-slot": "slider-range",
|
|
@@ -83,7 +83,7 @@ function SliderIndicator({ className, ref, ...props }) {
|
|
|
83
83
|
* The draggable thumb for the Slider.
|
|
84
84
|
*/
|
|
85
85
|
function SliderThumb({ className, ref, ...props }) {
|
|
86
|
-
const classes = mergeBaseClassName(
|
|
86
|
+
const classes = mergeBaseClassName("slider__thumb", className);
|
|
87
87
|
return /* @__PURE__ */ jsx(Slider$1.Thumb, {
|
|
88
88
|
ref,
|
|
89
89
|
"data-slot": "slider-thumb",
|
|
@@ -96,7 +96,7 @@ function SliderThumb({ className, ref, ...props }) {
|
|
|
96
96
|
* Note: This must be used inside a Slider component to access the value context.
|
|
97
97
|
*/
|
|
98
98
|
function SliderOutput({ className, children, ref, ...props }) {
|
|
99
|
-
const classes = mergeBaseClassName(
|
|
99
|
+
const classes = mergeBaseClassName("slider__output", className);
|
|
100
100
|
return /* @__PURE__ */ jsx(Slider$1.Value, {
|
|
101
101
|
ref,
|
|
102
102
|
"data-slot": "slider-output",
|
|
@@ -107,7 +107,7 @@ function SliderOutput({ className, children, ref, ...props }) {
|
|
|
107
107
|
}
|
|
108
108
|
/** Visible label that participates in Base UI's slider naming relationship. */
|
|
109
109
|
function SliderLabel({ className, ref, ...props }) {
|
|
110
|
-
const classes = mergeBaseClassName(
|
|
110
|
+
const classes = mergeBaseClassName("slider__label", className);
|
|
111
111
|
return /* @__PURE__ */ jsx(Slider$1.Label, {
|
|
112
112
|
ref,
|
|
113
113
|
"data-slot": "slider-label",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
2
|
import { Collapsible } from "./Collapsible.js";
|
|
3
|
-
import { O as LinkIcon, p as ChevronRightIcon } from "../icons-
|
|
3
|
+
import { O as LinkIcon, p as ChevronRightIcon } from "../icons-DyOM0EJs.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/Sources.tsx
|
|
@@ -98,7 +98,7 @@ function Source({ title, description, children, className, href, ref, ...props }
|
|
|
98
98
|
className: "sources__link-body",
|
|
99
99
|
children: [
|
|
100
100
|
title ? /* @__PURE__ */ jsx("span", {
|
|
101
|
-
className: "sources__link-title",
|
|
101
|
+
className: "sources__link-title sigvelo-truncate",
|
|
102
102
|
children: title
|
|
103
103
|
}) : null,
|
|
104
104
|
description ? /* @__PURE__ */ jsx("span", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as mergeBaseClassName, t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
|
-
import { K as SpinnerIcon, u as CheckIcon } from "../icons-
|
|
2
|
+
import { K as SpinnerIcon, u as CheckIcon } from "../icons-DyOM0EJs.js";
|
|
3
3
|
import { Tabs } from "./Tabs.js";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -71,13 +71,12 @@ function Stepper({ defaultValue = 1, value, onValueChange, orientation = "horizo
|
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
function StepperNav({ className, ref, ...props }) {
|
|
74
|
-
const { activeStep
|
|
74
|
+
const { activeStep } = useStepper();
|
|
75
75
|
return /* @__PURE__ */ jsx(Tabs.List, {
|
|
76
76
|
ref,
|
|
77
77
|
className: mergeBaseClassName("stepper__nav", className),
|
|
78
78
|
"data-active-step": activeStep,
|
|
79
79
|
"data-slot": "stepper-list",
|
|
80
|
-
"data-orientation": orientation,
|
|
81
80
|
unstyled: true,
|
|
82
81
|
...props
|
|
83
82
|
});
|
|
@@ -191,8 +190,6 @@ function StepperPanel({ className, ref, ...props }) {
|
|
|
191
190
|
});
|
|
192
191
|
}
|
|
193
192
|
function StepperContent({ value, forceMount = false, spacing = "none", className, children, ref, ...props }) {
|
|
194
|
-
const { activeStep } = useStepper();
|
|
195
|
-
const isActive = activeStep === value;
|
|
196
193
|
return /* @__PURE__ */ jsx(Tabs.Panel, {
|
|
197
194
|
ref,
|
|
198
195
|
value,
|
|
@@ -200,7 +197,6 @@ function StepperContent({ value, forceMount = false, spacing = "none", className
|
|
|
200
197
|
className: mergeBaseClassName("stepper__content", className),
|
|
201
198
|
"data-spacing": spacing,
|
|
202
199
|
"data-slot": "stepper-content",
|
|
203
|
-
"data-state": isActive ? "active" : "inactive",
|
|
204
200
|
unstyled: true,
|
|
205
201
|
...props,
|
|
206
202
|
children
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
|
+
import { n as clamp } from "../format-S6uWyoSb.js";
|
|
2
3
|
import { Progress } from "./Progress.js";
|
|
3
4
|
import * as React from "react";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
//#region src/components/SubagentRunDetails.tsx
|
|
6
7
|
function SubagentRunProgress({ className, label, value, ref, ...props }) {
|
|
7
8
|
const labelId = React.useId();
|
|
8
|
-
const percent = value === void 0 ? null : Math.round(
|
|
9
|
+
const percent = value === void 0 ? null : Math.round(clamp(value, 0, 1) * 100);
|
|
9
10
|
return /* @__PURE__ */ jsxs("div", {
|
|
10
11
|
ref,
|
|
11
12
|
className: cx("subagent-run__progress", className),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
|
-
import { J as StopIcon, K as SpinnerIcon, Q as WarningIcon, u as CheckIcon } from "../icons-
|
|
2
|
+
import { J as StopIcon, K as SpinnerIcon, Q as WarningIcon, u as CheckIcon } from "../icons-DyOM0EJs.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/SubagentRunIndicator.tsx
|
|
@@ -32,7 +32,7 @@ function SubagentRunSelector({ className, render, run, tooltip, ref, "aria-label
|
|
|
32
32
|
children: [
|
|
33
33
|
/* @__PURE__ */ jsx(NaniteMark, { index: run.order }),
|
|
34
34
|
/* @__PURE__ */ jsx("span", {
|
|
35
|
-
className: "subagent-run__title",
|
|
35
|
+
className: "subagent-run__title sigvelo-truncate",
|
|
36
36
|
children: name
|
|
37
37
|
}),
|
|
38
38
|
/* @__PURE__ */ jsx(SubagentRunIndicator, { run })
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as mergeBaseClassName } from "../class-names-BiMDVpUo.js";
|
|
1
|
+
import { n as mergeBaseClassName, t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { Switch as Switch$1 } from "@base-ui/react/switch";
|
|
@@ -25,7 +25,7 @@ import { Switch as Switch$1 } from "@base-ui/react/switch";
|
|
|
25
25
|
* @see {@link https://base-ui.com/react/components/switch | Base UI Switch}
|
|
26
26
|
*/
|
|
27
27
|
function SwitchRoot({ size = "md", className, ref, ...props }) {
|
|
28
|
-
const classes = mergeBaseClassName(
|
|
28
|
+
const classes = mergeBaseClassName(cx("switch", size !== "md" && `switch--${size}`), className);
|
|
29
29
|
return /* @__PURE__ */ jsx(Switch$1.Root, {
|
|
30
30
|
ref,
|
|
31
31
|
"data-slot": "switch",
|
|
@@ -38,7 +38,7 @@ function SwitchRoot({ size = "md", className, ref, ...props }) {
|
|
|
38
38
|
* The thumb indicator for the Switch component.
|
|
39
39
|
*/
|
|
40
40
|
function SwitchThumb({ className, ref, ...props }) {
|
|
41
|
-
const classes = mergeBaseClassName(
|
|
41
|
+
const classes = mergeBaseClassName("switch__thumb", className);
|
|
42
42
|
return /* @__PURE__ */ jsx(Switch$1.Thumb, {
|
|
43
43
|
ref,
|
|
44
44
|
"data-slot": "switch-thumb",
|
package/dist/components/Tabs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as mergeBaseClassName } from "../class-names-BiMDVpUo.js";
|
|
1
|
+
import { n as mergeBaseClassName, t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { Tabs as Tabs$1 } from "@base-ui/react/tabs";
|
|
@@ -28,7 +28,7 @@ function tabsListVariants({ variant = "default", className } = {}) {
|
|
|
28
28
|
* @see {@link https://base-ui.com/react/components/tabs | Base UI Tabs}
|
|
29
29
|
*/
|
|
30
30
|
function TabsRoot({ orientation = "horizontal", variant = "default", className, unstyled = false, ref, ...props }) {
|
|
31
|
-
const classes = unstyled ? className : mergeBaseClassName(
|
|
31
|
+
const classes = unstyled ? className : mergeBaseClassName(cx("tabs", variant !== "default" && `tabs--${variant}`), className);
|
|
32
32
|
return /* @__PURE__ */ jsx(Tabs$1.Root, {
|
|
33
33
|
ref,
|
|
34
34
|
"data-slot": "tabs",
|
package/dist/components/Task.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
2
|
import { Collapsible } from "./Collapsible.js";
|
|
3
|
-
import { S as FileIcon, W as SearchIcon, p as ChevronRightIcon } from "../icons-
|
|
3
|
+
import { S as FileIcon, W as SearchIcon, p as ChevronRightIcon } from "../icons-DyOM0EJs.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/Task.tsx
|
|
@@ -62,7 +62,7 @@ function TaskTrigger({ className, title, children, ref, ...props }) {
|
|
|
62
62
|
children: /* @__PURE__ */ jsx(SearchIcon, {})
|
|
63
63
|
}),
|
|
64
64
|
/* @__PURE__ */ jsx("span", {
|
|
65
|
-
className: "task__trigger-title sigvelo-truncate",
|
|
65
|
+
className: "task__trigger-title sigvelo-truncate sigvelo-truncate-grow",
|
|
66
66
|
children: title
|
|
67
67
|
}),
|
|
68
68
|
/* @__PURE__ */ jsx("span", {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
|
-
import { X as TerminalIcon, et as XIcon } from "../icons-
|
|
2
|
+
import { X as TerminalIcon, et as XIcon } from "../icons-DyOM0EJs.js";
|
|
3
3
|
import { Button } from "./Button.js";
|
|
4
4
|
import { Tooltip } from "./Tooltip.js";
|
|
5
|
-
import { t as CopyButton } from "../copy-button-
|
|
5
|
+
import { t as CopyButton } from "../copy-button-vo1paUSi.js";
|
|
6
6
|
import { Badge } from "./Badge.js";
|
|
7
7
|
import { ScrollArea } from "./ScrollArea.js";
|
|
8
8
|
import * as React from "react";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
2
|
import { Collapsible } from "./Collapsible.js";
|
|
3
|
-
import { K as SpinnerIcon, et as XIcon, p as ChevronRightIcon, u as CheckIcon } from "../icons-
|
|
3
|
+
import { K as SpinnerIcon, et as XIcon, p as ChevronRightIcon, u as CheckIcon } from "../icons-DyOM0EJs.js";
|
|
4
|
+
import { Progress } from "./Progress.js";
|
|
4
5
|
import { Badge } from "./Badge.js";
|
|
5
6
|
import * as React from "react";
|
|
6
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -122,22 +123,21 @@ function TestResultsProgress({ className, children, ref, ...props }) {
|
|
|
122
123
|
ref,
|
|
123
124
|
className: cx("test-results__progress", className),
|
|
124
125
|
...props,
|
|
125
|
-
children: [/* @__PURE__ */
|
|
126
|
+
children: [/* @__PURE__ */ jsx(Progress.Root, {
|
|
126
127
|
"aria-label": "Test progress",
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
})]
|
|
128
|
+
value: summary.passed,
|
|
129
|
+
max: summary.total,
|
|
130
|
+
getAriaValueText: () => `${summary.passed}/${summary.total} tests passed, ${summary.failed} failed`,
|
|
131
|
+
children: /* @__PURE__ */ jsxs(Progress.Track, {
|
|
132
|
+
className: "test-results__progress-track",
|
|
133
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
134
|
+
className: "test-results__progress-segment test-results__progress-segment--passed",
|
|
135
|
+
style: { inlineSize: `${passedPercent}%` }
|
|
136
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
137
|
+
className: "test-results__progress-segment test-results__progress-segment--failed",
|
|
138
|
+
style: { inlineSize: `${failedPercent}%` }
|
|
139
|
+
})]
|
|
140
|
+
})
|
|
141
141
|
}), /* @__PURE__ */ jsxs("span", {
|
|
142
142
|
className: "test-results__progress-label",
|
|
143
143
|
children: [
|
|
@@ -207,7 +207,7 @@ function TestSuiteName({ className, children, ref, ...props }) {
|
|
|
207
207
|
children: STATUS_LABEL[status]
|
|
208
208
|
}),
|
|
209
209
|
/* @__PURE__ */ jsx("span", {
|
|
210
|
-
className: "test-results__suite-name",
|
|
210
|
+
className: "test-results__suite-name sigvelo-truncate",
|
|
211
211
|
children: children ?? name
|
|
212
212
|
})
|
|
213
213
|
]
|
|
@@ -299,7 +299,7 @@ function TestName({ className, children, ref, ...props }) {
|
|
|
299
299
|
const { name } = React.useContext(TestContext);
|
|
300
300
|
return /* @__PURE__ */ jsx("span", {
|
|
301
301
|
ref,
|
|
302
|
-
className: cx("test-results__test-name", className),
|
|
302
|
+
className: cx("test-results__test-name", "sigvelo-truncate", className),
|
|
303
303
|
...props,
|
|
304
304
|
children: children ?? name
|
|
305
305
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as MoonIcon, P as MonitorIcon, Y as SunIcon } from "../icons-
|
|
1
|
+
import { F as MoonIcon, P as MonitorIcon, Y as SunIcon } from "../icons-DyOM0EJs.js";
|
|
2
2
|
import { Radio, RadioGroup } from "./RadioGroup.js";
|
|
3
3
|
import { useTheme } from "./ThemeProvider.js";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Activity, ActivityContent, ActivityItem, ActivityItemGroup, ActivityText, ActivityTrigger } from "./Activity.js";
|
|
2
2
|
import { AgentActivityFavicon, AgentActivityIcon } from "./AgentActivity.js";
|
|
3
|
+
import { f as MessageResponse } from "../Message-DzuteocT.js";
|
|
3
4
|
import { isBrowserToolPart, isExecuteToolPart, isFetchToolPart, isPartWorking, isSessionContextToolPart, isSkillToolPart, isThinkChatActivityPart, isWorkspaceToolPart } from "./ThinkChatToolParts.js";
|
|
4
5
|
import { useOptionalAgentToolRuns } from "./AgentToolRunsContext.js";
|
|
5
6
|
import { SubagentRunList } from "./SubagentRunList.js";
|
|
@@ -68,7 +69,7 @@ function ThinkChatActivityStep({ text, part, toolRenderers }) {
|
|
|
68
69
|
if (isReasoningUIPart(part) && part.text.trim()) return /* @__PURE__ */ jsx(ActivityItemGroup, {
|
|
69
70
|
label: text,
|
|
70
71
|
icon,
|
|
71
|
-
children: /* @__PURE__ */ jsx(ActivityText, { children: part.text })
|
|
72
|
+
children: /* @__PURE__ */ jsx(ActivityText, { children: /* @__PURE__ */ jsx(MessageResponse, { children: part.text }) })
|
|
72
73
|
});
|
|
73
74
|
if (isWorkspaceToolPart(part) && part.type !== "tool-delete") return /* @__PURE__ */ jsx(ActivityItemGroup, {
|
|
74
75
|
label: text,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t as capitalize } from "../format-S6uWyoSb.js";
|
|
1
2
|
import { displayUrl, getToolDisplayName, isBrowserToolPart, isExecuteToolPart, isFetchToolPart, isPartFailed, isPartWorking, isSessionContextToolFailure, isSessionContextToolPart, isSkillToolPart, isWorkspaceToolPart } from "./ThinkChatToolParts.js";
|
|
2
3
|
import { t as summarizeToolInput } from "../summarize-tool-input-CqTcGRYy.js";
|
|
3
4
|
import { getToolName, isReasoningUIPart, isToolUIPart } from "ai";
|
|
@@ -161,9 +162,9 @@ function describeThinkChatActivityPart(part, toolRenderers) {
|
|
|
161
162
|
if (custom !== void 0) return custom;
|
|
162
163
|
}
|
|
163
164
|
if (isReasoningUIPart(part)) {
|
|
164
|
-
const snippet =
|
|
165
|
+
const snippet = summarizeReasoningTitle(part.text);
|
|
165
166
|
const label = part.state === "streaming" ? "Thinking…" : "Thought";
|
|
166
|
-
return snippet
|
|
167
|
+
return snippet ?? label;
|
|
167
168
|
}
|
|
168
169
|
if (isWorkspaceToolPart(part)) return describeWorkspaceToolPart(part);
|
|
169
170
|
if (isSkillToolPart(part)) return describeSkillToolPart(part);
|
|
@@ -256,12 +257,21 @@ function describeBrowserToolPart(part) {
|
|
|
256
257
|
}
|
|
257
258
|
function describeExecuteToolPart(part) {
|
|
258
259
|
const output = part.state === "output-available" ? part.output : void 0;
|
|
259
|
-
if (isPartFailed(part) || output?.status === "error") return "Code failed";
|
|
260
260
|
if (output?.status === "paused") return isHumanWaitPause(output) ? "Code waiting for human" : "Code waiting for approval";
|
|
261
|
+
const explicitSummary = part.input ? Reflect.get(part.input, "summary") : void 0;
|
|
262
|
+
const summary = typeof explicitSummary === "string" ? summarizeToolInput({ summary: explicitSummary }) : null;
|
|
263
|
+
if (summary) return summary;
|
|
264
|
+
if (isPartFailed(part) || output?.status === "error") return "Code failed";
|
|
261
265
|
const label = isPartWorking(part) ? "Running code" : "Ran code";
|
|
262
266
|
const snippet = summarizeToolInput(part.input);
|
|
263
267
|
return snippet ? `${label} · ${snippet}` : label;
|
|
264
268
|
}
|
|
269
|
+
function summarizeReasoningTitle(text) {
|
|
270
|
+
const line = text.split("\n").find((candidate) => candidate.trim())?.trim();
|
|
271
|
+
if (!line) return null;
|
|
272
|
+
const title = line.replace(/^#{1,6}(?:\s+|$)/, "").replace(/(?:\s+|^)#{1,6}$/, "").replace(/^(?:\*\*|__)/, "").replace(/(?:\*\*|__)$/, "").trim();
|
|
273
|
+
return /^[#*_]*$/.test(title) ? null : summarizeToolInput({ summary: title });
|
|
274
|
+
}
|
|
265
275
|
function isHumanWaitPause(output) {
|
|
266
276
|
const pending = output.pending ?? [];
|
|
267
277
|
return pending.length > 0 && pending.every((action) => action.connector === "human" && action.method === "waitFor");
|
|
@@ -330,8 +340,7 @@ function summarizeActivitySteps(parts) {
|
|
|
330
340
|
for (const segment of genericSegments) if (!includedSegments.has(segment)) segments.push(segment);
|
|
331
341
|
if (segments.length === 0) return "Worked";
|
|
332
342
|
const top = segments.slice(0, 3);
|
|
333
|
-
|
|
334
|
-
return joined.charAt(0).toUpperCase() + joined.slice(1);
|
|
343
|
+
return capitalize(top.length === 1 ? top[0] : `${top.slice(0, -1).join(", ")} and ${top.at(-1)}`);
|
|
335
344
|
}
|
|
336
345
|
/** Derive the serializable collapsed header from persisted AI SDK message parts. */
|
|
337
346
|
function deriveThinkChatActivityHeader(parts, options = {}) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ActivityOutput, ActivityPanel } from "./Activity.js";
|
|
2
2
|
import { displayUrl, isSessionContextToolFailure } from "./ThinkChatToolParts.js";
|
|
3
3
|
import { Tabs } from "./Tabs.js";
|
|
4
|
-
import { t as CodeBlock } from "../CodeBlock-
|
|
4
|
+
import { t as CodeBlock } from "../CodeBlock-ygtuzqJd.js";
|
|
5
5
|
import { BrowserLiveView } from "./BrowserLiveView.js";
|
|
6
6
|
import { inferWorkspaceLanguage } from "./WorkspaceFile.js";
|
|
7
7
|
import * as React from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
|
-
import { D as InfoIcon, S as FileIcon, U as RefreshIcon, X as TerminalIcon, et as XIcon, n as ArrowDownIcon, u as CheckIcon } from "../icons-
|
|
2
|
+
import { D as InfoIcon, S as FileIcon, U as RefreshIcon, X as TerminalIcon, et as XIcon, n as ArrowDownIcon, u as CheckIcon } from "../icons-DyOM0EJs.js";
|
|
3
3
|
import { Activity, ActivityContent, ActivityItem, ActivityItemGroup, ActivityOutput, ActivityPanel, ActivityTrigger } from "./Activity.js";
|
|
4
4
|
import { formatThinkExecutionRunProgress, formatThinkExecutionStatus, formatThinkExecutionTimestamp, getThinkExecutionRunError, getThinkExecutionRunId, getThinkExecutionRunProgressedAt, getThinkExecutionRunProgressedLabel, getThinkExecutionRunStatus, getThinkExecutionRunTitle, isThinkSubmissionRun } from "./ThinkExecutionRun.js";
|
|
5
5
|
import { ThinkExecutionStatus } from "./ThinkExecutionStatus.js";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t as capitalize } from "../format-S6uWyoSb.js";
|
|
1
2
|
//#region src/components/ThinkExecutionRun.ts
|
|
2
3
|
/** Narrows the direct upstream execution union without wrapping either record. */
|
|
3
4
|
function isThinkSubmissionRun(run) {
|
|
@@ -35,8 +36,7 @@ function getThinkExecutionRunStatusTone(run) {
|
|
|
35
36
|
return "neutral";
|
|
36
37
|
}
|
|
37
38
|
function formatThinkExecutionStatus(status) {
|
|
38
|
-
|
|
39
|
-
return words.charAt(0).toUpperCase() + words.slice(1);
|
|
39
|
+
return capitalize(status.replaceAll(/([a-z])([A-Z])/g, "$1 $2"));
|
|
40
40
|
}
|
|
41
41
|
function formatThinkExecutionTimestamp(value, fallback = "Not recorded") {
|
|
42
42
|
if (value == null) return fallback;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
|
-
import { D as InfoIcon, K as SpinnerIcon, R as PauseIcon, et as XIcon, u as CheckIcon } from "../icons-
|
|
2
|
+
import { D as InfoIcon, K as SpinnerIcon, R as PauseIcon, et as XIcon, u as CheckIcon } from "../icons-DyOM0EJs.js";
|
|
3
3
|
import { Tooltip } from "./Tooltip.js";
|
|
4
4
|
import { formatThinkExecutionStatus, getThinkExecutionRunStatus, getThinkExecutionRunStatusTone } from "./ThinkExecutionRun.js";
|
|
5
5
|
import "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
|
-
import { U as RefreshIcon, y as EllipsisIcon } from "../icons-
|
|
2
|
+
import { U as RefreshIcon, y as EllipsisIcon } from "../icons-DyOM0EJs.js";
|
|
3
3
|
import { t as NavigationLink } from "../navigation-link-Cob7KBlM.js";
|
|
4
4
|
import { Button, buttonVariants } from "./Button.js";
|
|
5
5
|
import { Tooltip } from "./Tooltip.js";
|
|
@@ -223,7 +223,7 @@ function ThinkExecutionWorkbench({ backButton, className, pageSize = executionPa
|
|
|
223
223
|
children: [/* @__PURE__ */ jsxs("span", {
|
|
224
224
|
className: "think-execution-workbench__run-heading",
|
|
225
225
|
children: [/* @__PURE__ */ jsx("span", {
|
|
226
|
-
className: "think-execution-workbench__run-title",
|
|
226
|
+
className: "think-execution-workbench__run-title sigvelo-truncate",
|
|
227
227
|
children: getThinkExecutionRunTitle(run)
|
|
228
228
|
}), getThinkExecutionRunSubtitle(run) ? /* @__PURE__ */ jsx("code", { children: getThinkExecutionRunSubtitle(run) }) : null]
|
|
229
229
|
}), /* @__PURE__ */ jsx("span", {
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
|
-
import { S as FileIcon, X as TerminalIcon, d as ChevronDownIcon } from "../icons-
|
|
2
|
+
import { S as FileIcon, X as TerminalIcon, d as ChevronDownIcon } from "../icons-DyOM0EJs.js";
|
|
3
3
|
import { Button } from "./Button.js";
|
|
4
4
|
import { a as WorkspaceNavigationRestorationBoundary, i as WorkspaceNavigationFocusRestorer, n as WorkspaceNavigationProvider } from "../WorkspaceLink-BYYeTQLf.js";
|
|
5
|
+
import { n as mergeRefs } from "../merge-refs-DF_7w2x_.js";
|
|
5
6
|
import { AppTopBar } from "./AppTopBar.js";
|
|
6
7
|
import { c as resolveThinkApprovalProps, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../ThinkChat-E_HrfH76.js";
|
|
7
|
-
import { t as mergeRefs } from "../merge-refs-KlanQB7A.js";
|
|
8
8
|
import { useWorkspace } from "./Workspace.js";
|
|
9
9
|
import { WorkspaceExplorer } from "./WorkspaceExplorer.js";
|
|
10
|
+
import { n as runViewTransition } from "../view-transitions-DyUP0lSg.js";
|
|
10
11
|
import { ResizableSidePanel } from "./ResizableSidePanel.js";
|
|
11
12
|
import { ThinkExecutionWorkbench } from "./ThinkExecutionWorkbench.js";
|
|
12
13
|
import { ThinkFullAppViewSwitch } from "./ThinkFullAppViewSwitch.js";
|
|
@@ -15,77 +16,6 @@ import { ThinkThreadShell } from "./ThinkThreadShell.js";
|
|
|
15
16
|
import * as React from "react";
|
|
16
17
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
18
|
import { useAgentToolEvents } from "agents/react";
|
|
18
|
-
import { flushSync } from "react-dom";
|
|
19
|
-
//#region src/components/_internal/view-transitions.ts
|
|
20
|
-
let documentScopeSequence = 0;
|
|
21
|
-
let restoreActiveDocumentScope = null;
|
|
22
|
-
function motionIsReduced() {
|
|
23
|
-
if (typeof document === "undefined") return true;
|
|
24
|
-
if (document.documentElement.dataset.motion === "reduce") return true;
|
|
25
|
-
return window.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? false;
|
|
26
|
-
}
|
|
27
|
-
function isReactTestEnvironment() {
|
|
28
|
-
return globalThis.IS_REACT_ACT_ENVIRONMENT;
|
|
29
|
-
}
|
|
30
|
-
function scopeDocumentTransition(scope) {
|
|
31
|
-
if (!(scope instanceof HTMLElement || scope instanceof SVGElement)) return null;
|
|
32
|
-
restoreActiveDocumentScope?.();
|
|
33
|
-
const rootStyle = document.documentElement.style;
|
|
34
|
-
const scopeStyle = scope.style;
|
|
35
|
-
const rootValue = rootStyle.getPropertyValue("view-transition-name");
|
|
36
|
-
const rootPriority = rootStyle.getPropertyPriority("view-transition-name");
|
|
37
|
-
const scopeValue = scopeStyle.getPropertyValue("view-transition-name");
|
|
38
|
-
const scopePriority = scopeStyle.getPropertyPriority("view-transition-name");
|
|
39
|
-
rootStyle.setProperty("view-transition-name", "none", "important");
|
|
40
|
-
scopeStyle.setProperty("view-transition-name", `sigvelo-transition-scope-${++documentScopeSequence}`, "important");
|
|
41
|
-
let active = true;
|
|
42
|
-
const restore = () => {
|
|
43
|
-
if (!active) return;
|
|
44
|
-
active = false;
|
|
45
|
-
if (rootValue) rootStyle.setProperty("view-transition-name", rootValue, rootPriority);
|
|
46
|
-
else rootStyle.removeProperty("view-transition-name");
|
|
47
|
-
if (scopeValue) scopeStyle.setProperty("view-transition-name", scopeValue, scopePriority);
|
|
48
|
-
else scopeStyle.removeProperty("view-transition-name");
|
|
49
|
-
if (restoreActiveDocumentScope === restore) restoreActiveDocumentScope = null;
|
|
50
|
-
};
|
|
51
|
-
restoreActiveDocumentScope = restore;
|
|
52
|
-
return restore;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Runs one synchronous React update inside the narrowest supported native view
|
|
56
|
-
* transition. Unsupported and reduced-motion environments commit immediately.
|
|
57
|
-
*/
|
|
58
|
-
function runViewTransition({ scope, update }) {
|
|
59
|
-
let committed = false;
|
|
60
|
-
const commitOnce = () => {
|
|
61
|
-
if (committed) return;
|
|
62
|
-
committed = true;
|
|
63
|
-
flushSync(update);
|
|
64
|
-
};
|
|
65
|
-
if (typeof document === "undefined" || motionIsReduced() || isReactTestEnvironment()) {
|
|
66
|
-
commitOnce();
|
|
67
|
-
return null;
|
|
68
|
-
}
|
|
69
|
-
const scopedHost = scope;
|
|
70
|
-
const documentHost = document;
|
|
71
|
-
const useScopedHost = typeof scopedHost?.startViewTransition === "function";
|
|
72
|
-
const host = useScopedHost ? scopedHost : typeof documentHost.startViewTransition === "function" ? documentHost : null;
|
|
73
|
-
if (!host?.startViewTransition) {
|
|
74
|
-
commitOnce();
|
|
75
|
-
return null;
|
|
76
|
-
}
|
|
77
|
-
const restoreDocumentScope = useScopedHost ? null : scopeDocumentTransition(scope);
|
|
78
|
-
try {
|
|
79
|
-
const transition = host.startViewTransition(commitOnce);
|
|
80
|
-
if (restoreDocumentScope) transition.finished.finally(restoreDocumentScope).catch(() => void 0);
|
|
81
|
-
return transition;
|
|
82
|
-
} catch {
|
|
83
|
-
restoreDocumentScope?.();
|
|
84
|
-
commitOnce();
|
|
85
|
-
return null;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
//#endregion
|
|
89
19
|
//#region src/components/ThinkFullApp.tsx
|
|
90
20
|
const workbenchPanelDefaultWidth = 340;
|
|
91
21
|
const workbenchPanelMinWidth = 300;
|
|
@@ -231,7 +161,7 @@ function ThinkFullApp({ agent, appBarActions, appBarLeading, appBarTitle, chat,
|
|
|
231
161
|
onClick: (event) => sidebarControls.toggleSidebar(event.currentTarget),
|
|
232
162
|
children: [
|
|
233
163
|
/* @__PURE__ */ jsx("span", {
|
|
234
|
-
className: "think-full-app__thread-trigger-title",
|
|
164
|
+
className: "think-full-app__thread-trigger-title sigvelo-truncate",
|
|
235
165
|
children: appBarTitle ?? "Threads"
|
|
236
166
|
}),
|
|
237
167
|
threadStatusSummary ? /* @__PURE__ */ jsx(ThinkThreadStatusIndicators, { summary: threadStatusSummary }) : null,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { i as titleCase } from "../format-S6uWyoSb.js";
|
|
1
2
|
import { Approval, ApprovalCount, ApprovalDecision, ApprovalHeader, ApprovalInputPreview, ApprovalPreview, ApprovalPreviewRow, ApprovalQuestion, formatApprovalValue } from "./Approval.js";
|
|
2
3
|
import "react";
|
|
3
4
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -10,9 +11,6 @@ function getPausedExecution(part) {
|
|
|
10
11
|
const output = getToolOutput(part);
|
|
11
12
|
return output?.status === "paused" && typeof output.executionId === "string" ? output : void 0;
|
|
12
13
|
}
|
|
13
|
-
function titleCase(value) {
|
|
14
|
-
return value.split("-").map((word) => `${word.charAt(0).toUpperCase()}${word.slice(1)}`).join(" ");
|
|
15
|
-
}
|
|
16
14
|
/**
|
|
17
15
|
* Durable Think approval adapter. It renders the complete upstream descriptor
|
|
18
16
|
* and resolves only through the full Think stub's idempotent execution RPCs.
|
|
@@ -31,6 +31,6 @@ interface ThinkRoutineCreateRequest {
|
|
|
31
31
|
/** Whole upstream task, including prompt functions and handler tasks. */
|
|
32
32
|
task: ThinkScheduledTask;
|
|
33
33
|
}
|
|
34
|
-
declare function getThinkRoutineNextRun(routine: ThinkRoutine): string;
|
|
34
|
+
declare function getThinkRoutineNextRun(routine: ThinkRoutine): string | null;
|
|
35
35
|
//#endregion
|
|
36
36
|
export { ThinkRoutine, ThinkRoutineCreateRequest, ThinkRoutineOwner, ThinkRoutineRunOf, getThinkRoutineNextRun };
|
|
@@ -1,16 +1,9 @@
|
|
|
1
|
+
import { formatThinkExecutionShortTimestamp } from "./ThinkExecutionRun.js";
|
|
1
2
|
//#region src/components/ThinkRoutine.ts
|
|
2
3
|
function getThinkRoutineNextRun(routine) {
|
|
4
|
+
if (!routine.schedule) return null;
|
|
3
5
|
if (!routine.enabled) return "Paused";
|
|
4
|
-
return
|
|
5
|
-
}
|
|
6
|
-
function formatThinkExecutionDate(value, fallback) {
|
|
7
|
-
const date = value instanceof Date ? value : new Date(value);
|
|
8
|
-
return Number.isNaN(date.getTime()) ? fallback : date.toLocaleString(void 0, {
|
|
9
|
-
month: "short",
|
|
10
|
-
day: "numeric",
|
|
11
|
-
hour: "numeric",
|
|
12
|
-
minute: "2-digit"
|
|
13
|
-
});
|
|
6
|
+
return formatThinkExecutionShortTimestamp(routine.schedule.time * 1e3, "Not scheduled");
|
|
14
7
|
}
|
|
15
8
|
//#endregion
|
|
16
9
|
export { getThinkRoutineNextRun };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
|
-
import { V as PlusIcon } from "../icons-
|
|
2
|
+
import { V as PlusIcon } from "../icons-DyOM0EJs.js";
|
|
3
3
|
import { t as NavigationLink } from "../navigation-link-Cob7KBlM.js";
|
|
4
4
|
import { buttonVariants } from "./Button.js";
|
|
5
5
|
import { Tooltip } from "./Tooltip.js";
|
|
6
|
+
import { t as capitalize } from "../format-S6uWyoSb.js";
|
|
6
7
|
import { SearchField } from "./SearchField.js";
|
|
7
8
|
import { ToggleGroup } from "./ToggleGroup.js";
|
|
8
9
|
import { getThinkRoutineNextRun } from "./ThinkRoutine.js";
|
|
9
10
|
import * as React from "react";
|
|
10
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
12
|
//#region src/components/ThinkRoutineBrowser.tsx
|
|
12
13
|
function filterRoutines(routines, filter, query) {
|
|
13
14
|
const normalizedQuery = query.trim().toLocaleLowerCase();
|
|
@@ -51,7 +52,7 @@ function ThinkRoutineBrowser({ className, routines, selectedRoutineId, showOwner
|
|
|
51
52
|
].map((value) => /* @__PURE__ */ jsx(ToggleGroup.Item, {
|
|
52
53
|
type: "button",
|
|
53
54
|
value,
|
|
54
|
-
children:
|
|
55
|
+
children: capitalize(value)
|
|
55
56
|
}, value))
|
|
56
57
|
}), createRoutineLink ? /* @__PURE__ */ jsxs(Tooltip.Root, { children: [/* @__PURE__ */ jsx(Tooltip.Trigger, {
|
|
57
58
|
render: /* @__PURE__ */ jsx(NavigationLink, {
|
|
@@ -126,12 +127,11 @@ function ThinkRoutineBrowser({ className, routines, selectedRoutineId, showOwner
|
|
|
126
127
|
children: [
|
|
127
128
|
/* @__PURE__ */ jsx("strong", { children: routine.name }),
|
|
128
129
|
/* @__PURE__ */ jsx("span", { children: routine.task.schedule }),
|
|
129
|
-
/* @__PURE__ */ jsxs("small", { children: [
|
|
130
|
-
showOwner ?
|
|
131
|
-
"
|
|
132
|
-
" ",
|
|
133
|
-
|
|
134
|
-
] })
|
|
130
|
+
showOwner || routine.schedule ? /* @__PURE__ */ jsxs("small", { children: [
|
|
131
|
+
showOwner ? routine.owner.name : null,
|
|
132
|
+
showOwner && routine.schedule ? " · " : null,
|
|
133
|
+
routine.schedule ? /* @__PURE__ */ jsxs(Fragment, { children: ["Next ", getThinkRoutineNextRun(routine)] }) : null
|
|
134
|
+
] }) : null
|
|
135
135
|
]
|
|
136
136
|
})
|
|
137
137
|
]
|
|
@@ -71,7 +71,7 @@ function ThinkRoutineDetail({ busy = false, className, routine, showOwner = true
|
|
|
71
71
|
className: "think-routine-library__facts",
|
|
72
72
|
children: [
|
|
73
73
|
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", { children: "Repeats" }), /* @__PURE__ */ jsx("dd", { children: routine.task.schedule })] }),
|
|
74
|
-
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", { children: "Next run" }), /* @__PURE__ */ jsx("dd", { children: getThinkRoutineNextRun(routine) })] }),
|
|
74
|
+
routine.schedule ? /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", { children: "Next run" }), /* @__PURE__ */ jsx("dd", { children: getThinkRoutineNextRun(routine) })] }) : null,
|
|
75
75
|
showOwner ? /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", { children: "Agent" }), /* @__PURE__ */ jsx("dd", { children: routine.owner.name })] }) : null
|
|
76
76
|
]
|
|
77
77
|
}),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
|
-
import { K as SpinnerIcon } from "../icons-
|
|
2
|
+
import { K as SpinnerIcon } from "../icons-DyOM0EJs.js";
|
|
3
3
|
import { t as NavigationLink } from "../navigation-link-Cob7KBlM.js";
|
|
4
4
|
import { Button, buttonVariants } from "./Button.js";
|
|
5
5
|
import { Field } from "./Field.js";
|