@blade-hq/agent-kit 1.0.24 → 1.0.27
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/{chunk-7F6UP5LP.js → chunk-34GDDOWY.js} +5 -208
- package/dist/chunk-34GDDOWY.js.map +1 -0
- package/dist/{chunk-2QYV43YP.js → chunk-C2FKVGJU.js} +2 -2
- package/dist/{chunk-TYM7KL2L.js → chunk-JU5SL4HP.js} +2 -2
- package/dist/chunk-M72OL7ZJ.js +23 -0
- package/dist/chunk-M72OL7ZJ.js.map +1 -0
- package/dist/{chunk-IMMRWXI7.js → chunk-SBASG3M2.js} +128 -98
- package/dist/chunk-SBASG3M2.js.map +1 -0
- package/dist/{chunk-BQKF6HJH.js → chunk-TE6G6NVX.js} +6 -6
- package/dist/{chunk-ICV7OTGX.js → chunk-X2NJKKXR.js} +10 -10
- package/dist/client/auth.d.ts +8 -0
- package/dist/client/blade-client.d.ts +80 -0
- package/dist/client/index.d.ts +22 -18769
- package/dist/client/index.js +1 -5
- package/dist/client/resources/api-keys.d.ts +28 -0
- package/dist/client/resources/auth.d.ts +26 -0
- package/dist/client/resources/env-buckets.d.ts +20 -0
- package/dist/client/resources/gis.d.ts +8 -0
- package/dist/client/resources/headless.d.ts +33 -0
- package/dist/client/resources/memories.d.ts +63 -0
- package/dist/client/resources/models.d.ts +23 -0
- package/dist/client/resources/published-apps.d.ts +8 -0
- package/dist/client/resources/registry.d.ts +58 -0
- package/dist/client/resources/runs.d.ts +8 -0
- package/dist/client/resources/scenarios.d.ts +49 -0
- package/dist/client/resources/sessions.d.ts +253 -0
- package/dist/client/resources/skills.d.ts +38 -0
- package/dist/client/resources/solutions.d.ts +31 -0
- package/dist/client/resources/user-preferences.d.ts +26 -0
- package/dist/client/rest.d.ts +19 -0
- package/dist/client/socket.d.ts +9 -0
- package/dist/client/types/index.d.ts +8 -0
- package/dist/client/types/rest.d.ts +15335 -0
- package/dist/client/types/sdk-profile.d.ts +47 -0
- package/dist/client/types/socket-events.d.ts +503 -0
- package/dist/react/api/api-keys.d.ts +6 -0
- package/dist/react/api/auth.d.ts +7 -0
- package/dist/react/api/client.d.ts +8 -0
- package/dist/react/api/env-buckets.d.ts +10 -0
- package/dist/react/api/gis-api.d.ts +4 -0
- package/dist/react/api/memories.d.ts +14 -0
- package/dist/react/api/models.d.ts +11 -0
- package/dist/react/api/partner-skill.d.ts +2 -0
- package/dist/react/api/prod-solution.d.ts +456 -0
- package/dist/react/api/published-apps.d.ts +21 -0
- package/dist/react/api/published-apps.js +14 -0
- package/dist/react/api/published-apps.js.map +1 -0
- package/dist/react/api/registry.d.ts +46 -0
- package/dist/react/api/scenarios.d.ts +9 -0
- package/dist/react/api/scheduled-tasks.d.ts +24 -0
- package/dist/react/api/session-skill.d.ts +2 -0
- package/dist/react/api/sessions.d.ts +109 -0
- package/dist/react/api/sessions.js +93 -0
- package/dist/react/api/sessions.js.map +1 -0
- package/dist/react/api/skills.d.ts +27 -0
- package/dist/react/api/socket.d.ts +5 -0
- package/dist/react/api/solutions.d.ts +11 -0
- package/dist/react/api/user-preferences.d.ts +8 -0
- package/dist/react/asr/VoiceWaveform.d.ts +10 -0
- package/dist/react/asr/use-tiptap-voice-input.d.ts +29 -0
- package/dist/react/asr/use-voice-input.d.ts +17 -0
- package/dist/react/asr/voice-input-support.d.ts +5 -0
- package/dist/react/bootstrap.d.ts +4 -0
- package/dist/react/cards/register.d.ts +1 -2
- package/dist/react/components/ai-elements/file-tree.d.ts +26 -0
- package/dist/react/components/ai-elements/reasoning.d.ts +32 -0
- package/dist/react/components/ai-elements/shimmer.d.ts +11 -0
- package/dist/react/components/card/CardCodeBlock.d.ts +5 -0
- package/dist/react/components/card/CardContext.d.ts +7 -0
- package/dist/react/components/card/CardRenderer.d.ts +7 -0
- package/dist/react/components/card/CardStates.d.ts +8 -0
- package/dist/react/components/card/cards/attraction-card.d.ts +2 -0
- package/dist/react/components/card/cards/cite-card.d.ts +10 -0
- package/dist/react/components/card/cards/comprehensive-analysis-card.d.ts +2 -0
- package/dist/react/components/card/cards/conflict-detection-card.d.ts +4 -0
- package/dist/react/components/card/cards/counter.d.ts +2 -0
- package/dist/react/components/card/cards/damage-effect-card.d.ts +4 -0
- package/dist/react/components/card/cards/destination-card.d.ts +2 -0
- package/dist/react/components/card/cards/diff-card.d.ts +2 -0
- package/dist/react/components/card/cards/execution-order-card.d.ts +2 -0
- package/dist/react/components/card/cards/experience-card-with-options.d.ts +4 -0
- package/dist/react/components/card/cards/flight-card.d.ts +2 -0
- package/dist/react/components/card/cards/hotel-card.d.ts +2 -0
- package/dist/react/components/card/cards/kill-chain-card.d.ts +2 -0
- package/dist/react/components/card/cards/kill-chain-types.d.ts +157 -0
- package/dist/react/components/card/cards/map-card.d.ts +2 -0
- package/dist/react/components/card/cards/order-status-card.d.ts +2 -0
- package/dist/react/components/card/cards/patch-card.d.ts +15 -0
- package/dist/react/components/card/cards/product-recommendation-card.d.ts +2 -0
- package/dist/react/components/card/cards/reflection-optimization-card.d.ts +2 -0
- package/dist/react/components/card/cards/resolution-modifications-card.d.ts +2 -0
- package/dist/react/components/card/cards/resolution-summary-card.d.ts +2 -0
- package/dist/react/components/card/cards/restaurant-card.d.ts +2 -0
- package/dist/react/components/card/cards/shopping-list-card.d.ts +2 -0
- package/dist/react/components/card/cards/simulation-event-card.d.ts +4 -0
- package/dist/react/components/card/cards/survival-effect-card.d.ts +4 -0
- package/dist/react/components/card/cards/travel-itinerary-card.d.ts +2 -0
- package/dist/react/components/card/register.d.ts +1 -0
- package/dist/react/components/chat/AgentLoopBlock.d.ts +8 -0
- package/dist/react/components/chat/AskUserQuestionBlock.d.ts +32 -0
- package/dist/react/components/chat/AssistantTurnBlock.d.ts +28 -0
- package/dist/react/components/chat/AttachmentPreviewDialog.d.ts +26 -0
- package/dist/react/components/chat/BackgroundTasksPill.d.ts +3 -0
- package/dist/react/components/chat/ChatInput.d.ts +94 -0
- package/dist/react/components/chat/ChatView.d.ts +16 -0
- package/dist/react/components/chat/CompactionCard.d.ts +6 -0
- package/dist/react/components/chat/ConnectionBanner.d.ts +1 -0
- package/dist/react/components/chat/FileCompletionMenu.d.ts +13 -0
- package/dist/react/components/chat/FileSizeLimitDialog.d.ts +9 -0
- package/dist/react/components/chat/ImageLightbox.d.ts +11 -0
- package/dist/react/components/chat/MessageActions.d.ts +6 -0
- package/dist/react/components/chat/MessageContextPills.d.ts +6 -0
- package/dist/react/components/chat/MessageFileAttachmentList.d.ts +13 -0
- package/dist/react/components/chat/MessageList.d.ts +13 -0
- package/dist/react/components/chat/ProgressCircle.d.ts +12 -0
- package/dist/react/components/chat/RenderErrorBoundary.d.ts +19 -0
- package/dist/react/components/chat/ResourceIframe.d.ts +5 -0
- package/dist/react/components/chat/Shimmer.d.ts +6 -0
- package/dist/react/components/chat/SkillCompletionMenu.d.ts +9 -0
- package/dist/react/components/chat/SkillStatusBar.d.ts +8 -0
- package/dist/react/components/chat/StickyStatusBar.d.ts +10 -0
- package/dist/react/components/chat/TextAttachmentPills.d.ts +10 -0
- package/dist/react/components/chat/ThinkingToggle.d.ts +7 -0
- package/dist/react/components/chat/ToolCallBlock.d.ts +18 -0
- package/dist/react/components/chat/TurnNavRail.d.ts +11 -0
- package/dist/react/components/chat/UserMessageBubble.d.ts +20 -0
- package/dist/react/components/chat/WhatIfUserBubble.d.ts +13 -0
- package/dist/react/components/chat/customization.d.ts +82 -0
- package/dist/react/components/chat/display-utils.d.ts +35 -0
- package/dist/react/components/chat/extensions/file-mention.d.ts +12 -0
- package/dist/react/components/chat/extensions/skill-mention.d.ts +25 -0
- package/dist/react/components/chat/index.d.ts +16 -115
- package/dist/react/components/chat/index.js +6 -6
- package/dist/react/components/chat/tool-renderers/BashRenderer.d.ts +2 -0
- package/dist/react/components/chat/tool-renderers/FileEditRenderer.d.ts +2 -0
- package/dist/react/components/chat/tool-renderers/FileReadRenderer.d.ts +2 -0
- package/dist/react/components/chat/tool-renderers/SearchRenderer.d.ts +2 -0
- package/dist/react/components/chat/tool-renderers/SubmitResultRenderer.d.ts +2 -0
- package/dist/react/components/chat/tool-renderers/registry.d.ts +9 -0
- package/dist/react/components/chat/tool-renderers/shared.d.ts +26 -0
- package/dist/react/components/chat/whatif-quote-context.d.ts +15 -0
- package/dist/react/components/markdown/ExternalLinkDialog.d.ts +8 -0
- package/dist/react/components/markdown/FileCardComponent.d.ts +10 -0
- package/dist/react/components/markdown/MarkdownContent.d.ts +19 -0
- package/dist/react/components/model/ModelSelector.d.ts +9 -0
- package/dist/react/components/plan/PlanSummaryCard.d.ts +8 -0
- package/dist/react/components/plan/PlanVisualization.d.ts +13 -0
- package/dist/react/components/plan/debug-log.d.ts +21 -0
- package/dist/react/components/plan/extract-plan-messages.d.ts +2 -0
- package/dist/react/components/plan/index.d.ts +6 -110
- package/dist/react/components/plan/index.js +4 -4
- package/dist/react/components/plan/parse-plan-messages.d.ts +10 -0
- package/dist/react/components/plan/parse-plan-tree.d.ts +16 -0
- package/dist/react/components/plan/phases/PlanMindMap.d.ts +8 -0
- package/dist/react/components/plan/phases/PlanStatusIcon.d.ts +5 -0
- package/dist/react/components/plan/phases/PlanTree.d.ts +8 -0
- package/dist/react/components/plan/phases/SkillAnalysis.d.ts +7 -0
- package/dist/react/components/plan/phases/SkillDiscovery.d.ts +10 -0
- package/dist/react/components/plan/types.d.ts +56 -0
- package/dist/react/components/session/SessionDetail.d.ts +8 -0
- package/dist/react/components/session/SessionList.d.ts +9 -0
- package/dist/react/components/session/SessionListItem.d.ts +8 -0
- package/dist/react/components/session/StatusBadge.d.ts +3 -0
- package/dist/react/components/session/index.d.ts +5 -53
- package/dist/react/components/session/index.js +3 -3
- package/dist/react/components/session/session-utils.d.ts +19 -0
- package/dist/react/components/ui/collapsible.d.ts +5 -0
- package/dist/react/components/workspace/FileTree.d.ts +21 -0
- package/dist/react/components/workspace/WorkspaceFilesPanel.d.ts +30 -0
- package/dist/react/components/workspace/file-icon-assets.d.ts +3 -0
- package/dist/react/components/workspace/index.d.ts +2 -59
- package/dist/react/components/workspace/index.js +3 -3
- package/dist/react/context.d.ts +2 -0
- package/dist/react/devtools/bridge-devtools/BridgeDevtoolsFab.d.ts +1 -0
- package/dist/react/devtools/bridge-devtools/index.d.ts +3 -36
- package/dist/react/devtools/bridge-devtools/mount.d.ts +1 -0
- package/dist/react/devtools/bridge-devtools/store.d.ts +15 -0
- package/dist/react/devtools/bridge-devtools/tap.d.ts +5 -0
- package/dist/react/devtools/bridge-devtools/types.d.ts +29 -0
- package/dist/react/hooks/use-background-tasks.d.ts +7 -0
- package/dist/react/hooks/use-card-state.d.ts +1 -0
- package/dist/react/hooks/use-chat.d.ts +13 -0
- package/dist/react/hooks/use-check-skill-file.d.ts +4 -0
- package/dist/react/hooks/use-check-solution-file.d.ts +4 -0
- package/dist/react/hooks/use-context-stats.d.ts +7 -0
- package/dist/react/hooks/use-gis.d.ts +17 -0
- package/dist/react/hooks/use-global-skill-stats.d.ts +6 -0
- package/dist/react/hooks/use-input-history.d.ts +7 -0
- package/dist/react/hooks/use-model-preferences.d.ts +17 -0
- package/dist/react/hooks/use-registry.d.ts +53 -0
- package/dist/react/hooks/use-resolved-model.d.ts +5 -0
- package/dist/react/hooks/use-session.d.ts +10 -0
- package/dist/react/hooks/use-skill-stats.d.ts +7 -0
- package/dist/react/hooks/use-skills.d.ts +6 -0
- package/dist/react/hooks/use-token-pressure.d.ts +6 -0
- package/dist/react/index.d.ts +121 -2111
- package/dist/react/index.js +41 -97
- package/dist/react/index.js.map +1 -1
- package/dist/react/lib/analytics.d.ts +7 -0
- package/dist/react/lib/attachment-upload.d.ts +10 -0
- package/dist/react/lib/card-registry.d.ts +35 -0
- package/dist/react/lib/chat.d.ts +48 -0
- package/dist/react/lib/code-highlight.d.ts +9 -0
- package/dist/react/lib/html-element-selection.d.ts +140 -0
- package/dist/react/lib/html-source-locator.d.ts +16 -0
- package/dist/react/lib/open-session-file.d.ts +2 -0
- package/dist/react/lib/parent-bridge.d.ts +22 -0
- package/dist/react/lib/preview-dispatch.d.ts +24 -0
- package/dist/react/lib/resource-bridge.d.ts +11 -0
- package/dist/react/lib/session-file-preview.d.ts +8 -0
- package/dist/react/lib/step-ranges.d.ts +42 -0
- package/dist/react/lib/tool-preview.d.ts +2 -0
- package/dist/react/lib/ui-meta.d.ts +9 -0
- package/dist/react/lib/utils.d.ts +3 -0
- package/dist/react/lib/whatif-prompt.d.ts +45 -0
- package/dist/react/projection/builder.d.ts +59 -0
- package/dist/react/projection/helpers.d.ts +34 -0
- package/dist/react/projection/index.d.ts +2 -0
- package/dist/react/projection/state.d.ts +22 -0
- package/dist/react/provider.d.ts +8 -0
- package/dist/react/routes.d.ts +1 -0
- package/dist/react/schemas/background.d.ts +16 -0
- package/dist/react/schemas/event.d.ts +51 -0
- package/dist/react/schemas/gis.d.ts +50 -0
- package/dist/{AskUserQuestionBlock---kOTouk.d.ts → react/schemas/message.d.ts} +15 -48
- package/dist/react/schemas/partner-skill.d.ts +46 -0
- package/dist/{projection-BWYEFYNn.d.ts → react/schemas/projection.d.ts} +12 -10
- package/dist/react/schemas/published-apps.d.ts +38 -0
- package/dist/react/schemas/scheduled-task.d.ts +32 -0
- package/dist/react/schemas/session.d.ts +121 -0
- package/dist/react/schemas/skill.d.ts +50 -0
- package/dist/react/schemas/studio/agent.d.ts +12 -0
- package/dist/react/schemas/studio/database.d.ts +39 -0
- package/dist/react/schemas/studio/env.d.ts +7 -0
- package/dist/react/schemas/studio/knowledge.d.ts +18 -0
- package/dist/react/schemas/studio/resource-base.d.ts +7 -0
- package/dist/react/schemas/studio/scene.d.ts +12 -0
- package/dist/react/schemas/studio/tool.d.ts +25 -0
- package/dist/react/schemas/task.d.ts +12 -0
- package/dist/react/sockets/event-bridge.d.ts +115 -0
- package/dist/react/sockets/socket-state.d.ts +4 -0
- package/dist/react/stores/answer-callback-store.d.ts +9 -0
- package/dist/react/stores/auth-store.d.ts +38 -0
- package/dist/react/stores/background-store.d.ts +13 -0
- package/dist/react/stores/card-state-store.d.ts +10 -0
- package/dist/react/stores/chat-store.d.ts +34 -0
- package/dist/react/stores/client-aware.d.ts +7 -0
- package/dist/react/stores/connection-store.d.ts +14 -0
- package/dist/react/stores/gis-store.d.ts +19 -0
- package/dist/react/stores/index.d.ts +14 -0
- package/dist/react/stores/runtime-features-store.d.ts +21 -0
- package/dist/react/stores/runtime-store.d.ts +18 -0
- package/dist/react/stores/session-store.d.ts +44 -0
- package/dist/react/stores/task-store.d.ts +9 -0
- package/dist/react/stores/ui-bridge-store.d.ts +32 -0
- package/dist/react/stores/ui-store.d.ts +69 -0
- package/dist/react/types/index.d.ts +7 -0
- package/dist/react/types/solution.d.ts +101 -0
- package/package.json +41 -12
- package/dist/SkillStatusBar-DluiBsVj.d.ts +0 -340
- package/dist/blade-client-CseN7OW9.d.ts +0 -1867
- package/dist/chunk-7F6UP5LP.js.map +0 -1
- package/dist/chunk-IMMRWXI7.js.map +0 -1
- package/dist/react/api/vibe-coding.d.ts +0 -55
- package/dist/react/api/vibe-coding.js +0 -47
- package/dist/react/api/vibe-coding.js.map +0 -1
- package/dist/session-CT8Y2KHr.d.ts +0 -227
- package/dist/sessions-DI9DVun7.d.ts +0 -177
- /package/dist/{chunk-2QYV43YP.js.map → chunk-C2FKVGJU.js.map} +0 -0
- /package/dist/{chunk-TYM7KL2L.js.map → chunk-JU5SL4HP.js.map} +0 -0
- /package/dist/{chunk-BQKF6HJH.js.map → chunk-TE6G6NVX.js.map} +0 -0
- /package/dist/{chunk-ICV7OTGX.js.map → chunk-X2NJKKXR.js.map} +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ToolCallInfo } from "../../schemas/message.js";
|
|
2
|
+
import type { ContentBlock } from "../../schemas/projection.js";
|
|
3
|
+
import { type AskUserAnswerData } from "./AskUserQuestionBlock.js";
|
|
4
|
+
import type { ChatViewCustomization } from "./customization.js";
|
|
5
|
+
interface Props {
|
|
6
|
+
toolCall: ToolCallInfo;
|
|
7
|
+
onAnswer?: (answer: string, toolCallId: string, answerData: AskUserAnswerData) => void;
|
|
8
|
+
answered?: boolean;
|
|
9
|
+
answerData?: AskUserAnswerData;
|
|
10
|
+
sessionId?: string;
|
|
11
|
+
sessionStatus?: string;
|
|
12
|
+
level?: 1 | 2;
|
|
13
|
+
turnBlocks?: ContentBlock[];
|
|
14
|
+
reasoning?: string;
|
|
15
|
+
customization?: ChatViewCustomization;
|
|
16
|
+
}
|
|
17
|
+
export declare function ToolCallBlock({ toolCall, onAnswer, answered, answerData, sessionId: providedSessionId, sessionStatus, level, turnBlocks, reasoning, customization, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface TurnNavItem {
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
}
|
|
5
|
+
interface TurnNavRailProps {
|
|
6
|
+
items: TurnNavItem[];
|
|
7
|
+
activeTurnId: string | null;
|
|
8
|
+
onSelectTurn: (turnId: string) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function TurnNavRail({ items, activeTurnId, onSelectTurn, }: TurnNavRailProps): import("react/jsx-runtime").JSX.Element | null;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ChatMessage } from "../../schemas/message.js";
|
|
2
|
+
export type UserChatMessage = ChatMessage & {
|
|
3
|
+
role: "user";
|
|
4
|
+
};
|
|
5
|
+
export type ErrorChatMessage = ChatMessage & {
|
|
6
|
+
role: "error";
|
|
7
|
+
};
|
|
8
|
+
export declare function isUserMessage(message: ChatMessage): message is UserChatMessage;
|
|
9
|
+
export declare function isErrorMessage(message: ChatMessage): message is ErrorChatMessage;
|
|
10
|
+
interface UserMessageProps {
|
|
11
|
+
message: UserChatMessage;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const USER_MESSAGE_MARKDOWN_CLASS = "prose prose-sm prose-invert max-w-none [&_li>p]:inline [&_li>p]:whitespace-pre-wrap [&_p]:mb-3 [&_p]:whitespace-pre-wrap [&_p:last-child]:mb-0";
|
|
15
|
+
export declare function UserMessageBubble({ message, className }: UserMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function ErrorMessageBlock({ message, className, }: {
|
|
17
|
+
message: ErrorChatMessage;
|
|
18
|
+
className?: string;
|
|
19
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ParsedWhatIfPrompt } from "../../lib/whatif-prompt.js";
|
|
2
|
+
interface Props {
|
|
3
|
+
parsed: ParsedWhatIfPrompt;
|
|
4
|
+
/** 点击引用 chip 时回调。如果未传,尝试从 WhatIfQuoteProvider 取;两者都无则 chip 不可点。 */
|
|
5
|
+
onQuoteClick?: (stepNumber: number) => void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* what-if 重跑 prompt 的紧凑展示:小徽章 + 步骤跳转 chip + 用户真正输入气泡。
|
|
9
|
+
* 原 prompt 里夹带的 snapshot markdown 不再全量展开——它们对 LLM 有用,
|
|
10
|
+
* 但对用户只会造成噪音;点 chip 可以跳到对应 step 卡查看。
|
|
11
|
+
*/
|
|
12
|
+
export declare function WhatIfUserBubble({ parsed, onQuoteClick }: Props): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { type ComponentType, type ReactNode } from "react";
|
|
2
|
+
import type { ChatMessage, ToolCallInfo } from "../../schemas/message.js";
|
|
3
|
+
import type { ContentBlock } from "../../schemas/projection.js";
|
|
4
|
+
import type { AskUserAnswerData } from "./AskUserQuestionBlock.js";
|
|
5
|
+
import type { ErrorChatMessage, UserChatMessage } from "./UserMessageBubble.js";
|
|
6
|
+
export type ChatViewClassNames = Partial<{
|
|
7
|
+
root: string;
|
|
8
|
+
viewerBanner: string;
|
|
9
|
+
messageListRoot: string;
|
|
10
|
+
messageListContent: string;
|
|
11
|
+
messageListInner: string;
|
|
12
|
+
emptyState: string;
|
|
13
|
+
userMessage: string;
|
|
14
|
+
errorMessage: string;
|
|
15
|
+
assistantTurn: string;
|
|
16
|
+
assistantText: string;
|
|
17
|
+
toolCall: string;
|
|
18
|
+
chatInputRoot: string;
|
|
19
|
+
chatInputInner: string;
|
|
20
|
+
skillStatusBarRoot: string;
|
|
21
|
+
skillStatusBarInner: string;
|
|
22
|
+
}>;
|
|
23
|
+
export interface ChatViewComponents {
|
|
24
|
+
EmptyState?: ComponentType;
|
|
25
|
+
UserMessage?: ComponentType<{
|
|
26
|
+
message: UserChatMessage;
|
|
27
|
+
className?: string;
|
|
28
|
+
}>;
|
|
29
|
+
ErrorMessage?: ComponentType<{
|
|
30
|
+
message: ErrorChatMessage;
|
|
31
|
+
className?: string;
|
|
32
|
+
}>;
|
|
33
|
+
AssistantTurn?: ComponentType<AssistantTurnComponentProps>;
|
|
34
|
+
ToolCall?: ComponentType<ToolCallComponentProps>;
|
|
35
|
+
SkillStatusBar?: ComponentType<SkillStatusBarComponentProps>;
|
|
36
|
+
}
|
|
37
|
+
export interface ChatViewRenderers {
|
|
38
|
+
tool?: Record<string, ComponentType<ToolRendererProps>>;
|
|
39
|
+
}
|
|
40
|
+
export interface ChatViewCustomization {
|
|
41
|
+
classNames?: ChatViewClassNames;
|
|
42
|
+
components?: ChatViewComponents;
|
|
43
|
+
renderers?: ChatViewRenderers;
|
|
44
|
+
}
|
|
45
|
+
export interface AssistantTurnComponentProps {
|
|
46
|
+
turnKey: string;
|
|
47
|
+
sessionId: string;
|
|
48
|
+
messages: ChatMessage[];
|
|
49
|
+
isStreaming?: boolean;
|
|
50
|
+
isLastTurn?: boolean;
|
|
51
|
+
askAnswers?: Record<string, AskUserAnswerData>;
|
|
52
|
+
onAnswer?: (answer: string, toolCallId: string, answerData: AskUserAnswerData) => void;
|
|
53
|
+
sessionStatus?: string;
|
|
54
|
+
level?: 1 | 2;
|
|
55
|
+
forceExpanded?: boolean;
|
|
56
|
+
customization?: ChatViewCustomization;
|
|
57
|
+
}
|
|
58
|
+
export interface ToolCallComponentProps {
|
|
59
|
+
toolCall: ToolCallInfo;
|
|
60
|
+
onAnswer?: (answer: string, toolCallId: string, answerData: AskUserAnswerData) => void;
|
|
61
|
+
answered?: boolean;
|
|
62
|
+
answerData?: AskUserAnswerData;
|
|
63
|
+
sessionId?: string;
|
|
64
|
+
sessionStatus?: string;
|
|
65
|
+
level?: 1 | 2;
|
|
66
|
+
turnBlocks?: ContentBlock[];
|
|
67
|
+
reasoning?: string;
|
|
68
|
+
customization?: ChatViewCustomization;
|
|
69
|
+
}
|
|
70
|
+
export interface ToolRendererProps {
|
|
71
|
+
toolCall: ToolCallInfo;
|
|
72
|
+
sessionId?: string;
|
|
73
|
+
}
|
|
74
|
+
export interface SkillStatusBarComponentProps {
|
|
75
|
+
sessionId: string;
|
|
76
|
+
onResync?: () => void;
|
|
77
|
+
isResyncing?: boolean;
|
|
78
|
+
vertical?: boolean;
|
|
79
|
+
className?: string;
|
|
80
|
+
innerClassName?: string;
|
|
81
|
+
}
|
|
82
|
+
export declare function renderOptionalComponent<TProps extends object>(Component: ComponentType<TProps> | undefined, props: TProps): ReactNode;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ChatMessage, ToolCallInfo } from "../../schemas/message.js";
|
|
2
|
+
export type ToolTone = "emerald" | "blue" | "amber" | "red";
|
|
3
|
+
export interface ToolSummaryTag {
|
|
4
|
+
key: string;
|
|
5
|
+
label: string;
|
|
6
|
+
tone: "emerald" | "blue";
|
|
7
|
+
}
|
|
8
|
+
export declare function formatToolName(name: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* Returns a context-aware Chinese display label for a tool call.
|
|
11
|
+
* All system tools now have a `description` argument — use it as primary label.
|
|
12
|
+
*/
|
|
13
|
+
export declare function getToolDisplayLabel(toolCall: ToolCallInfo): string;
|
|
14
|
+
export declare function getToolTone(status?: ToolCallInfo["status"]): ToolTone;
|
|
15
|
+
export declare function getToolStatusLabel(status?: ToolCallInfo["status"]): string;
|
|
16
|
+
export declare function getAggregateToolTone(toolCalls: ToolCallInfo[]): ToolTone;
|
|
17
|
+
export declare function extractToolFilePath(toolCall: ToolCallInfo): string | null;
|
|
18
|
+
export declare function getToolOutputTag(toolCall: ToolCallInfo): ToolSummaryTag | null;
|
|
19
|
+
export declare function isSuccessfulToolCall(toolCall: ToolCallInfo): boolean;
|
|
20
|
+
export declare function countSuccessfulToolCalls(toolCalls: ToolCallInfo[]): number;
|
|
21
|
+
export declare function countPendingToolCalls(toolCalls: ToolCallInfo[]): number;
|
|
22
|
+
export declare function formatToolCallCount(count: number): string;
|
|
23
|
+
export declare function summarizeToolCalls(toolCalls: ToolCallInfo[]): ToolSummaryTag[];
|
|
24
|
+
export declare function hasNaturalLanguageText(message: ChatMessage): boolean;
|
|
25
|
+
export declare function findAnchorMessageIndex(messages: ChatMessage[]): number;
|
|
26
|
+
export declare function getCollapsedTurnSegments(messages: ChatMessage[]): {
|
|
27
|
+
anchorIndex: number;
|
|
28
|
+
summaryMessages: ChatMessage[];
|
|
29
|
+
visibleMessages: ChatMessage[];
|
|
30
|
+
};
|
|
31
|
+
export declare function getLatestPendingToolName(toolCalls: ToolCallInfo[]): string | null;
|
|
32
|
+
export declare function getFinishTaskTitle(toolCalls: ToolCallInfo[]): string | null;
|
|
33
|
+
export declare function getTextContentSegments(messages: ChatMessage[]): string[];
|
|
34
|
+
export declare function getLastTextSegment(messages: ChatMessage[]): string;
|
|
35
|
+
export declare function countMessageLines(message: ChatMessage): number;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PluginKey } from "@tiptap/pm/state";
|
|
2
|
+
export interface FileMentionAttrs {
|
|
3
|
+
path: string;
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
6
|
+
export interface FileSuggestionItem {
|
|
7
|
+
path: string;
|
|
8
|
+
name: string;
|
|
9
|
+
is_dir: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const fileMentionSuggestionKey: PluginKey<any>;
|
|
12
|
+
export declare const FileMention: import("@tiptap/core").Node<import("@tiptap/extension-mention").MentionOptions<any, import("@tiptap/extension-mention").MentionNodeAttrs>, any>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { PluginKey } from "@tiptap/pm/state";
|
|
2
|
+
export interface SkillMentionAttrs {
|
|
3
|
+
skillId: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
description: string;
|
|
6
|
+
}
|
|
7
|
+
export interface SkillOnlySuggestionItem {
|
|
8
|
+
skillId: string;
|
|
9
|
+
displayName?: string;
|
|
10
|
+
description: string;
|
|
11
|
+
local?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface SkillCommandSuggestionItem {
|
|
14
|
+
type: "command";
|
|
15
|
+
id: string;
|
|
16
|
+
label: string;
|
|
17
|
+
description: string;
|
|
18
|
+
}
|
|
19
|
+
export interface SkillSuggestionSkillItem extends SkillOnlySuggestionItem {
|
|
20
|
+
type: "skill";
|
|
21
|
+
}
|
|
22
|
+
export type SkillSuggestionItem = SkillSuggestionSkillItem | SkillCommandSuggestionItem;
|
|
23
|
+
export declare const COMMANDS: SkillCommandSuggestionItem[];
|
|
24
|
+
export declare const skillMentionSuggestionKey: PluginKey<any>;
|
|
25
|
+
export declare const SkillMention: import("@tiptap/core").Node<import("@tiptap/extension-mention").MentionOptions<any, import("@tiptap/extension-mention").MentionNodeAttrs>, any>;
|
|
@@ -1,115 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
* R6:用户上传的附件(文本 / 未知类型)预览弹窗。
|
|
18
|
-
*
|
|
19
|
-
* 图片走独立的 ImageLightbox;本组件处理:
|
|
20
|
-
* - .md → markdown 渲染
|
|
21
|
-
* - .json / .txt / .yaml / .yml / 其他文本 → 纯文本等宽展示
|
|
22
|
-
* - 不可在浏览器内渲染的类型 → 下载链接兜底
|
|
23
|
-
*
|
|
24
|
-
* 无 URL 时兜底为只显示文件名 + 下载入口。
|
|
25
|
-
*/
|
|
26
|
-
interface Props$3 {
|
|
27
|
-
open: boolean;
|
|
28
|
-
onOpenChange: (open: boolean) => void;
|
|
29
|
-
filename: string;
|
|
30
|
-
/**
|
|
31
|
-
* 由调用方用 `getAuthedUrl()` 构造的完整 URL(baseUrl + 路径 + ?token=…)。
|
|
32
|
-
* 内部 fetch 直接用原串,**不**再走 `apiFetchText` —— 否则会二次拼 baseUrl,
|
|
33
|
-
* 在独立前后端部署时会得到形如 `http://api.xxxhttp://api.xxx/…` 的非法 URL。
|
|
34
|
-
* token 靠 query 字符串携带,因此也不需要再挂 Authorization header。
|
|
35
|
-
*/
|
|
36
|
-
url: string | null;
|
|
37
|
-
/** text-like 视为"可文本预览";其他只显示下载按钮。 */
|
|
38
|
-
mode: "markdown" | "text" | "default";
|
|
39
|
-
}
|
|
40
|
-
declare function AttachmentPreviewDialog({ open, onOpenChange, filename, url, mode }: Props$3): react.ReactPortal | null;
|
|
41
|
-
|
|
42
|
-
interface ImageLightboxProps {
|
|
43
|
-
open: boolean;
|
|
44
|
-
onOpenChange: (open: boolean) => void;
|
|
45
|
-
images: {
|
|
46
|
-
src: string;
|
|
47
|
-
alt: string;
|
|
48
|
-
}[];
|
|
49
|
-
initialIndex?: number;
|
|
50
|
-
}
|
|
51
|
-
declare function ImageLightbox({ open, onOpenChange, images, initialIndex }: ImageLightboxProps): react.ReactPortal | null;
|
|
52
|
-
|
|
53
|
-
declare function CompactionCard({ sessionId, compaction, status, }: {
|
|
54
|
-
sessionId: string;
|
|
55
|
-
compaction?: CompactionInfo | null;
|
|
56
|
-
status?: "streaming" | "completed" | "paused" | "failed" | "interrupted";
|
|
57
|
-
}): react_jsx_runtime.JSX.Element | null;
|
|
58
|
-
|
|
59
|
-
interface Props$2 {
|
|
60
|
-
turnKey: string;
|
|
61
|
-
sessionId: string;
|
|
62
|
-
messages: ChatMessage[];
|
|
63
|
-
isStreaming?: boolean;
|
|
64
|
-
isLastTurn?: boolean;
|
|
65
|
-
askAnswers?: Record<string, AskUserAnswerData>;
|
|
66
|
-
onAnswer?: (answer: string, toolCallId: string, answerData: AskUserAnswerData) => void;
|
|
67
|
-
sessionStatus?: string;
|
|
68
|
-
level?: 1 | 2;
|
|
69
|
-
forceExpanded?: boolean;
|
|
70
|
-
customization?: ChatViewCustomization;
|
|
71
|
-
}
|
|
72
|
-
declare function AssistantTurnBlockBase({ sessionId, messages: rawMessages, isStreaming, askAnswers, onAnswer, sessionStatus, level, forceExpanded, customization, }: Props$2): react_jsx_runtime.JSX.Element;
|
|
73
|
-
declare const AssistantTurnBlock: react.MemoExoticComponent<typeof AssistantTurnBlockBase>;
|
|
74
|
-
|
|
75
|
-
interface Props$1 {
|
|
76
|
-
toolCall: ToolCallInfo;
|
|
77
|
-
onAnswer?: (answer: string, toolCallId: string, answerData: AskUserAnswerData) => void;
|
|
78
|
-
answered?: boolean;
|
|
79
|
-
answerData?: AskUserAnswerData;
|
|
80
|
-
sessionId?: string;
|
|
81
|
-
sessionStatus?: string;
|
|
82
|
-
level?: 1 | 2;
|
|
83
|
-
turnBlocks?: ContentBlock[];
|
|
84
|
-
reasoning?: string;
|
|
85
|
-
customization?: ChatViewCustomization;
|
|
86
|
-
}
|
|
87
|
-
declare function ToolCallBlock({ toolCall, onAnswer, answered, answerData, sessionId: providedSessionId, sessionStatus, level, turnBlocks, reasoning, customization, }: Props$1): react_jsx_runtime.JSX.Element;
|
|
88
|
-
|
|
89
|
-
interface Props {
|
|
90
|
-
parsed: ParsedWhatIfPrompt;
|
|
91
|
-
/** 点击引用 chip 时回调。如果未传,尝试从 WhatIfQuoteProvider 取;两者都无则 chip 不可点。 */
|
|
92
|
-
onQuoteClick?: (stepNumber: number) => void;
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* what-if 重跑 prompt 的紧凑展示:小徽章 + 步骤跳转 chip + 用户真正输入气泡。
|
|
96
|
-
* 原 prompt 里夹带的 snapshot markdown 不再全量展开——它们对 LLM 有用,
|
|
97
|
-
* 但对用户只会造成噪音;点 chip 可以跳到对应 step 卡查看。
|
|
98
|
-
*/
|
|
99
|
-
declare function WhatIfUserBubble({ parsed, onQuoteClick }: Props): react_jsx_runtime.JSX.Element;
|
|
100
|
-
|
|
101
|
-
interface WhatIfQuoteContextValue {
|
|
102
|
-
onJumpToStep?: (stepNumber: number) => void;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Provide a callback used by `WhatIfUserBubble`'s quote chip to navigate to
|
|
106
|
-
* the corresponding step card. Host apps (ship-attack) mount this provider
|
|
107
|
-
* near the chat view and wire it to their step selector.
|
|
108
|
-
*/
|
|
109
|
-
declare function WhatIfQuoteProvider({ onJumpToStep, children, }: {
|
|
110
|
-
onJumpToStep?: (stepNumber: number) => void;
|
|
111
|
-
children: ReactNode;
|
|
112
|
-
}): react_jsx_runtime.JSX.Element;
|
|
113
|
-
declare function useWhatIfQuoteContext(): WhatIfQuoteContextValue;
|
|
114
|
-
|
|
115
|
-
export { AssistantTurnBlock, AttachmentPreviewDialog, ChatViewCustomization, CompactionCard, ImageLightbox, ToolCallBlock, WhatIfQuoteProvider, WhatIfUserBubble, useWhatIfQuoteContext };
|
|
1
|
+
export { ChatView, type ChatViewProps } from "./ChatView.js";
|
|
2
|
+
export { AttachmentPreviewDialog } from "./AttachmentPreviewDialog.js";
|
|
3
|
+
export { ChatInput, type ChatSendOptions, type FileComposerAttachment } from "./ChatInput.js";
|
|
4
|
+
export { ThinkingToggle } from "./ThinkingToggle.js";
|
|
5
|
+
export { FileSizeLimitDialog } from "./FileSizeLimitDialog.js";
|
|
6
|
+
export { ImageLightbox } from "./ImageLightbox.js";
|
|
7
|
+
export { CompactionCard } from "./CompactionCard.js";
|
|
8
|
+
export { MessageList } from "./MessageList.js";
|
|
9
|
+
export { SkillStatusBar } from "./SkillStatusBar.js";
|
|
10
|
+
export { AssistantTurnBlock } from "./AssistantTurnBlock.js";
|
|
11
|
+
export { UserMessageBubble, ErrorMessageBlock, isUserMessage, isErrorMessage, } from "./UserMessageBubble.js";
|
|
12
|
+
export { ToolCallBlock } from "./ToolCallBlock.js";
|
|
13
|
+
export { AskUserQuestionBlock } from "./AskUserQuestionBlock.js";
|
|
14
|
+
export { WhatIfUserBubble } from "./WhatIfUserBubble.js";
|
|
15
|
+
export { WhatIfQuoteProvider, useWhatIfQuoteContext } from "./whatif-quote-context.js";
|
|
16
|
+
export type { AssistantTurnComponentProps, ChatViewClassNames, ChatViewComponents, ChatViewCustomization, ChatViewRenderers, SkillStatusBarComponentProps, ToolCallComponentProps, ToolRendererProps, } from "./customization.js";
|
|
@@ -17,16 +17,16 @@ import {
|
|
|
17
17
|
isErrorMessage,
|
|
18
18
|
isUserMessage,
|
|
19
19
|
useWhatIfQuoteContext
|
|
20
|
-
} from "../../../chunk-
|
|
20
|
+
} from "../../../chunk-X2NJKKXR.js";
|
|
21
|
+
import "../../../chunk-H62LH2AG.js";
|
|
21
22
|
import {
|
|
22
23
|
AskUserQuestionBlock
|
|
23
|
-
} from "../../../chunk-
|
|
24
|
+
} from "../../../chunk-TE6G6NVX.js";
|
|
25
|
+
import "../../../chunk-C2FKVGJU.js";
|
|
24
26
|
import "../../../chunk-2UP7MG3J.js";
|
|
25
|
-
import "../../../chunk-
|
|
26
|
-
import "../../../chunk-2QYV43YP.js";
|
|
27
|
-
import "../../../chunk-IMMRWXI7.js";
|
|
27
|
+
import "../../../chunk-SBASG3M2.js";
|
|
28
28
|
import "../../../chunk-J3XVFPOV.js";
|
|
29
|
-
import "../../../chunk-
|
|
29
|
+
import "../../../chunk-34GDDOWY.js";
|
|
30
30
|
import "../../../chunk-7LEKQI47.js";
|
|
31
31
|
import "../../../chunk-JCJFFJ42.js";
|
|
32
32
|
import "../../../chunk-PZ5AY32C.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ComponentType } from "react";
|
|
2
|
+
import type { ToolCallInfo } from "../../../schemas/message.js";
|
|
3
|
+
export interface ToolRendererProps {
|
|
4
|
+
toolCall: ToolCallInfo;
|
|
5
|
+
sessionId?: string;
|
|
6
|
+
}
|
|
7
|
+
type ToolRenderer = ComponentType<ToolRendererProps>;
|
|
8
|
+
export declare function getRenderer(toolName: string): ToolRenderer | null;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 从工具结果中提取纯文本。如果 result 是多模态 list 则提取 text parts;
|
|
3
|
+
* 如果是 string 则原样返回。
|
|
4
|
+
*/
|
|
5
|
+
export declare function getResultText(result: unknown): string | null;
|
|
6
|
+
/**
|
|
7
|
+
* 从工具结果中提取图片 URL 列表(data:image/... base64 或 http URL)。
|
|
8
|
+
*/
|
|
9
|
+
export declare function getResultImageUrls(result: unknown): string[];
|
|
10
|
+
export declare function parseJsonValue(value?: string | null): unknown;
|
|
11
|
+
export declare function isPlainObject(value: unknown): value is Record<string, unknown>;
|
|
12
|
+
export declare function getStringValue(data: Record<string, unknown> | null, key: string): string | null;
|
|
13
|
+
export declare function getNumberValue(data: Record<string, unknown> | null, key: string): number | null;
|
|
14
|
+
export declare function getBooleanValue(data: Record<string, unknown> | null, key: string): boolean;
|
|
15
|
+
export declare function extractErrorMessage(value?: unknown): string | null;
|
|
16
|
+
export declare function getFileName(filePath?: string | null): string;
|
|
17
|
+
export declare function getCodeLanguage(filePath?: string | null): string | null;
|
|
18
|
+
export declare function formatBytes(size?: number | null): string | null;
|
|
19
|
+
interface CodePreviewProps {
|
|
20
|
+
content: string;
|
|
21
|
+
filePath?: string | null;
|
|
22
|
+
emptyLabel?: string;
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare function CodePreview({ content, filePath, emptyLabel, className, }: CodePreviewProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
interface WhatIfQuoteContextValue {
|
|
3
|
+
onJumpToStep?: (stepNumber: number) => void;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Provide a callback used by `WhatIfUserBubble`'s quote chip to navigate to
|
|
7
|
+
* the corresponding step card. Host apps (ship-attack) mount this provider
|
|
8
|
+
* near the chat view and wire it to their step selector.
|
|
9
|
+
*/
|
|
10
|
+
export declare function WhatIfQuoteProvider({ onJumpToStep, children, }: {
|
|
11
|
+
onJumpToStep?: (stepNumber: number) => void;
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function useWhatIfQuoteContext(): WhatIfQuoteContextValue;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef } from "react";
|
|
2
|
+
import type { ExtraProps } from "streamdown";
|
|
3
|
+
type FileCardProps = ComponentPropsWithRef<"span"> & ExtraProps & {
|
|
4
|
+
"data-rel-path"?: string;
|
|
5
|
+
"data-name"?: string;
|
|
6
|
+
dataRelPath?: string;
|
|
7
|
+
dataName?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function FileCardComponent({ node, "data-rel-path": dataRelPathAttribute, "data-name": dataNameAttribute, dataRelPath, dataName, children, className, ...props }: FileCardProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
|
+
import { type ExtraProps, Streamdown } from "streamdown";
|
|
3
|
+
type StreamdownProps = ComponentProps<typeof Streamdown>;
|
|
4
|
+
export declare function resolveCollapsedContent({ dataKeyAttribute, dataRawAttribute, dataKey, dataRaw, node, children, }: {
|
|
5
|
+
dataKeyAttribute?: string;
|
|
6
|
+
dataRawAttribute?: string;
|
|
7
|
+
dataKey?: string;
|
|
8
|
+
dataRaw?: string;
|
|
9
|
+
node?: ExtraProps["node"];
|
|
10
|
+
children?: unknown;
|
|
11
|
+
}): string;
|
|
12
|
+
export declare function collapseMediaTags(children: string, sessionId: string): string;
|
|
13
|
+
export declare function collapseInlineToolCalls(children: string): string;
|
|
14
|
+
type MarkdownContentProps = StreamdownProps & {
|
|
15
|
+
/** 当提供时,markdown 中相对路径的 <img> src 会解析为 session 工作区文件 URL */
|
|
16
|
+
sessionId?: string;
|
|
17
|
+
};
|
|
18
|
+
export declare function MarkdownContent({ allowedTags, children, components, mode, plugins, sessionId, ...props }: MarkdownContentProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type ModelSelectorProps = {
|
|
2
|
+
value: string;
|
|
3
|
+
onValueChange: (model: string) => void;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
compact?: boolean;
|
|
6
|
+
placement?: "top" | "bottom";
|
|
7
|
+
};
|
|
8
|
+
export declare function ModelSelector({ value, onValueChange, disabled, compact, placement, }: ModelSelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ChatMessage } from "../../schemas/message.js";
|
|
2
|
+
interface Props {
|
|
3
|
+
messages: ChatMessage[];
|
|
4
|
+
sessionStatus?: string;
|
|
5
|
+
onConfirmPlan?: (action: "execute" | "revise", text?: string) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function PlanSummaryCard({ messages, sessionStatus, onConfirmPlan, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ChatMessage } from "../../schemas/message.js";
|
|
2
|
+
import { type AskUserAnswerData } from "../chat/AskUserQuestionBlock.js";
|
|
3
|
+
import type { SkillCatalogItem } from "./types.js";
|
|
4
|
+
interface Props {
|
|
5
|
+
messages: ChatMessage[];
|
|
6
|
+
/** All skill names from the registry, used as word cloud background in Phase 1 */
|
|
7
|
+
allSkillNames?: SkillCatalogItem[];
|
|
8
|
+
onAnswer?: (answer: string, toolCallId: string, answerData: AskUserAnswerData) => void;
|
|
9
|
+
sessionStatus?: string;
|
|
10
|
+
isStreaming?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function PlanVisualization({ messages: rawMessages, allSkillNames: rawAllSkillNames, onAnswer, sessionStatus, isStreaming, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Debug logger for Plan timeline events.
|
|
3
|
+
* Stores events in memory with timestamps for debugging animation timing
|
|
4
|
+
* in real conversation environments.
|
|
5
|
+
*
|
|
6
|
+
* Events are stored in window.__planTimelineLog and can be exported as JSON.
|
|
7
|
+
*/
|
|
8
|
+
export interface PlanTimelineEvent {
|
|
9
|
+
/** ISO timestamp */
|
|
10
|
+
ts: string;
|
|
11
|
+
/** Milliseconds since first event in this session */
|
|
12
|
+
elapsed: number;
|
|
13
|
+
/** Event type */
|
|
14
|
+
event: string;
|
|
15
|
+
/** Additional data */
|
|
16
|
+
data?: Record<string, unknown>;
|
|
17
|
+
}
|
|
18
|
+
export declare function logPlanEvent(event: string, data?: Record<string, unknown>): void;
|
|
19
|
+
export declare function clearPlanLog(): void;
|
|
20
|
+
export declare function exportPlanLog(): PlanTimelineEvent[];
|
|
21
|
+
export declare function downloadPlanLog(): void;
|