mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-08-08 07:33:35 +08:00
✨ feat(ai): 支持聊天附件解析并优化数据库对象操作
This commit is contained in:
@@ -646,6 +646,20 @@ export interface AIToolCall {
|
||||
};
|
||||
}
|
||||
|
||||
export type AIChatAttachmentKind = "image" | "markdown" | "text" | "pdf" | "word" | "excel" | "document";
|
||||
|
||||
export interface AIChatAttachment {
|
||||
id: string;
|
||||
name: string;
|
||||
mimeType: string;
|
||||
size: number;
|
||||
kind: AIChatAttachmentKind;
|
||||
dataUrl?: string;
|
||||
text?: string;
|
||||
textTruncated?: boolean;
|
||||
extractWarning?: string;
|
||||
}
|
||||
|
||||
export type ChatPhase =
|
||||
| "idle"
|
||||
| "connecting"
|
||||
@@ -663,6 +677,7 @@ export interface AIChatMessage {
|
||||
timestamp: number;
|
||||
loading?: boolean;
|
||||
images?: string[]; // base64 encoded images with data URI prefix
|
||||
attachments?: AIChatAttachment[];
|
||||
tool_calls?: AIToolCall[];
|
||||
tool_call_id?: string;
|
||||
tool_name?: string; // used for UI display
|
||||
|
||||
Reference in New Issue
Block a user