@vetta-org/theme-ui 0.1.0 → 0.1.2
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/package.json +735 -7
- package/src/action-approval/AppearanceActionPickerView.tsx +2 -78
- package/src/action-approval/AppearanceApprovalDrawerView.tsx +2 -9
- package/src/action-approval/BatchTasksApprovalFrameView.tsx +4 -1
- package/src/action-approval/GenericActionApprovalView.tsx +2 -9
- package/src/action-approval/ManageActionApprovalFrameView.tsx +4 -1
- package/src/action-approval/NavigationOpenApprovalView.tsx +2 -9
- package/src/action-approval/SchedulerActionApprovalDialogView.tsx +3 -1
- package/src/action-approval/SchedulerEditApprovalDrawerView.tsx +3 -10
- package/src/action-approval/index.ts +0 -1
- package/src/activity/ActivityPanel.tsx +13 -10
- package/src/activity/ActivityPanelFrame.test.tsx +32 -0
- package/src/activity/ActivityPanelFrame.tsx +3 -2
- package/src/activity/BackgroundTasksTabPanelView.tsx +1 -1
- package/src/activity/BrowserPanelView.tsx +48 -49
- package/src/activity/DebugTabPanelView.tsx +1 -1
- package/src/activity/MarkdownPreviewView.tsx +56 -59
- package/src/activity/PluginTabPickerView.tsx +5 -3
- package/src/activity/PortsTabPanelView.tsx +911 -0
- package/src/activity/ToolCallsSubTabView.tsx +1 -1
- package/src/activity/WorkflowTabPanelView.tsx +1 -1
- package/src/activity/index.ts +9 -0
- package/src/app/AppBackground.tsx +1 -1
- package/src/app/AppBootLoadingView.tsx +4 -2
- package/src/app-shell/DefaultWindowControls.tsx +1 -1
- package/src/app-shell/PageHeaderActionGroup.tsx +1 -1
- package/src/app-shell/PageHeaderContent.tsx +36 -7
- package/src/app-shell/PageHeaderFrame.tsx +15 -3
- package/src/app-shell/PageHeaderSidebarTrigger.tsx +1 -1
- package/src/app-shell/PageHeaderTitle.tsx +1 -1
- package/src/app-shell/WindowControlButton.tsx +1 -1
- package/src/app-shell/header-crowding.test.ts +62 -0
- package/src/app-shell/header-crowding.tsx +137 -0
- package/src/appearance/BackgroundImageFrame.tsx +1 -1
- package/src/appearance/CenterSliceImageFrame.tsx +1 -1
- package/src/appearance/CornerImageFrame.tsx +1 -1
- package/src/appearance/HorizontalSliceImageFrame.tsx +1 -1
- package/src/appearance/NineSliceImageFrame.tsx +1 -1
- package/src/appearance/ThemeSurface.tsx +1 -1
- package/src/batch-tasks/BatchProjectFoldersFieldView.tsx +2 -1
- package/src/batch-tasks/BatchTaskProjectActionsView.test.tsx +97 -0
- package/src/batch-tasks/BatchTaskProjectActionsView.tsx +45 -35
- package/src/batch-tasks/batchTaskUi.tsx +0 -29
- package/src/bottom-panel/BottomPanelView.test.tsx +43 -0
- package/src/bottom-panel/BottomPanelView.tsx +222 -0
- package/src/bottom-panel/index.ts +26 -0
- package/src/chat/AgentAvatarView.tsx +1 -1
- package/src/chat/AnnotationViews.tsx +107 -0
- package/src/chat/AskUserQuestionView.tsx +18 -11
- package/src/chat/AssistantMessageView.tsx +48 -13
- package/src/chat/AtPanelView.test.tsx +61 -0
- package/src/chat/AtPanelView.tsx +63 -38
- package/src/chat/BashTerminalCard.tsx +1 -2
- package/src/chat/ChatHeaderActionsView.tsx +74 -18
- package/src/chat/CompactionStepView.test.tsx +34 -0
- package/src/chat/CompactionStepView.tsx +85 -0
- package/src/chat/ExecutionModeSelectorView.tsx +20 -5
- package/src/chat/HeaderActionBarView.tsx +731 -0
- package/src/chat/HeaderActionOverflowMenu.tsx +137 -0
- package/src/chat/InlineModelPicker.test.tsx +81 -0
- package/src/chat/InlineModelPicker.tsx +201 -0
- package/src/chat/InlineTokenChip.tsx +2 -68
- package/src/chat/InputBarBackground.tsx +1 -1
- package/src/chat/InputBarPlaceholder.tsx +26 -3
- package/src/chat/LiveThinkingView.tsx +51 -37
- package/src/chat/MessageBoundaryViews.tsx +21 -0
- package/src/chat/MessageFeedContext.tsx +13 -5
- package/src/chat/MessageFeedLayoutView.tsx +28 -3
- package/src/chat/MessageFeedView.test.tsx +81 -0
- package/src/chat/MessageFeedView.tsx +72 -152
- package/src/chat/MessageInputView.tsx +1 -1
- package/src/chat/MessageLayoutView.tsx +1 -1
- package/src/chat/MessageSelectionContextMenuView.tsx +4 -1
- package/src/chat/MessageTimelineView.tsx +1 -1
- package/src/chat/MessageView.tsx +1 -1
- package/src/chat/MessageVisualView.tsx +1 -1
- package/src/chat/ModelConfiguration.tsx +283 -0
- package/src/chat/ModelSelectorTrigger.tsx +63 -0
- package/src/chat/ModelSelectorView.tsx +1037 -223
- package/src/chat/NewSession.ts +1 -37
- package/src/chat/NewSessionPicker.tsx +3 -2
- package/src/chat/ProjectSelectorView.tsx +3 -2
- package/src/chat/ReasoningStepSlider.tsx +61 -0
- package/src/chat/RemoteSessionBadgeView.tsx +24 -0
- package/src/chat/SkillPromptAreaView.tsx +5 -19
- package/src/chat/TeamMemberReplyCardView.test.tsx +33 -0
- package/src/chat/TeamMemberReplyCardView.tsx +133 -0
- package/src/chat/TextBlockView.tsx +7 -770
- package/src/chat/TodoProgress.tsx +25 -53
- package/src/chat/TodoStatusBarView.tsx +14 -5
- package/src/chat/UserMessageView.tsx +113 -33
- package/src/chat/header-action-narrow.test.ts +21 -0
- package/src/chat/header-action-narrow.ts +38 -0
- package/src/chat/index.ts +32 -27
- package/src/chat/markdown-link.ts +7 -279
- package/src/chat/send-button.css +4 -22
- package/src/chat/streaming-reveal.test.ts +218 -0
- package/src/chat/streaming-reveal.ts +13 -0
- package/src/file-explorer/ConfirmDeleteDialogView.tsx +2 -1
- package/src/file-explorer/FileContextMenuView.tsx +44 -11
- package/src/file-explorer/FileExplorerSettingsView.tsx +97 -0
- package/src/file-explorer/FileTreeCreateRow.tsx +1 -1
- package/src/file-explorer/FileTreeNodeView.tsx +59 -18
- package/src/file-explorer/FileTreeView.tsx +236 -129
- package/src/file-explorer/file-tree-dom.ts +23 -0
- package/src/file-explorer/file-tree-rows.test.ts +74 -0
- package/src/file-explorer/file-tree-rows.ts +168 -0
- package/src/file-explorer/index.ts +17 -0
- package/src/file-explorer/types.ts +3 -0
- package/src/file-explorer/useFileTreeMarqueeSelection.ts +24 -16
- package/src/file-preview/FilePreviewDialogView.tsx +2 -2
- package/src/file-preview/FilePreviewView.tsx +12 -2
- package/src/file-preview/TextFileEditorView.tsx +2 -1
- package/src/index.ts +1 -0
- package/src/knowledge/KnowledgeHowItWorksDialogView.tsx +1 -1
- package/src/layout/AppFrame.tsx +3 -2
- package/src/layout/MainContentFrame.tsx +7 -2
- package/src/layout/ResizeHandle.tsx +68 -17
- package/src/layout/SidebarDock.tsx +75 -19
- package/src/layout/SidebarOverlay.tsx +1 -1
- package/src/layout/index.ts +1 -1
- package/src/layout/resize-handle-axis.test.ts +51 -0
- package/src/live-indicators.test.ts +43 -0
- package/src/markdown/CodeBlock.tsx +123 -0
- package/src/markdown/InlineTokenChip.tsx +68 -0
- package/src/markdown/MarkdownContent.tsx +411 -0
- package/src/markdown/MarkdownImage.tsx +51 -0
- package/src/markdown/MathFormula.tsx +46 -0
- package/src/markdown/MermaidBlock.tsx +43 -0
- package/src/markdown/RichCodeBlock.tsx +127 -0
- package/src/markdown/SvgPreview.tsx +45 -0
- package/src/markdown/WebsiteIcon.tsx +94 -0
- package/src/markdown/builtin-renderers.tsx +43 -0
- package/src/markdown/definition.tsx +49 -0
- package/src/markdown/host.tsx +18 -0
- package/src/markdown/index.ts +11 -0
- package/src/markdown/inline-tokens.ts +187 -0
- package/src/markdown/markdown-link.ts +279 -0
- package/src/markdown/math-client.ts +116 -0
- package/src/markdown/math-render.ts +23 -0
- package/src/markdown/math-syntax.ts +80 -0
- package/src/markdown/math.worker.ts +16 -0
- package/src/markdown/nodes.ts +15 -0
- package/src/markdown/preview-policy.ts +43 -0
- package/src/markdown/rich-labels.ts +49 -0
- package/src/markdown/rich-syntax.ts +93 -0
- package/src/markdown/stable-blocks.test.ts +90 -0
- package/src/markdown/stable-blocks.ts +124 -0
- package/src/markdown/streaming-reveal.ts +297 -0
- package/src/markdown/streaming.test.ts +57 -0
- package/src/markdown/streaming.ts +211 -0
- package/src/markdown/use-render-snapshot.ts +24 -0
- package/src/markdown/use-rich-visibility.ts +24 -0
- package/src/overlays/CommandMenuRow.tsx +38 -9
- package/src/overlays/CommandMenuView.tsx +77 -117
- package/src/overlays/ConfirmDialogView.tsx +25 -20
- package/src/overlays/ReleaseNoteMarkdown.tsx +29 -0
- package/src/overlays/SplashOptionRow.tsx +46 -0
- package/src/overlays/SplashPanel.tsx +85 -0
- package/src/overlays/SplashParts.tsx +213 -0
- package/src/overlays/UpdateCheckerView.tsx +34 -18
- package/src/overlays/UpdateRestartDialogView.tsx +139 -54
- package/src/overlays/command-menu-types.ts +2 -0
- package/src/overlays/command-menu.css +1 -20
- package/src/overlays/index.ts +14 -1
- package/src/plugin-ui/index.ts +8 -0
- package/src/project/ConversationTagDotsView.tsx +1 -1
- package/src/project/ConversationTagEditorDialogView.tsx +4 -1
- package/src/project/DefaultConversationSectionView.tsx +4 -4
- package/src/project/DefaultSessionListView.tsx +5 -31
- package/src/project/DefaultSessionRowView.tsx +106 -55
- package/src/project/ManageSessionsSplashView.tsx +439 -0
- package/src/project/NewProjectDialogView.tsx +3 -10
- package/src/project/ProjectContextMenuView.tsx +30 -139
- package/src/project/ProjectDetailPageView.test.tsx +140 -0
- package/src/project/ProjectDetailPageView.tsx +372 -165
- package/src/project/ProjectGroupView.tsx +1 -1
- package/src/project/ProjectRowView.tsx +29 -12
- package/src/project/ProjectSessionsView.tsx +25 -47
- package/src/project/QuickScrollOverlay.tsx +1 -1
- package/src/project/SessionContextMenuView.tsx +15 -7
- package/src/project/SessionRowMoreButton.tsx +50 -0
- package/src/project/SessionRowView.tsx +106 -63
- package/src/project/SessionTitleMarquee.tsx +54 -0
- package/src/project/SidebarProjectDisclosure.tsx +60 -0
- package/src/project/SidebarProjectsSectionView.tsx +6 -1
- package/src/project/index.ts +12 -0
- package/src/project/session-row-transition.ts +9 -0
- package/src/project/types.ts +4 -2
- package/src/project/useActiveSessionAutoScroll.ts +10 -4
- package/src/registry.ts +0 -2
- package/src/scheduler/AutomationDetailPaneView.tsx +68 -0
- package/src/scheduler/AutomationPageView.tsx +118 -121
- package/src/scheduler/ExecutionHistoryView.tsx +7 -5
- package/src/scheduler/TaskListView.tsx +52 -201
- package/src/scheduler/index.ts +7 -12
- package/src/settings/AchievementSettingsView.tsx +0 -1
- package/src/settings/AppshotSettingsView.tsx +0 -1
- package/src/settings/BuiltinMcpSectionView.tsx +1 -1
- package/src/settings/EnvironmentGitRowView.tsx +156 -0
- package/src/settings/EnvironmentSettingsView.tsx +25 -3
- package/src/settings/GeneralSettingsView.tsx +17 -20
- package/src/settings/ImChannelGuideDialogView.tsx +2 -2
- package/src/settings/ImFeishuDialogView.tsx +1 -1
- package/src/settings/ImLegacyImportBannerView.tsx +1 -1
- package/src/settings/ImLogDrawerView.tsx +2 -1
- package/src/settings/JsonConfigInputView.tsx +171 -0
- package/src/settings/ModelsFetchedModelsDrawerView.tsx +292 -0
- package/src/settings/ModelsProvidersSectionView.tsx +26 -23
- package/src/settings/MotionSelect.tsx +9 -7
- package/src/settings/NotificationSettingsView.tsx +79 -0
- package/src/settings/PermissionsSettingsView.tsx +3 -7
- package/src/settings/PresetProviderModelsListView.tsx +141 -24
- package/src/settings/PresetProviderRowView.tsx +205 -182
- package/src/settings/ProxySettingsSectionView.tsx +182 -0
- package/src/settings/QrBindDialogView.tsx +1 -1
- package/src/settings/QuickPanelSettingsSectionView.tsx +0 -2
- package/src/settings/RemoteMcpSectionView.tsx +1 -1
- package/src/settings/SettingChrome.tsx +2 -2
- package/src/settings/SettingsAiAssistButtonView.tsx +9 -119
- package/src/settings/SettingsFormFields.tsx +4 -7
- package/src/settings/SettingsSidebarView.tsx +64 -3
- package/src/settings/ShortcutRecorderView.test.tsx +108 -0
- package/src/settings/ShortcutRecorderView.tsx +15 -9
- package/src/settings/ShortcutsSettingsView.tsx +1 -1
- package/src/settings/SpaceEditorDialogView.tsx +120 -0
- package/src/settings/SpacesSettingsView.tsx +105 -0
- package/src/settings/WebhookEndpointListView.tsx +4 -5
- package/src/settings/index.ts +41 -29
- package/src/shared/ActivityStatusDot.tsx +69 -0
- package/src/shared/AvatarStackView.tsx +13 -13
- package/src/shared/BotAvatar.tsx +11 -9
- package/src/shared/CodeBlockCopyButton.tsx +1 -1
- package/src/shared/ContextMenuView.tsx +4 -11
- package/src/shared/MarkdownTable.tsx +2 -2
- package/src/shared/SyntaxHighlightedCode.tsx +0 -0
- package/src/shared/TabBar.outline.test.tsx +59 -0
- package/src/shared/TabBar.tsx +22 -17
- package/src/shared/VettaKbd.test.tsx +52 -0
- package/src/shared/VettaKbd.tsx +81 -0
- package/src/shared/connected-tab-outline.test.ts +2 -2
- package/src/shared/connected-tab-outline.ts +2 -1
- package/src/shared/index.ts +6 -0
- package/src/shared/kbd-keys.test.ts +61 -0
- package/src/shared/kbd-keys.ts +253 -0
- package/src/shared/provider-icon/icons.ts +4 -2
- package/src/shared/provider-icon/index.tsx +1 -1
- package/src/shared/provider-icon/magpie.svg +1 -0
- package/src/sidebar/AddProjectMenuTriggerView.tsx +25 -15
- package/src/sidebar/DefaultSidebar.tsx +3 -1
- package/src/sidebar/MessageCenterDialogView.tsx +3 -2
- package/src/sidebar/MessageCenterEmptyState.tsx +1 -1
- package/src/sidebar/MessageCenterTabs.tsx +1 -1
- package/src/sidebar/MessageCenterToolbarButton.tsx +1 -1
- package/src/sidebar/MessageCenterTriggerView.tsx +2 -2
- package/src/sidebar/ProjectsPanelEmptyState.tsx +26 -7
- package/src/sidebar/SessionStatusIcon.tsx +16 -1
- package/src/sidebar/SettingsMenuThemeSection.tsx +1 -1
- package/src/sidebar/SettingsMenuTriggerView.test.tsx +42 -0
- package/src/sidebar/SettingsMenuTriggerView.tsx +28 -50
- package/src/sidebar/ShowMoreSessionsButton.tsx +1 -1
- package/src/sidebar/SidebarFilterSelectView.tsx +8 -16
- package/src/sidebar/SidebarNavBadgeView.tsx +1 -1
- package/src/sidebar/SidebarNavIcon.tsx +1 -1
- package/src/sidebar/SidebarNavItemButton.tsx +1 -1
- package/src/sidebar/SidebarNavMorePanel.tsx +19 -7
- package/src/sidebar/SidebarNavigation.tsx +24 -15
- package/src/sidebar/SidebarPanel.tsx +11 -2
- package/src/sidebar/SidebarSectionTriggerLabel.tsx +20 -0
- package/src/sidebar/SidebarTopBar.tsx +10 -7
- package/src/sidebar/WaitingPulseBadge.tsx +19 -0
- package/src/sidebar/index.ts +1 -16
- package/src/skills/index.ts +0 -19
- package/src/skills/skill-icon.tsx +4 -8
- package/src/styles.css +24 -6
- package/src/chat/DefaultSceneCarousel.tsx +0 -113
- package/src/chat/SceneCard.tsx +0 -138
- package/src/scheduler/HistoryDrawerView.tsx +0 -149
- package/src/scheduler/TaskFormDialogView.tsx +0 -60
- package/src/settings/SubscriptionActionsView.tsx +0 -63
- package/src/settings/SubscriptionCardsView.tsx +0 -212
- package/src/settings/TeamDetailView.tsx +0 -148
- package/src/settings/TeamDialogsView.tsx +0 -151
- package/src/settings/TeamListView.tsx +0 -57
- package/src/settings/TeamSettingsView.tsx +0 -51
- package/src/settings/TokenActivityChartView.tsx +0 -286
- package/src/settings/UsageStatsView.tsx +0 -101
- package/src/settings/shouldCloseEmptyApiKeyEditor.test.ts +0 -135
- package/src/settings/shouldCloseEmptyApiKeyEditor.ts +0 -40
- package/src/settings/token-activity.test.ts +0 -195
- package/src/settings/token-activity.ts +0 -320
- package/src/sidebar/AddProjectMenuItem.tsx +0 -21
- package/src/sidebar/AddProjectMenuPopoverView.tsx +0 -52
- package/src/sidebar/NotificationMessageListView.tsx +0 -136
- package/src/sidebar/SettingsMenuAccountSection.tsx +0 -32
- package/src/sidebar/SettingsMenuQuotaSection.tsx +0 -45
- package/src/skills/SceneCardView.tsx +0 -194
- package/src/skills/SkillCardView.tsx +0 -186
- package/src/skills/SkillDetailDialogView.tsx +0 -138
- package/src/skills/SkillTagGroupView.tsx +0 -56
- package/src/skills/SkillToggleSwitch.tsx +0 -31
package/src/project/index.ts
CHANGED
|
@@ -26,6 +26,14 @@ export type {
|
|
|
26
26
|
export { DefaultSessionListView } from "./DefaultSessionListView";
|
|
27
27
|
export type { DefaultSessionRowViewProps } from "./DefaultSessionRowView";
|
|
28
28
|
export { DefaultSessionRowView } from "./DefaultSessionRowView";
|
|
29
|
+
export type {
|
|
30
|
+
ManageSessionsMenuItemView,
|
|
31
|
+
ManageSessionsSplashViewLabels,
|
|
32
|
+
ManageSessionsSplashViewProps,
|
|
33
|
+
ManageSessionsStep,
|
|
34
|
+
ManageSessionsTabView,
|
|
35
|
+
} from "./ManageSessionsSplashView";
|
|
36
|
+
export { ManageSessionsSplashView } from "./ManageSessionsSplashView";
|
|
29
37
|
export type {
|
|
30
38
|
NewProjectDialogViewLabels,
|
|
31
39
|
NewProjectDialogViewProps,
|
|
@@ -38,6 +46,7 @@ export type {
|
|
|
38
46
|
} from "./ProjectContextMenuView";
|
|
39
47
|
export { ProjectContextMenuView } from "./ProjectContextMenuView";
|
|
40
48
|
export type {
|
|
49
|
+
ProjectDetailAutomation,
|
|
41
50
|
ProjectDetailPageViewLabels,
|
|
42
51
|
ProjectDetailPageViewProps,
|
|
43
52
|
ProjectDetailSaveStatus,
|
|
@@ -74,6 +83,8 @@ export type {
|
|
|
74
83
|
export { SessionContextMenuView } from "./SessionContextMenuView";
|
|
75
84
|
export type { SessionRenameInputViewProps } from "./SessionRenameInputView";
|
|
76
85
|
export { SessionRenameInputView } from "./SessionRenameInputView";
|
|
86
|
+
export type { SessionRowMoreButtonProps } from "./SessionRowMoreButton";
|
|
87
|
+
export { SessionRowMoreButton } from "./SessionRowMoreButton";
|
|
77
88
|
export type { SessionRowViewProps } from "./SessionRowView";
|
|
78
89
|
export { SessionRowView } from "./SessionRowView";
|
|
79
90
|
export type { SidebarProjectsSectionViewProps } from "./SidebarProjectsSectionView";
|
|
@@ -82,6 +93,7 @@ export type { ProjectSessionRowItem, ProjectTypeIconKey } from "./types";
|
|
|
82
93
|
export {
|
|
83
94
|
DEFAULT_VISIBLE_SESSIONS,
|
|
84
95
|
PROJECT_TYPE_ICONS,
|
|
96
|
+
REMOTE_PROJECT_ICON,
|
|
85
97
|
VIRTUAL_SESSION_OVERSCAN,
|
|
86
98
|
VIRTUAL_SESSION_ROW_HEIGHT,
|
|
87
99
|
} from "./types";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CSSProperties } from "react";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Desktop's global button rule transitions background-color. Keep the shared
|
|
5
|
+
* text/border feedback while making session selection fills paint immediately.
|
|
6
|
+
*/
|
|
7
|
+
export const IMMEDIATE_SESSION_SELECTION_STYLE = {
|
|
8
|
+
transitionProperty: "color, border-color",
|
|
9
|
+
} satisfies CSSProperties;
|
package/src/project/types.ts
CHANGED
|
@@ -11,11 +11,13 @@ export interface ProjectSessionRowItem {
|
|
|
11
11
|
export type ProjectTypeIconKey = "normal" | "flowing" | "batch";
|
|
12
12
|
|
|
13
13
|
export const PROJECT_TYPE_ICONS: Record<ProjectTypeIconKey, string> = {
|
|
14
|
-
normal: "icon-[
|
|
14
|
+
normal: "icon-[tabler--folder]",
|
|
15
15
|
flowing: "icon-[solar--transfer-horizontal-linear]",
|
|
16
|
-
batch: "icon-[
|
|
16
|
+
batch: "icon-[tabler--folders]",
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
+
export const REMOTE_PROJECT_ICON = "icon-[tabler--folder-share]";
|
|
20
|
+
|
|
19
21
|
export const DEFAULT_VISIBLE_SESSIONS = 5;
|
|
20
22
|
export const VIRTUAL_SESSION_ROW_HEIGHT = 34;
|
|
21
23
|
export const VIRTUAL_SESSION_OVERSCAN = 120;
|
|
@@ -62,7 +62,8 @@ function scrollMountedActiveRow(scrollParent: HTMLElement): boolean {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
|
-
*
|
|
65
|
+
* 点击时把行滚进安全区。测量推迟到选择态完成一次绘制之后,避免同步布局读取
|
|
66
|
+
* 阻塞点击反馈;滚动动画和 `openSession` 继续并行。
|
|
66
67
|
*
|
|
67
68
|
* 这里原本会返回一个「等滚动结束」的 Promise,调用方 `Promise.all` 完它(再叠加一个
|
|
68
69
|
* 「等面板 max-height 过渡结束」的 Promise)之后才发起会话切换,fallback 分别是 800ms
|
|
@@ -73,9 +74,14 @@ function scrollMountedActiveRow(scrollParent: HTMLElement): boolean {
|
|
|
73
74
|
* 连点由 openSession 自己的 token 机制去重,不需要这里再排队。
|
|
74
75
|
*/
|
|
75
76
|
export function prepareSidebarSelection(element: HTMLElement): void {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
window.requestAnimationFrame(() => {
|
|
78
|
+
window.requestAnimationFrame(() => {
|
|
79
|
+
if (!element.isConnected) return;
|
|
80
|
+
const scrollParent = element.closest<HTMLElement>('[data-sidebar-selection-scroll="true"]');
|
|
81
|
+
if (!scrollParent) return;
|
|
82
|
+
scrollElementIntoSafeZone(scrollParent, element);
|
|
83
|
+
});
|
|
84
|
+
});
|
|
79
85
|
}
|
|
80
86
|
|
|
81
87
|
/** Scrolls a newly expanded project row only when it falls outside the shared safety band. */
|
package/src/registry.ts
CHANGED
|
@@ -25,7 +25,6 @@ declare module "@vetta-org/theme-sdk" {
|
|
|
25
25
|
readonly "chat.modelSelectorReasoningMenu"?: ThemeSurfaceConfig;
|
|
26
26
|
readonly "chat.newSessionGuidingWords"?: ThemeSurfaceConfig;
|
|
27
27
|
readonly "chat.newSessionPage"?: ThemeSurfaceConfig;
|
|
28
|
-
readonly "chat.newSessionSceneCard"?: ThemeSurfaceConfig;
|
|
29
28
|
readonly "chat.newSessionSkillCard"?: ThemeSurfaceConfig;
|
|
30
29
|
readonly "chat.projectSelectorMenu"?: ThemeSurfaceConfig;
|
|
31
30
|
readonly "chat.questionPanel"?: ThemeSurfaceConfig;
|
|
@@ -56,7 +55,6 @@ declare module "@vetta-org/theme-sdk" {
|
|
|
56
55
|
readonly "sidebar.navigationIndicator"?: ThemeSurfaceConfig;
|
|
57
56
|
readonly "sidebar.panel"?: ThemeSurfaceConfig;
|
|
58
57
|
readonly "sidebar.projects"?: ThemeSurfaceConfig;
|
|
59
|
-
readonly "sidebar.settingsMenu"?: ThemeSurfaceConfig;
|
|
60
58
|
readonly "sidebar.topBar"?: ThemeSurfaceConfig;
|
|
61
59
|
}
|
|
62
60
|
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { ButtonGroup, ButtonGroupItem, cn } from "@vetta-org/ui";
|
|
2
|
+
import type { JSX, ReactNode } from "react";
|
|
3
|
+
|
|
4
|
+
export type AutomationDetailStatusTone = "active" | "running" | "paused" | "suspended" | "done" | "draft";
|
|
5
|
+
|
|
6
|
+
export interface AutomationDetailPaneViewProps {
|
|
7
|
+
readonly statusLabel: string;
|
|
8
|
+
readonly statusTone: AutomationDetailStatusTone;
|
|
9
|
+
/** 顶栏右侧的操作(更多菜单、暂停/启用等),关闭按钮由本组件自带。 */
|
|
10
|
+
readonly headerActions?: ReactNode;
|
|
11
|
+
readonly closeLabel: string;
|
|
12
|
+
readonly onClose: () => void;
|
|
13
|
+
/** 可编辑的任务内容。 */
|
|
14
|
+
readonly body: ReactNode;
|
|
15
|
+
/** 编辑态下的执行历史;新建时不传。 */
|
|
16
|
+
readonly history?: ReactNode;
|
|
17
|
+
/** 底栏:保存/创建、打开聊天等。 */
|
|
18
|
+
readonly footer?: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const STATUS_CLASS: Record<AutomationDetailStatusTone, string> = {
|
|
22
|
+
active: "text-primary",
|
|
23
|
+
running: "text-primary",
|
|
24
|
+
paused: "text-muted-foreground",
|
|
25
|
+
suspended: "text-amber-500",
|
|
26
|
+
done: "text-muted-foreground",
|
|
27
|
+
draft: "text-muted-foreground",
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** 自动化页右侧分屏:顶栏状态 + 操作,中间滚动的编辑区与执行历史,底栏固定。 */
|
|
31
|
+
export function AutomationDetailPaneView({
|
|
32
|
+
statusLabel,
|
|
33
|
+
statusTone,
|
|
34
|
+
headerActions,
|
|
35
|
+
closeLabel,
|
|
36
|
+
onClose,
|
|
37
|
+
body,
|
|
38
|
+
history,
|
|
39
|
+
footer,
|
|
40
|
+
}: AutomationDetailPaneViewProps): JSX.Element {
|
|
41
|
+
return (
|
|
42
|
+
<div className="flex h-full min-h-0 flex-col">
|
|
43
|
+
<header className="flex h-12 shrink-0 items-center gap-2 px-6">
|
|
44
|
+
<span className={cn("flex-1 truncate text-[13px] font-medium", STATUS_CLASS[statusTone])}>
|
|
45
|
+
{statusLabel}
|
|
46
|
+
</span>
|
|
47
|
+
{headerActions}
|
|
48
|
+
<ButtonGroup>
|
|
49
|
+
<ButtonGroupItem
|
|
50
|
+
title={closeLabel}
|
|
51
|
+
aria-label={closeLabel}
|
|
52
|
+
onClick={onClose}
|
|
53
|
+
icon={<span className="icon-[solar--close-linear] size-4" />}
|
|
54
|
+
/>
|
|
55
|
+
</ButtonGroup>
|
|
56
|
+
</header>
|
|
57
|
+
<div className="min-h-0 flex-1 overflow-y-auto px-6 pt-3 pb-6">
|
|
58
|
+
{body}
|
|
59
|
+
{history ? <div className="mt-6">{history}</div> : null}
|
|
60
|
+
</div>
|
|
61
|
+
{footer ? (
|
|
62
|
+
<footer className="flex shrink-0 items-center justify-end gap-2 border-t border-border/60 px-6 py-3">
|
|
63
|
+
{footer}
|
|
64
|
+
</footer>
|
|
65
|
+
) : null}
|
|
66
|
+
</div>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
+
import { Button, cn } from "@vetta-org/ui";
|
|
1
2
|
import type { JSX, ReactNode } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import { Button } from "@vetta-org/ui";
|
|
4
|
-
|
|
5
|
-
const easeOut = [0.22, 1, 0.36, 1] as const;
|
|
3
|
+
import { SegmentedControl } from "../shared/SegmentedControl";
|
|
6
4
|
|
|
7
5
|
export interface AutomationRecommendationItem {
|
|
8
6
|
readonly id: string;
|
|
@@ -12,148 +10,147 @@ export interface AutomationRecommendationItem {
|
|
|
12
10
|
readonly scheduleLabel: string;
|
|
13
11
|
}
|
|
14
12
|
|
|
13
|
+
export interface AutomationFilterTab<Key extends string = string> {
|
|
14
|
+
readonly key: Key;
|
|
15
|
+
readonly label: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
15
18
|
export interface AutomationPageViewLabels {
|
|
16
19
|
readonly title: string;
|
|
17
20
|
readonly subtitle: string;
|
|
18
|
-
readonly
|
|
19
|
-
readonly
|
|
20
|
-
/** @deprecated Empty hero removed; kept optional for host compatibility. */
|
|
21
|
-
readonly emptyTitle?: string;
|
|
22
|
-
readonly emptyDesc?: string;
|
|
23
|
-
readonly emptyAction?: string;
|
|
21
|
+
readonly create: string;
|
|
22
|
+
readonly searchPlaceholder: string;
|
|
24
23
|
/** Section heading above recommended templates when the user has no tasks. */
|
|
25
24
|
readonly recommendTitle?: string;
|
|
26
|
-
/** Optional CTA on each recommendation card. */
|
|
27
|
-
readonly recommendUse?: string;
|
|
28
25
|
}
|
|
29
26
|
|
|
30
|
-
export interface AutomationPageViewProps {
|
|
31
|
-
readonly hasTasks: boolean;
|
|
32
|
-
/** Optional trailing header actions (e.g. AI assist), rendered before the primary CTA. */
|
|
33
|
-
readonly headerTrailing?: ReactNode;
|
|
27
|
+
export interface AutomationPageViewProps<FilterKey extends string = string> {
|
|
34
28
|
readonly labels: AutomationPageViewLabels;
|
|
35
|
-
readonly
|
|
36
|
-
|
|
37
|
-
readonly
|
|
38
|
-
readonly
|
|
39
|
-
readonly
|
|
40
|
-
|
|
29
|
+
readonly filters: readonly AutomationFilterTab<FilterKey>[];
|
|
30
|
+
readonly activeFilter: FilterKey;
|
|
31
|
+
readonly onFilterChange: (key: FilterKey) => void;
|
|
32
|
+
readonly searchValue: string;
|
|
33
|
+
readonly onSearchChange: (value: string) => void;
|
|
34
|
+
readonly onCreate: () => void;
|
|
35
|
+
/** Task list (or its empty state). */
|
|
36
|
+
readonly list: ReactNode;
|
|
37
|
+
/** Recommended templates shown under the list when the user has no tasks. */
|
|
41
38
|
readonly recommendations?: readonly AutomationRecommendationItem[];
|
|
42
39
|
readonly onSelectRecommendation?: (id: string) => void;
|
|
40
|
+
/** Right split pane (edit / create / history). The list narrows while it is open. */
|
|
41
|
+
readonly detailPane?: ReactNode;
|
|
43
42
|
}
|
|
44
43
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
/**
|
|
45
|
+
* 自动化页:与能力页同样的大标题与说明;下方左列是可筛选、可搜索的任务列表,
|
|
46
|
+
* 右侧是编辑与执行历史的分屏。刻意不用入场动画、毛玻璃与模糊,控制合成开销。
|
|
47
|
+
*/
|
|
48
|
+
export function AutomationPageView<FilterKey extends string>({
|
|
48
49
|
labels,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
filters,
|
|
51
|
+
activeFilter,
|
|
52
|
+
onFilterChange,
|
|
53
|
+
searchValue,
|
|
54
|
+
onSearchChange,
|
|
55
|
+
onCreate,
|
|
56
|
+
list,
|
|
53
57
|
recommendations,
|
|
54
58
|
onSelectRecommendation,
|
|
55
|
-
|
|
59
|
+
detailPane,
|
|
60
|
+
}: AutomationPageViewProps<FilterKey>): JSX.Element {
|
|
61
|
+
const paneOpen = Boolean(detailPane);
|
|
62
|
+
// 标题、切换、搜索与列表共用同一个容器:标题跟列表左边对齐,创建按钮跟列表右边对齐。
|
|
63
|
+
const column = cn("w-full", paneOpen ? "px-5" : "mx-auto max-w-4xl px-8");
|
|
56
64
|
return (
|
|
57
|
-
<div className="
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
</
|
|
70
|
-
<p className="mt-1 text-[12px] text-muted-foreground/60">{labels.subtitle}</p>
|
|
71
|
-
</motion.div>
|
|
72
|
-
|
|
73
|
-
<div className="flex items-center gap-2">
|
|
74
|
-
{headerTrailing}
|
|
75
|
-
<Button type="button" variant="primary" onClick={onNewTask} title={labels.newTaskTitle}>
|
|
76
|
-
<span className="icon-[mdi--plus] text-[15px]" />
|
|
77
|
-
{labels.newTask}
|
|
78
|
-
</Button>
|
|
65
|
+
<div className="@container flex h-full w-full flex-1 overflow-hidden">
|
|
66
|
+
<section
|
|
67
|
+
className={cn(
|
|
68
|
+
"min-w-0 flex-col",
|
|
69
|
+
// 分屏打开且页面够宽时左右并排;窄屏下详情独占整页(关闭详情即回到列表),避免两栏互相挤压。
|
|
70
|
+
paneOpen ? "hidden w-[400px] shrink-0 border-r border-border/60 @[780px]:flex" : "flex flex-1",
|
|
71
|
+
)}
|
|
72
|
+
>
|
|
73
|
+
<div className="drag-region h-6 shrink-0" />
|
|
74
|
+
<header className={cn(column, "flex shrink-0 items-end justify-between gap-4 pb-5")}>
|
|
75
|
+
<div className="min-w-0">
|
|
76
|
+
<h1 className="text-[26px] font-bold leading-tight tracking-tight text-foreground">{labels.title}</h1>
|
|
77
|
+
<p className="mt-1 truncate text-[12px] text-muted-foreground/60">{labels.subtitle}</p>
|
|
79
78
|
</div>
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
79
|
+
<Button type="button" variant="primary" size="sm" className="shrink-0" onClick={onCreate}>
|
|
80
|
+
<span className="icon-[mdi--plus] h-3.5 w-3.5" />
|
|
81
|
+
{labels.create}
|
|
82
|
+
</Button>
|
|
83
|
+
</header>
|
|
84
|
+
<div className={cn(column, "flex shrink-0 flex-col gap-3")}>
|
|
85
|
+
<SegmentedControl
|
|
86
|
+
className="self-start"
|
|
87
|
+
items={filters.map((filter) => ({ key: filter.key, label: filter.label }))}
|
|
88
|
+
value={activeFilter}
|
|
89
|
+
onChange={onFilterChange}
|
|
90
|
+
suppressLayoutAnimation
|
|
92
91
|
/>
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
92
|
+
<label className="relative block">
|
|
93
|
+
<span className="icon-[solar--magnifer-linear] absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground/40" />
|
|
94
|
+
<input
|
|
95
|
+
type="search"
|
|
96
|
+
value={searchValue}
|
|
97
|
+
onChange={(event) => onSearchChange(event.target.value)}
|
|
98
|
+
placeholder={labels.searchPlaceholder}
|
|
99
|
+
className="h-8 w-full rounded-lg bg-secondary pl-8 pr-3 text-[12px] text-foreground placeholder:text-muted-foreground/40 transition-colors hover:bg-accent focus:bg-accent focus:outline-none"
|
|
100
|
+
/>
|
|
101
|
+
</label>
|
|
102
|
+
</div>
|
|
103
|
+
<div className="mt-3 min-h-0 flex-1 overflow-y-auto pb-6">
|
|
104
|
+
<div className={column}>
|
|
105
|
+
{list}
|
|
106
|
+
{recommendations && recommendations.length > 0 ? (
|
|
107
|
+
<AutomationRecommendations
|
|
108
|
+
title={labels.recommendTitle}
|
|
109
|
+
recommendations={recommendations}
|
|
110
|
+
onSelect={onSelectRecommendation}
|
|
111
|
+
/>
|
|
112
|
+
) : null}
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
</section>
|
|
116
|
+
{detailPane ? (
|
|
117
|
+
<section className="@container flex min-w-0 flex-1 flex-col">
|
|
118
|
+
<div className="drag-region h-6 shrink-0" />
|
|
119
|
+
{detailPane}
|
|
120
|
+
</section>
|
|
121
|
+
) : null}
|
|
98
122
|
</div>
|
|
99
123
|
);
|
|
100
124
|
}
|
|
101
125
|
|
|
102
126
|
function AutomationRecommendations({
|
|
103
|
-
|
|
104
|
-
recommendUse,
|
|
127
|
+
title,
|
|
105
128
|
recommendations,
|
|
106
|
-
|
|
129
|
+
onSelect,
|
|
107
130
|
}: {
|
|
108
|
-
readonly
|
|
109
|
-
readonly
|
|
110
|
-
readonly
|
|
111
|
-
|
|
112
|
-
}): JSX.Element | null {
|
|
113
|
-
if (!recommendations || recommendations.length === 0) return null;
|
|
114
|
-
|
|
131
|
+
readonly title?: string;
|
|
132
|
+
readonly recommendations: readonly AutomationRecommendationItem[];
|
|
133
|
+
readonly onSelect?: (id: string) => void;
|
|
134
|
+
}): JSX.Element {
|
|
115
135
|
return (
|
|
116
|
-
<
|
|
117
|
-
className="
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
>
|
|
136
|
-
<div className="flex items-start gap-3">
|
|
137
|
-
<div className="flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-primary/10 ring-1 ring-inset ring-primary/15">
|
|
138
|
-
<span className={`${item.icon} h-4 w-4 text-primary`} />
|
|
139
|
-
</div>
|
|
140
|
-
<div className="min-w-0 flex-1">
|
|
141
|
-
<p className="truncate text-[13px] font-semibold text-foreground">{item.title}</p>
|
|
142
|
-
<p className="mt-0.5 truncate text-[11px] text-muted-foreground/60">{item.scheduleLabel}</p>
|
|
143
|
-
</div>
|
|
144
|
-
</div>
|
|
145
|
-
<p className="mt-3 line-clamp-2 text-[12px] leading-relaxed text-muted-foreground/70">
|
|
146
|
-
{item.description}
|
|
147
|
-
</p>
|
|
148
|
-
{recommendUse && (
|
|
149
|
-
<span className="mt-3 inline-flex items-center gap-1 text-[11px] font-medium text-primary opacity-80 transition-opacity group-hover:opacity-100">
|
|
150
|
-
{recommendUse}
|
|
151
|
-
<span className="icon-[mdi--arrow-right] h-3.5 w-3.5" />
|
|
152
|
-
</span>
|
|
153
|
-
)}
|
|
154
|
-
</motion.button>
|
|
155
|
-
))}
|
|
156
|
-
</div>
|
|
157
|
-
</motion.div>
|
|
136
|
+
<div className="mt-6 flex flex-col gap-2">
|
|
137
|
+
{title ? <p className="px-1 text-[12px] text-muted-foreground/70">{title}</p> : null}
|
|
138
|
+
{recommendations.map((item) => (
|
|
139
|
+
<button
|
|
140
|
+
key={item.id}
|
|
141
|
+
type="button"
|
|
142
|
+
onClick={() => onSelect?.(item.id)}
|
|
143
|
+
className="flex items-start gap-3 rounded-lg px-3 py-2.5 text-left transition-colors hover:bg-primary/5"
|
|
144
|
+
>
|
|
145
|
+
<span className={cn(item.icon, "mt-0.5 h-4 w-4 shrink-0 text-primary")} />
|
|
146
|
+
<span className="min-w-0 flex-1">
|
|
147
|
+
<span className="block truncate text-[13px] text-foreground">{item.title}</span>
|
|
148
|
+
<span className="mt-0.5 block truncate text-[12px] text-muted-foreground/70">
|
|
149
|
+
{item.scheduleLabel} · {item.description}
|
|
150
|
+
</span>
|
|
151
|
+
</span>
|
|
152
|
+
</button>
|
|
153
|
+
))}
|
|
154
|
+
</div>
|
|
158
155
|
);
|
|
159
156
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { JSX } from "react";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/** skipped / missed 是「未执行」:前者因上次仍在运行,后者因应用未运行或系统休眠。 */
|
|
4
|
+
export type ExecutionHistoryStatus = "success" | "failed" | "running" | "aborted" | "skipped" | "missed";
|
|
4
5
|
|
|
5
6
|
export interface ExecutionHistoryRecordView {
|
|
6
7
|
readonly durationLabel: string | null;
|
|
@@ -101,7 +102,7 @@ export function ExecutionHistoryView({
|
|
|
101
102
|
}
|
|
102
103
|
|
|
103
104
|
return (
|
|
104
|
-
<div className="overflow-hidden rounded-xl border border-border">
|
|
105
|
+
<div className="overflow-hidden rounded-xl border border-border bg-card">
|
|
105
106
|
<ExecutionHistoryHeader labels={labels} onRefresh={onRefresh} />
|
|
106
107
|
<div className="max-h-72 overflow-y-auto">{body}</div>
|
|
107
108
|
</div>
|
|
@@ -147,12 +148,11 @@ function StatusDot({ status }: { readonly status: ExecutionHistoryStatus }): JSX
|
|
|
147
148
|
failed: "bg-destructive",
|
|
148
149
|
running: "bg-primary",
|
|
149
150
|
aborted: "bg-amber-500",
|
|
151
|
+
skipped: "bg-muted-foreground/40",
|
|
152
|
+
missed: "bg-muted-foreground/40",
|
|
150
153
|
};
|
|
151
154
|
return (
|
|
152
155
|
<div className="relative flex h-2 w-2 shrink-0">
|
|
153
|
-
{status === "running" && (
|
|
154
|
-
<span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-primary opacity-50" />
|
|
155
|
-
)}
|
|
156
156
|
<span className={`relative inline-flex h-2 w-2 rounded-full ${colors[status]}`} />
|
|
157
157
|
</div>
|
|
158
158
|
);
|
|
@@ -170,6 +170,8 @@ function StatusBadge({
|
|
|
170
170
|
failed: "text-destructive bg-destructive/10",
|
|
171
171
|
running: "text-primary bg-primary/10",
|
|
172
172
|
aborted: "text-amber-400 bg-amber-500/15",
|
|
173
|
+
skipped: "text-muted-foreground bg-muted",
|
|
174
|
+
missed: "text-muted-foreground bg-muted",
|
|
173
175
|
};
|
|
174
176
|
return (
|
|
175
177
|
<span className={`rounded-md px-1.5 py-0.5 text-[10px] font-medium ${styles[status]}`}>
|