feat: expand model tools and document handling

This commit is contained in:
lofyer
2026-08-11 19:52:58 +08:00
parent 71a8662690
commit 184180e618
50 changed files with 2537 additions and 747 deletions
+16 -1
View File
@@ -8,7 +8,8 @@ import type {
ComputerCapabilityId,
McpServerInput,
McpServerTestResult,
SkillImportKind
SkillImportKind,
WebSearchTestResult
} from './capability-contracts'
import {
assistantIdSchema,
@@ -580,6 +581,13 @@ export type RuntimeSettings = {
export type ContextAttachment = ConversationAttachment
export type ContextFileSelectionProgress = {
phase: 'reading' | 'parsing'
fileName: string
fileNumber: number
fileCount: number
}
export const maximumPastedImageBytes = 12 * 1024 * 1024
export const pastedImageInputSchema = z
@@ -1211,6 +1219,10 @@ export type DesktopApi = {
) => Promise<CapabilitySnapshot>
removeMcpServer: (serverId: string) => Promise<CapabilitySnapshot>
testMcpServer: (serverId: string) => Promise<McpServerTestResult>
setWebSearchEnabled?: (
enabled: boolean
) => Promise<CapabilitySnapshot>
testWebSearch?: () => Promise<WebSearchTestResult>
setComputerCapabilityEnabled?: (
capabilityId: ComputerCapabilityId,
enabled: boolean
@@ -1237,6 +1249,9 @@ export type DesktopApi = {
}
context: {
selectFiles: () => Promise<ContextAttachment[]>
onFileSelectionProgress: (
listener: (progress: ContextFileSelectionProgress) => void
) => () => void
addPastedImage: (
input: PastedImageInput
) => Promise<ContextAttachment>