feat(conversation): replicate table quote-to-chat action (TODO 02)
This commit is contained in:
1 parent
e335588826
commit
ed31a7c1b4
20 files changed
+939
-46
No files matched your search
@@ -13,6 +13,25 @@ export interface ChatAttachment {
|
||||
path?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息引用(WorkBuddy `message.quote.add`)。
|
||||
* 表格引用保存 markdown 快照,发送后随用户消息一起持久化。
|
||||
*/
|
||||
export interface MessageQuote {
|
||||
id: string
|
||||
kind: 'table'
|
||||
/** 稳定来源标识(渲染器 sourceId + table id),用于同一条回复内去重与高亮。 */
|
||||
sourceId: string
|
||||
/** 产生该引用的助手消息 id,可回溯到原表格。 */
|
||||
messageId?: string
|
||||
/** 表格 markdown 快照。 */
|
||||
markdown: string
|
||||
/** 引用来源标题(原版 display.title);未采集到原版取值时留空,不臆造文本。 */
|
||||
title?: string
|
||||
/** 输入区与消息气泡中的展示摘要。 */
|
||||
preview: string
|
||||
}
|
||||
|
||||
export interface QuestionOption {
|
||||
id?: string
|
||||
option?: string
|
||||
|
||||
+3
-1
@@ -13,7 +13,7 @@ import type {
|
||||
AppInfo
|
||||
} from './types'
|
||||
import type { DownloadPayload, DownloadResult, ResourceEntry, ResourceRange, WorkspaceResource } from './resources'
|
||||
import type { ChatAttachment, InteractionResponse, PermissionMode } from './conversation'
|
||||
import type { ChatAttachment, InteractionResponse, MessageQuote, PermissionMode } from './conversation'
|
||||
import type { CustomModelInput, ModelRegistryView, ModelTestResult } from './models'
|
||||
import type { SessionContext, WorkspaceRegistryView } from './workspaces'
|
||||
import type { BrowserHostApi } from './browser-host'
|
||||
@@ -39,6 +39,8 @@ export interface SendPayload {
|
||||
sessionId: string
|
||||
text: string
|
||||
attachments?: ChatAttachment[]
|
||||
/** 表格等内容的引用快照,随用户消息持久化。 */
|
||||
quotes?: MessageQuote[]
|
||||
permissionMode?: PermissionMode
|
||||
/** Retry/edit from this message; descendants are preserved in an archived branch. */
|
||||
fromMessageId?: string
|
||||
|
||||
+3
-1
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
/** 会话内的一条消息(对外视图) */
|
||||
import type { ArtifactContent, ChatAttachment, ChatInteraction, PlanContent, TaskContent } from './conversation'
|
||||
import type { ArtifactContent, ChatAttachment, ChatInteraction, MessageQuote, PlanContent, TaskContent } from './conversation'
|
||||
|
||||
export interface ChatMessage {
|
||||
id: string
|
||||
@@ -18,6 +18,8 @@ export interface ChatMessage {
|
||||
parts?: MessagePart[]
|
||||
attachments?: ChatAttachment[]
|
||||
resources?: string[]
|
||||
/** 发送时引用进对话的表格等内容块快照(WorkBuddy messageQuote)。 */
|
||||
quotes?: MessageQuote[]
|
||||
skills?: Array<{ id: string; name: string; uri: string }>
|
||||
/** Native-history reconstruction; never includes connector credentials. */
|
||||
capabilityContext?: string
|
||||
|
||||
Reference in new issue
Block a user