@blade-hq/agent-kit 1.0.25 → 1.0.28
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-7LEKQI47.js +32 -0
- package/dist/chunk-7LEKQI47.js.map +1 -0
- package/dist/{chunk-3I4ZURKH.js → chunk-BGNKHPCD.js} +223 -50
- package/dist/chunk-BGNKHPCD.js.map +1 -0
- package/dist/{chunk-4D4EXLVT.js → chunk-DQCXSPHP.js} +2 -2
- package/dist/chunk-HCQDDDOX.js +23 -0
- package/dist/chunk-HCQDDDOX.js.map +1 -0
- package/dist/{chunk-QODAKTG5.js → chunk-JCJFFJ42.js} +2 -31
- package/dist/chunk-JCJFFJ42.js.map +1 -0
- package/dist/{chunk-XCIDE3JW.js → chunk-OGHUIKCY.js} +7 -7
- package/dist/{chunk-WPLEMYL7.js → chunk-PYYDXV2A.js} +2 -2
- package/dist/{chunk-VJY6RLYU.js → chunk-TVWC3PED.js} +2 -2
- package/dist/{chunk-WVXXQ3KM.js → chunk-UWNQ4PXK.js} +134 -1201
- package/dist/chunk-UWNQ4PXK.js.map +1 -0
- package/dist/{chunk-M45K3554.js → chunk-YJ6BX3FU.js} +1382 -32
- package/dist/chunk-YJ6BX3FU.js.map +1 -0
- package/dist/client/auth.d.ts +8 -0
- package/dist/client/blade-client.d.ts +82 -0
- package/dist/client/index.d.ts +23 -15348
- package/dist/client/index.js +3 -1
- package/dist/client/resources/api-keys.d.ts +28 -0
- package/dist/client/resources/app-dev-templates.d.ts +93 -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 +26 -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/shared/projection/builder.d.ts +59 -0
- package/dist/client/shared/projection/helpers.d.ts +34 -0
- package/dist/client/shared/projection/history.d.ts +12 -0
- package/dist/client/shared/projection/index.d.ts +3 -0
- package/dist/client/shared/projection/state.d.ts +22 -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 +16316 -0
- package/dist/client/types/sdk-profile.d.ts +47 -0
- package/dist/client/types/socket-events.d.ts +389 -0
- package/dist/react/api/api-keys.d.ts +6 -0
- package/dist/react/api/app-dev-templates.d.ts +5 -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/model-config.d.ts +68 -0
- package/dist/react/api/models.d.ts +13 -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/cards/register.js +3 -2
- package/dist/react/cards/register.js.map +1 -1
- 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 +18 -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 +15 -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 +8 -7
- package/dist/react/components/chat/scroll-anchor.d.ts +8 -0
- 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 +7 -6
- package/dist/react/components/plan/index.js.map +1 -1
- 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 +6 -5
- package/dist/react/components/session/index.js.map +1 -1
- 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 +6 -5
- package/dist/react/components/workspace/index.js.map +1 -1
- 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 +18 -0
- package/dist/react/hooks/use-registry.d.ts +53 -0
- package/dist/react/hooks/use-resolved-model.d.ts +6 -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 +124 -2034
- package/dist/react/index.js +125 -50
- 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/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 -11
- package/dist/SkillStatusBar-U6fbQxMu.d.ts +0 -340
- package/dist/blade-client-qTOovekU.d.ts +0 -1609
- package/dist/chunk-3I4ZURKH.js.map +0 -1
- package/dist/chunk-M45K3554.js.map +0 -1
- package/dist/chunk-QODAKTG5.js.map +0 -1
- package/dist/chunk-WVXXQ3KM.js.map +0 -1
- package/dist/session-CNnotR90.d.ts +0 -227
- package/dist/sessions-BvfLGbjw.d.ts +0 -177
- /package/dist/{chunk-4D4EXLVT.js.map → chunk-DQCXSPHP.js.map} +0 -0
- /package/dist/{chunk-XCIDE3JW.js.map → chunk-OGHUIKCY.js.map} +0 -0
- /package/dist/{chunk-WPLEMYL7.js.map → chunk-PYYDXV2A.js.map} +0 -0
- /package/dist/{chunk-VJY6RLYU.js.map → chunk-TVWC3PED.js.map} +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { SuggestionProps } from "@tiptap/suggestion";
|
|
2
|
+
import * as sessionsApi from "../../api/sessions.js";
|
|
3
|
+
import type { FileSuggestionItem } from "./extensions/file-mention.js";
|
|
4
|
+
export interface FileCompletionMenuProps extends Omit<SuggestionProps<FileSuggestionItem, FileSuggestionItem>, "command"> {
|
|
5
|
+
command: (props: FileSuggestionItem) => void;
|
|
6
|
+
onExit?: () => void;
|
|
7
|
+
sessionId?: string | null;
|
|
8
|
+
}
|
|
9
|
+
export interface FileCompletionMenuRef {
|
|
10
|
+
onKeyDown: (event: KeyboardEvent) => boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function getFileSuggestionItems(sessionId: string | null, query: string): Promise<sessionsApi.FileEntry[]>;
|
|
13
|
+
export declare const FileCompletionMenu: import("react").ForwardRefExoticComponent<FileCompletionMenuProps & import("react").RefAttributes<FileCompletionMenuRef>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type OversizedFileInfo } from "../../lib/attachment-upload.js";
|
|
2
|
+
interface Props {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onOpenChange: (open: boolean) => void;
|
|
5
|
+
files: OversizedFileInfo[];
|
|
6
|
+
limitBytes?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function FileSizeLimitDialog({ open, onOpenChange, files, limitBytes, }: Props): import("react").ReactPortal | null;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface ImageLightboxProps {
|
|
2
|
+
open: boolean;
|
|
3
|
+
onOpenChange: (open: boolean) => void;
|
|
4
|
+
images: {
|
|
5
|
+
src: string;
|
|
6
|
+
alt: string;
|
|
7
|
+
}[];
|
|
8
|
+
initialIndex?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare function ImageLightbox({ open, onOpenChange, images, initialIndex }: ImageLightboxProps): import("react").ReactPortal | null;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ParsedTextContext } from "../../lib/chat.js";
|
|
2
|
+
interface MessageContextPillsProps {
|
|
3
|
+
contexts: ParsedTextContext[];
|
|
4
|
+
}
|
|
5
|
+
export declare function MessageContextPills({ contexts }: MessageContextPillsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { FileContentPart } from "../../schemas/message.js";
|
|
2
|
+
interface MessageFileAttachmentListProps {
|
|
3
|
+
files: FileContentPart[];
|
|
4
|
+
className?: string;
|
|
5
|
+
/**
|
|
6
|
+
* R6:点击 pill 时的预览回调。不传时 pill 保持纯展示(向后兼容,Home /
|
|
7
|
+
* ChatDev 等复用点零改动)。调用方自己决定 URL 来源 + 渲染什么(lightbox /
|
|
8
|
+
* FilePreviewDialog / 下载等)。
|
|
9
|
+
*/
|
|
10
|
+
onPreview?: (file: FileContentPart) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function MessageFileAttachmentList({ files, className, onPreview, }: MessageFileAttachmentListProps): import("react/jsx-runtime").JSX.Element | null;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ChatMessage } from "../../schemas/message.js";
|
|
2
|
+
import type { AskUserAnswerData } from "./AskUserQuestionBlock.js";
|
|
3
|
+
import type { ChatViewCustomization } from "./customization.js";
|
|
4
|
+
interface Props {
|
|
5
|
+
sessionId: string;
|
|
6
|
+
messages: ChatMessage[];
|
|
7
|
+
onAnswer?: (answer: string, toolCallId: string, answerData: AskUserAnswerData) => void;
|
|
8
|
+
sessionStatus?: string;
|
|
9
|
+
onConfirmPlan?: (action: "execute" | "revise", text?: string) => void;
|
|
10
|
+
customization?: ChatViewCustomization;
|
|
11
|
+
scrollToStartKey?: string | null;
|
|
12
|
+
scrollToEntryKey?: string | null;
|
|
13
|
+
}
|
|
14
|
+
export declare function MessageList({ sessionId, messages: rawMessages, onAnswer, sessionStatus, onConfirmPlan, customization, scrollToStartKey, scrollToEntryKey, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { TokenPressureLevel } from "../../hooks/use-token-pressure.js";
|
|
3
|
+
interface ProgressCircleProps {
|
|
4
|
+
percentage: number;
|
|
5
|
+
level: TokenPressureLevel;
|
|
6
|
+
size?: number;
|
|
7
|
+
strokeWidth?: number;
|
|
8
|
+
detail?: ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function ProgressCircle({ percentage, level, size, strokeWidth, detail, className, }: ProgressCircleProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Component, type ErrorInfo, type ReactNode } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
label: string;
|
|
4
|
+
details?: string;
|
|
5
|
+
resetKey?: string;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
interface State {
|
|
9
|
+
componentStack: string;
|
|
10
|
+
error: Error | null;
|
|
11
|
+
}
|
|
12
|
+
export declare class RenderErrorBoundary extends Component<Props, State> {
|
|
13
|
+
state: State;
|
|
14
|
+
static getDerivedStateFromError(error: Error): State;
|
|
15
|
+
componentDidCatch(error: Error, info: ErrorInfo): void;
|
|
16
|
+
componentDidUpdate(prevProps: Props): void;
|
|
17
|
+
render(): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null | undefined> | null | undefined;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SkillSuggestionItem } from "./extensions/skill-mention.js";
|
|
2
|
+
export interface SkillCompletionMenuProps {
|
|
3
|
+
items: SkillSuggestionItem[];
|
|
4
|
+
command: (item: SkillSuggestionItem) => void;
|
|
5
|
+
}
|
|
6
|
+
export interface SkillCompletionMenuRef {
|
|
7
|
+
onKeyDown: (event: KeyboardEvent) => boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const SkillCompletionMenu: import("react").ForwardRefExoticComponent<SkillCompletionMenuProps & import("react").RefAttributes<SkillCompletionMenuRef>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function SkillStatusBar({ sessionId, onResync, isResyncing, vertical, className, innerClassName, }: {
|
|
2
|
+
sessionId: string;
|
|
3
|
+
onResync?: () => void;
|
|
4
|
+
isResyncing?: boolean;
|
|
5
|
+
vertical?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
innerClassName?: string;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ChatMessage } from "../../schemas/message.js";
|
|
2
|
+
interface StickyStatusBarProps {
|
|
3
|
+
sessionId: string;
|
|
4
|
+
messages: ChatMessage[];
|
|
5
|
+
isStreaming: boolean;
|
|
6
|
+
isLastTurn: boolean;
|
|
7
|
+
onJumpToLatest: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function StickyStatusBar({ sessionId, messages, isStreaming, isLastTurn, onJumpToLatest, }: StickyStatusBarProps): import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ParsedTextAttachment } from "../../lib/chat.js";
|
|
2
|
+
interface TextAttachmentPillsProps {
|
|
3
|
+
attachments: ParsedTextAttachment[];
|
|
4
|
+
/**
|
|
5
|
+
* R6:点击 pill 时的预览回调。不传时保持纯展示(向后兼容)。
|
|
6
|
+
*/
|
|
7
|
+
onPreview?: (attachment: ParsedTextAttachment) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function TextAttachmentPills({ attachments, onPreview }: TextAttachmentPillsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
+
export {};
|
|
@@ -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,17 +17,18 @@ import {
|
|
|
17
17
|
isErrorMessage,
|
|
18
18
|
isUserMessage,
|
|
19
19
|
useWhatIfQuoteContext
|
|
20
|
-
} from "../../../chunk-
|
|
20
|
+
} from "../../../chunk-BGNKHPCD.js";
|
|
21
|
+
import "../../../chunk-H62LH2AG.js";
|
|
21
22
|
import {
|
|
22
23
|
AskUserQuestionBlock
|
|
23
|
-
} from "../../../chunk-
|
|
24
|
+
} from "../../../chunk-OGHUIKCY.js";
|
|
25
|
+
import "../../../chunk-PYYDXV2A.js";
|
|
24
26
|
import "../../../chunk-2UP7MG3J.js";
|
|
25
|
-
import "../../../chunk-
|
|
26
|
-
import "../../../chunk-WPLEMYL7.js";
|
|
27
|
-
import "../../../chunk-WVXXQ3KM.js";
|
|
28
|
-
import "../../../chunk-M45K3554.js";
|
|
29
|
-
import "../../../chunk-QODAKTG5.js";
|
|
27
|
+
import "../../../chunk-UWNQ4PXK.js";
|
|
30
28
|
import "../../../chunk-J3XVFPOV.js";
|
|
29
|
+
import "../../../chunk-YJ6BX3FU.js";
|
|
30
|
+
import "../../../chunk-7LEKQI47.js";
|
|
31
|
+
import "../../../chunk-JCJFFJ42.js";
|
|
31
32
|
import "../../../chunk-PZ5AY32C.js";
|
|
32
33
|
export {
|
|
33
34
|
AskUserQuestionBlock,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const ENTRY_SCROLL_MARGIN_PX = 24;
|
|
2
|
+
export declare function normalizeScrollEntryKey(value: string | null | undefined): string | null;
|
|
3
|
+
export declare function calculateAnchoredScrollTop({ scrollTop, containerTop, targetTop, margin, }: {
|
|
4
|
+
scrollTop: number;
|
|
5
|
+
containerTop: number;
|
|
6
|
+
targetTop: number;
|
|
7
|
+
margin?: number;
|
|
8
|
+
}): number;
|
|
@@ -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 {};
|