feat(agents): 复用 Yuxi 头像上传与展示

This commit is contained in:
brother7 committed 2026-10-12 13:48:38 +08:00
1 parent 0ca744fb9b
commit 235af24d6c
16 files changed
+381 -32

No files matched your search

+11 -3
View File
@@ -1,6 +1,12 @@
export const CLOUD_AGENTS_PATH = '/api/cloud-agents';
export interface CloudAgentDraft {
export interface CloudAgentAvatar {
icon?: string | null;
/** Main resolves Yuxi public paths for display; only icon is saved. */
icon_url?: string | null;
}
export interface CloudAgentDraft extends CloudAgentAvatar {
slug: string;
name: string;
purpose: string;
@@ -22,6 +28,7 @@ export interface CreateCloudAgent {
operation_id: string;
name: string;
purpose: string;
icon?: string | null;
}
export interface SaveCloudAgentDraft {
@@ -30,6 +37,7 @@ export interface SaveCloudAgentDraft {
purpose: string;
system_prompt: string;
configuration?: CloudAgentConfiguration;
icon?: string | null;
}
export interface CloudAgentConfiguration {
@@ -51,7 +59,7 @@ export const EMPTY_CLOUD_CONFIGURATION: CloudAgentConfiguration = {
tool_approval_mode: 'default', max_execution_steps: 300, max_output_tokens: 4096, max_run_seconds: 600,
};
export interface CloudAgentEntry {
export interface CloudAgentEntry extends CloudAgentAvatar {
slug: string; name: string; purpose: string; published_version: number;
is_creator?: boolean; payer?: string;
}
@@ -76,7 +84,7 @@ export interface CloudThread {
draft_revision?: number;
archived?: boolean;
}
export interface CloudVersion { version: number; created_at: string; name: string; purpose: string; system_prompt: string; configuration: CloudAgentConfiguration }
export interface CloudVersion extends CloudAgentAvatar { version: number; created_at: string; name: string; purpose: string; system_prompt: string; configuration: CloudAgentConfiguration }
export interface CloudRun {
agent_run_id: string; request_id: string; thread_id: string; agent_slug: string;
status: string; output: string; version: string;