feat(agents): 支持个人微信发布与渠道会话
Some checks failed
Electron E2E / Electron E2E (macos-latest) (push) Has been cancelled
Electron E2E / Electron E2E (ubuntu-latest) (push) Has been cancelled
Electron E2E / Electron E2E (windows-latest) (push) Has been cancelled

This commit is contained in:
2026-09-13 16:22:36 +08:00
parent 03774d0625
commit 2e710db0fb
28 changed files with 2678 additions and 31 deletions

View File

@@ -7,7 +7,7 @@ export const cloudAgentsApi = {
remember: (recent: CloudRecent | null) => hostApiFetch(CLOUD_AGENTS_PATH + '/recovery/recent', {
method: 'PUT', body: JSON.stringify(recent),
}),
resolvePending: (id: string, discard = false) => hostApiFetch<{ result?: unknown; operation?: string; input?: Record<string, unknown>; discarded?: boolean }>(
resolvePending: (id: string, discard = false) => hostApiFetch<{ result?: unknown; operation?: string; input?: Record<string, unknown>; discarded?: boolean; requires_input?: boolean; pending?: boolean }>(
CLOUD_AGENTS_PATH + '/recovery/pending', { method: 'POST', body: JSON.stringify({ id, discard }) }),
uploadSkill: () => hostApiFetch<CloudSkillDraft | null>(CLOUD_AGENTS_PATH + '/skills/pick', { method: 'POST' }),
uploadKnowledge: (slug: string, kb_id: string, operation_id: string, replaces_file_id?: string) =>
@@ -18,6 +18,9 @@ export const cloudAgentsApi = {
download: (thread_id: string, path: string) => hostApiFetch<{ saved: boolean }>(CLOUD_AGENTS_PATH + '/files/save', {
method: 'POST', body: JSON.stringify({ thread_id, path }),
}),
downloadChannelArtifact: (session_id: string, path: string) => hostApiFetch<{ saved: boolean }>(CLOUD_AGENTS_PATH + '/files/save-channel', {
method: 'POST', body: JSON.stringify({ session_id, path }),
}),
call: <K extends keyof CloudAgentOperations>(operation: K, input: CloudAgentOperations[K]['input']) =>
hostApiFetch<CloudAgentOperations[K]['output']>(CLOUD_AGENTS_PATH + '/actions', {
method: 'POST', body: JSON.stringify({ operation, input }),