Skip to content

Let's use AI to Earn!

feat: 2025-12-24 Daily development (#459)

Gao7d5a131b33f3
diff --git a/project/web/.claude/rules/default.md b/project/web/.claude/rules/default.md
index a393d76d..a9c9f098 100644
--- a/project/web/.claude/rules/default.md
+++ b/project/web/.claude/rules/default.md
@@ -234,6 +234,63 @@ function Chat() {
}
```
+## 国际化(i18n)使用规范 — 类型与方法
+
+为保证类型安全与可维护性,项目国际化使用以下约定,禁止在调用 i18n 方法处使用 `any`:
+
+- 目录与入口
+ - 国际化资源放置在 `src/app/i18n/locales/{lng}/{namespace}.json`。
+ - 客户端工具位于 `src/app/i18n/client.ts`,导出 `useTransClient`(Hook)和 `directTrans`(静态方法)。
+
+- Hook 使用(推荐在组件中)
+ - 导入:`import { useTransClient } from '@/app/i18n/client'`
+ - 签名:`const { t } = useTransClient<'namespace' | undefined>('namespace')`
+ - 示例(带类型):
+
+```tsx
+import { useTransClient } from '@/app/i18n/client'
+
+export const MyComponent: React.FC = () => {
+ // 指定 namespace 字符串字面量以获得类型推断
+ const { t } = useTransClient<'account'>('account')
+ return <div>{t('messages.deleteSuccess')}</div>
+}
+```
+
+ - 约束:
+ - 不要使用 `useTransClient(any)` 或 `useTransClient('xxx' as any)`。
+ - 优先传入字面量类型参数以获得更好的类型推断(如 `'account'`、`'common'`)。
+
+- 静态方法(server/client 通用,**不会** 自动响应语言切换)
+ - 导入:`import { directTrans } from '@/app/i18n/client'`
+ - 用途:用于工具函数、请求层或非 React 渲染路径下需要即时翻译的场景。
+ - 签名示例(在调用处请传入已知的 namespace 字面量):
+
+```ts
+import { directTrans } from '@/app/i18n/client'
+
+const msg = directTrans('common', 'networkBusy') // 返回 string
+```
+
+ - 约束:
+ - `directTrans` 是静态读取,语言切换不会触发重新计算,**仅用于不需要自动响应语言变化的场景**(如日志、请求报错信息、初始化文本等)。
+ - 传参请使用已存在的 namespace 字符串(如 `'common'`、`'account'`),不要传 `any`。
+
+- 类型说明
+ - `useTransClient` 返回类型符合 `react-i18next` 的 `UseTranslationResponse<Namespace>`;在组件中使用时推荐为 `Namespace` 指定字面量类型以获得更好类型提示。
+ - `directTrans<Ns extends FlatNamespace>(ns: Ns, key: string): string`:静态翻译接口,返回字符串。
+
+- 代码示例(请求层错误处理)
+
+```ts
+import { directTrans } from '@/app/i18n/client'
+import { CONTACT } from '@/constant'
+
+const message = `${directTrans('common', 'networkError')} ${CONTACT}`
+```
+
+按照以上规范更新或新增 i18n 调用后,请同时运行 linter 确保没有 `any` 引入及类型错误。
+
# SEO 元数据规范
页面的 SEO 元数据必须使用 `getMetadata` 方法,**不要自己拼接 title**:
@@ -293,3 +350,5 @@ router.push(`/${lng}/tasks`)
- 项目使用 Next.js 国际化路由,中间件会自动处理语言重定向
- 直接使用不带语言前缀的路径即可,如 `/pricing`、`/accounts`
- 系统会根据用户当前语言自动重定向到正确的路径
+
+
diff --git a/project/web/.gitignore b/project/web/.gitignore
index 4628b641..d1bc145a 100644
--- a/project/web/.gitignore
+++ b/project/web/.gitignore
@@ -41,3 +41,5 @@ certificates
*.idea/
.env.development
package-lock.json
+
+/public/en/*
\ No newline at end of file
diff --git a/project/web/public/agentTasks_api_error.txt b/project/web/public/agentTasks_api_error.txt
deleted file mode 100644
index deac9bea..00000000
--- a/project/web/public/agentTasks_api_error.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-
-id: 1
-data: {"type":"init","taskId":"694a6cd01ce170ee02ec22d0"}
-
-id: 2
-data: {"type":"assistant","message":{"type":"assistant","uuid":"86847191-c6e5-40e4-b412-4c42753e143e","message":{"id":"52c6ec89-4c8f-4375-baec-5e845bef5eb5","content":[{"type":"text","text":"API Error: 404 {\"error\":{\"message\":\"Error from provider(new,claude-sonnet-4-5-20250929: 404): <html>\\r\\n<head><title>404 Not Found</title></head>\\r\\n<body>\\r\\n<center><h1>404 Not Found</h1></center>\\r\\n<hr><center>nginx</center>\\r\\n</body>\\r\\n</html>\\r\\nError: Error from provider(new,claude-sonnet-4-5-20250929: 404): <html>\\r\\n<head><title>404 Not Found</title></head>\\r\\n<body>\\r\\n<center><h1>404 Not Found</h1></center>\\r\\n<hr><center>nginx</center>\\r\\n</body>\\r\\n</html>\\r\\n\\n at nt (/app/node_modules/.pnpm/@[email protected]_@[email protected]_@cfworker+json-s_cceb99b6ac112d593c6272b8487a9a0f/node_modules/@musistudio/claude-code-router/dist/cli.js:79940:11)\\n at p0 (/app/node_modules/.pnpm/@[email protected]_@[email protected]_@cfworker+json-s_cceb99b6ac112d593c6272b8487a9a0f/node_modules/@musistudio/claude-code-router/dist/cli.js:80000:114)\\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\\n at async f0 (/app/node_modules/.pnpm/@[email protected]_@[email protected]_@cfworker+json-s_cceb99b6ac112d593c6272b8487a9a0f/node_modules/@musistudio/claude-code-router/dist/cli.js:79965:96)\",\"type\":\"api_error\",\"code\":\"provider_response_error\"}}"}],"model":"<synthetic>","role":"assistant","stop_reason":"stop_sequence","stop_sequence":"","type":"message","usage":{"cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0},"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":0,"output_tokens":0,"server_tool_use":{"web_search_requests":0},"service_tier":null},"container":null,"context_management":null},"parent_tool_use_id":null,"error":"unknown"}}
-
-id: 3
-data: {"type":"error","code":500,"message":"Internal server error","data":{},"timestamp":1766485204026}
-
diff --git a/project/web/public/sitemap-0.xml b/project/web/public/sitemap-0.xml
index c25944bb..40bf8e31 100644
--- a/project/web/public/sitemap-0.xml
+++ b/project/web/public/sitemap-0.xml
@@ -1,52 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
-<url><loc>https://aitoearn.ai/healthz</loc><lastmod>2025-12-20T16:52:30.750Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/en</loc><lastmod>2025-12-20T16:48:43.924Z</lastmod><changefreq>monthly</changefreq><priority>0.8</priority></url>
-<url><loc>https://aitoearn.ai/en/websit/terms-of-service</loc><lastmod>2025-12-20T14:27:57.199Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/en/websit/privacy-policy</loc><lastmod>2025-12-20T14:27:57.198Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/en/websit/plugin-guide</loc><lastmod>2025-12-20T14:27:57.198Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/en/websit/extension-privacy-policy</loc><lastmod>2025-12-20T14:27:57.196Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/en/websit/data-protection-agreement</loc><lastmod>2025-12-20T14:27:57.196Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/en/websit/data-deletion</loc><lastmod>2025-12-20T14:27:57.196Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/en/tasks-history</loc><lastmod>2025-12-20T14:27:57.195Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/en/tasks</loc><lastmod>2025-12-20T14:27:57.195Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/en/pricing</loc><lastmod>2025-12-20T14:27:57.195Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/en/pinterest</loc><lastmod>2025-12-20T14:27:57.194Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/en/material</loc><lastmod>2025-12-20T14:27:57.194Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/en/interactiveNew</loc><lastmod>2025-12-20T14:27:57.192Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/en/hotContent</loc><lastmod>2025-12-20T14:27:57.190Z</lastmod><changefreq>daily</changefreq><priority>0.9</priority></url>
-<url><loc>https://aitoearn.ai/en/dataStatistics</loc><lastmod>2025-12-20T14:27:57.187Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/en/data-monitoring</loc><lastmod>2025-12-20T16:50:21.070Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/en/chat/test</loc><lastmod>2025-12-20T14:27:57.185Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/en/cgmaterial</loc><lastmod>2025-12-20T14:27:57.184Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/en/auth/login</loc><lastmod>2025-12-20T14:27:57.183Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/en/auth/forgot-password</loc><lastmod>2025-12-20T14:27:57.183Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/en/aiRank</loc><lastmod>2025-12-20T14:27:57.183Z</lastmod><changefreq>weekly</changefreq><priority>0.9</priority></url>
-<url><loc>https://aitoearn.ai/en/aiRank/aiRanking</loc><lastmod>2025-12-20T14:27:57.182Z</lastmod><changefreq>weekly</changefreq><priority>0.9</priority></url>
-<url><loc>https://aitoearn.ai/en/accounts</loc><lastmod>2025-12-20T14:27:57.182Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/en/accounts/auth</loc><lastmod>2025-12-20T14:27:57.179Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/zh-CN</loc><lastmod>2025-12-20T16:48:43.924Z</lastmod><changefreq>monthly</changefreq><priority>0.8</priority></url>
-<url><loc>https://aitoearn.ai/zh-CN/websit/terms-of-service</loc><lastmod>2025-12-20T14:27:57.199Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/zh-CN/websit/privacy-policy</loc><lastmod>2025-12-20T14:27:57.198Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/zh-CN/websit/plugin-guide</loc><lastmod>2025-12-20T14:27:57.198Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/zh-CN/websit/extension-privacy-policy</loc><lastmod>2025-12-20T14:27:57.196Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/zh-CN/websit/data-protection-agreement</loc><lastmod>2025-12-20T14:27:57.196Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/zh-CN/websit/data-deletion</loc><lastmod>2025-12-20T14:27:57.196Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/zh-CN/tasks-history</loc><lastmod>2025-12-20T14:27:57.195Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/zh-CN/tasks</loc><lastmod>2025-12-20T14:27:57.195Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/zh-CN/pricing</loc><lastmod>2025-12-20T14:27:57.195Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/zh-CN/pinterest</loc><lastmod>2025-12-20T14:27:57.194Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/zh-CN/material</loc><lastmod>2025-12-20T14:27:57.194Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/zh-CN/interactiveNew</loc><lastmod>2025-12-20T14:27:57.192Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/zh-CN/hotContent</loc><lastmod>2025-12-20T14:27:57.190Z</lastmod><changefreq>daily</changefreq><priority>0.9</priority></url>
-<url><loc>https://aitoearn.ai/zh-CN/dataStatistics</loc><lastmod>2025-12-20T14:27:57.187Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/zh-CN/data-monitoring</loc><lastmod>2025-12-20T16:50:21.070Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/zh-CN/chat/test</loc><lastmod>2025-12-20T14:27:57.185Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/zh-CN/cgmaterial</loc><lastmod>2025-12-20T14:27:57.184Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/zh-CN/auth/login</loc><lastmod>2025-12-20T14:27:57.183Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/zh-CN/auth/forgot-password</loc><lastmod>2025-12-20T14:27:57.183Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/zh-CN/aiRank</loc><lastmod>2025-12-20T14:27:57.183Z</lastmod><changefreq>weekly</changefreq><priority>0.9</priority></url>
-<url><loc>https://aitoearn.ai/zh-CN/aiRank/aiRanking</loc><lastmod>2025-12-20T14:27:57.182Z</lastmod><changefreq>weekly</changefreq><priority>0.9</priority></url>
-<url><loc>https://aitoearn.ai/zh-CN/accounts</loc><lastmod>2025-12-20T14:27:57.182Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
-<url><loc>https://aitoearn.ai/zh-CN/accounts/auth</loc><lastmod>2025-12-20T14:27:57.179Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/healthz</loc><lastmod>2025-12-24T16:37:48.595Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/en</loc><lastmod>2025-12-24T04:08:42.228Z</lastmod><changefreq>monthly</changefreq><priority>0.8</priority></url>
+<url><loc>https://aitoearn.ai/en/websit/terms-of-service</loc><lastmod>2025-12-22T02:19:26.235Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/en/websit/privacy-policy</loc><lastmod>2025-12-22T02:19:26.234Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/en/websit/plugin-guide</loc><lastmod>2025-12-22T02:19:26.233Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/en/websit/extension-privacy-policy</loc><lastmod>2025-12-22T02:19:26.233Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/en/websit/data-protection-agreement</loc><lastmod>2025-12-12T06:46:42.348Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/en/websit/data-deletion</loc><lastmod>2025-12-22T02:19:26.232Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/en/tasks-history</loc><lastmod>2025-12-24T13:58:01.410Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/en/tasks</loc><lastmod>2025-11-18T02:51:00.256Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/en/pricing</loc><lastmod>2025-12-18T11:52:18.737Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/en/pinterest</loc><lastmod>2025-12-22T02:19:26.229Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/en/material</loc><lastmod>2025-11-18T02:51:00.224Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/en/interactiveNew</loc><lastmod>2025-12-18T11:52:18.730Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/en/income</loc><lastmod>2025-12-23T05:50:28.851Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/en/hotContent</loc><lastmod>2025-11-18T02:51:00.185Z</lastmod><changefreq>daily</changefreq><priority>0.9</priority></url>
+<url><loc>https://aitoearn.ai/en/dataStatistics</loc><lastmod>2025-11-18T02:51:00.115Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/en/data-monitoring</loc><lastmod>2025-12-22T02:19:26.225Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/en/cgmaterial</loc><lastmod>2025-11-18T02:51:00.099Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/en/auth/login</loc><lastmod>2025-12-18T11:52:18.715Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/en/auth/forgot-password</loc><lastmod>2025-12-18T11:52:18.710Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/en/aiRank</loc><lastmod>2025-11-18T02:51:00.092Z</lastmod><changefreq>weekly</changefreq><priority>0.9</priority></url>
+<url><loc>https://aitoearn.ai/en/aiRank/aiRanking</loc><lastmod>2025-11-18T02:51:00.078Z</lastmod><changefreq>weekly</changefreq><priority>0.9</priority></url>
+<url><loc>https://aitoearn.ai/en/accounts</loc><lastmod>2025-12-19T13:34:03.419Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/en/accounts/auth</loc><lastmod>2025-11-18T02:50:59.996Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/zh-CN</loc><lastmod>2025-12-24T04:08:42.228Z</lastmod><changefreq>monthly</changefreq><priority>0.8</priority></url>
+<url><loc>https://aitoearn.ai/zh-CN/websit/terms-of-service</loc><lastmod>2025-12-22T02:19:26.235Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/zh-CN/websit/privacy-policy</loc><lastmod>2025-12-22T02:19:26.234Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/zh-CN/websit/plugin-guide</loc><lastmod>2025-12-22T02:19:26.233Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/zh-CN/websit/extension-privacy-policy</loc><lastmod>2025-12-22T02:19:26.233Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/zh-CN/websit/data-protection-agreement</loc><lastmod>2025-12-12T06:46:42.348Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/zh-CN/websit/data-deletion</loc><lastmod>2025-12-22T02:19:26.232Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/zh-CN/tasks-history</loc><lastmod>2025-12-24T13:58:01.410Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/zh-CN/tasks</loc><lastmod>2025-11-18T02:51:00.256Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/zh-CN/pricing</loc><lastmod>2025-12-18T11:52:18.737Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/zh-CN/pinterest</loc><lastmod>2025-12-22T02:19:26.229Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/zh-CN/material</loc><lastmod>2025-11-18T02:51:00.224Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/zh-CN/interactiveNew</loc><lastmod>2025-12-18T11:52:18.730Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/zh-CN/income</loc><lastmod>2025-12-23T05:50:28.851Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/zh-CN/hotContent</loc><lastmod>2025-11-18T02:51:00.185Z</lastmod><changefreq>daily</changefreq><priority>0.9</priority></url>
+<url><loc>https://aitoearn.ai/zh-CN/dataStatistics</loc><lastmod>2025-11-18T02:51:00.115Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/zh-CN/data-monitoring</loc><lastmod>2025-12-22T02:19:26.225Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/zh-CN/cgmaterial</loc><lastmod>2025-11-18T02:51:00.099Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/zh-CN/auth/login</loc><lastmod>2025-12-18T11:52:18.715Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/zh-CN/auth/forgot-password</loc><lastmod>2025-12-18T11:52:18.710Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/zh-CN/aiRank</loc><lastmod>2025-11-18T02:51:00.092Z</lastmod><changefreq>weekly</changefreq><priority>0.9</priority></url>
+<url><loc>https://aitoearn.ai/zh-CN/aiRank/aiRanking</loc><lastmod>2025-11-18T02:51:00.078Z</lastmod><changefreq>weekly</changefreq><priority>0.9</priority></url>
+<url><loc>https://aitoearn.ai/zh-CN/accounts</loc><lastmod>2025-12-19T13:34:03.419Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
+<url><loc>https://aitoearn.ai/zh-CN/accounts/auth</loc><lastmod>2025-11-18T02:50:59.996Z</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>
</urlset>
\ No newline at end of file
diff --git "a/project/web/public/\344\270\273\346\234\215\345\212\241.openapi.json" "b/project/web/public/\344\270\273\346\234\215\345\212\241.openapi.json"
deleted file mode 100644
index 1a3166c8..00000000
--- "a/project/web/public/\344\270\273\346\234\215\345\212\241.openapi.json"
+++ /dev/null
@@ -1,7166 +0,0 @@
-{
- "openapi": "3.0.1",
- "info": {
- "title": "主服务",
- "description": "aitoearn-gateway API",
- "version": "1.0.0"
- },
- "tags": [
- {
- "name": "Close"
- },
- {
- "name": "Close/Me"
- },
- {
- "name": "Close/Me/Agent"
- }
- ],
- "paths": {
- "/api/agent/tasks/{taskId}/messages": {
- "get": {
- "summary": "Get Content Generation Task Messages",
- "deprecated": false,
- "description": "Get messages after specified message ID. Used for polling after SSE disconnection.",
- "operationId": "AgentController_getTaskMessages",
- "tags": [
- "Close/Me/Agent"
- ],
- "parameters": [
- {
- "name": "taskId",
- "in": "path",
- "description": "",
- "required": true,
- "example": "",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "lastMessageId",
- "in": "query",
- "description": "上次获取的最后一条消息 UUID",
- "required": false,
- "example": "",
- "schema": {
- "description": "上次获取的最后一条消息 UUID",
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "data": {
- "$ref": "#/components/schemas/TaskMessagesVo"
- }
- },
- "required": [
- "data"
- ]
- }
- }
- },
- "headers": {}
- }
- },
- "security": []
- }
- },
- "/api/agent/tasks": {
- "get": {
- "summary": "Get Content Generation Task List",
- "deprecated": false,
- "description": "Get a paginated list of content generation tasks.",
- "operationId": "AgentController_getContentGenerationTaskListWithPagination",
- "tags": [
- "Close/Me/Agent"
- ],
- "parameters": [
- {
- "name": "page",
- "in": "query",
- "description": "",
- "required": false,
- "example": 1,
- "schema": {
- "default": 1,
- "type": "integer",
- "minimum": 1,
- "maximum": 9007199254740991
- }
- },
- {
- "name": "pageSize",
- "in": "query",
- "description": "",
- "required": false,
- "example": 10,
- "schema": {
- "default": 10,
- "type": "integer",
- "minimum": 1,
- "maximum": 1000
- }
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "data": {
- "$ref": "#/components/schemas/ContentGenerationTaskListVo"
- }
- },
- "required": [
- "data"
- ]
- }
- }
- },
- "headers": {}
- }
- },
- "security": []
- },
- "post": {
- "summary": "Create Content Generation Task",
- "deprecated": false,
- "description": "Create a content generation task.",
- "operationId": "AgentController_createContentGenerationTask",
- "tags": [
- "Close/Me/Agent"
- ],
- "parameters": [],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreateContentGenerationTaskDto"
- }
- }
- },
- "required": true
- },
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "data": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "init"
- },
- "taskId": {
- "type": "string"
- },
- "messages": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "user"
- },
- "uuid": {
- "type": "string"
- },
- "message": {
- "type": "object",
- "properties": {
- "content": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "array",
- "items": {}
- }
- ]
- },
- "role": {
- "type": "string",
- "enum": [
- "user",
- "assistant"
- ]
- }
- },
- "required": [
- "content",
- "role"
- ],
- "additionalProperties": false
- },
- "content": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "array",
- "items": {}
- }
- ]
- },
- "parent_tool_use_id": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "isSynthetic": {
- "type": "boolean"
- },
- "tool_use_result": {},
- "isReplay": {
- "type": "boolean",
- "const": true
- }
- },
- "required": [
- "type"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "assistant"
- },
- "uuid": {
- "type": "string"
- },
- "message": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "content": {
- "type": "array",
- "items": {}
- },
- "model": {
- "type": "string"
- },
- "role": {
- "type": "string",
- "const": "assistant"
- },
- "stop_reason": {
- "anyOf": [
- {
- "type": "string",
- "enum": [
- "end_turn",
- "max_tokens",
- "stop_sequence",
- "tool_use",
- "pause_turn",
- "refusal"
- ]
- },
- {
- "type": "null"
- }
- ]
- },
- "stop_sequence": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "type": {
- "type": "string",
- "const": "message"
- },
- "usage": {
- "type": "object",
- "properties": {
- "cache_creation": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "ephemeral_1h_input_tokens": {
- "type": "number"
- },
- "ephemeral_5m_input_tokens": {
- "type": "number"
- }
- },
- "required": [
- "ephemeral_1h_input_tokens",
- "ephemeral_5m_input_tokens"
- ],
- "additionalProperties": false
- },
- {
- "type": "null"
- }
- ]
- },
- "cache_creation_input_tokens": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ]
- },
- "cache_read_input_tokens": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ]
- },
- "input_tokens": {
- "type": "number"
- },
- "output_tokens": {
- "type": "number"
- },
- "server_tool_use": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "web_search_requests": {
- "type": "number"
- }
- },
- "required": [
- "web_search_requests"
- ],
- "additionalProperties": false
- },
- {
- "type": "null"
- }
- ]
- },
- "service_tier": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "additionalProperties": {}
- },
- "container": {
- "anyOf": [
- {},
- {
- "type": "null"
- }
- ]
- },
- "context_management": {
- "anyOf": [
- {},
- {
- "type": "null"
- }
- ]
- }
- },
- "additionalProperties": {}
- },
- "parent_tool_use_id": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "error": {
- "type": "string",
- "enum": [
- "authentication_failed",
- "billing_error",
- "rate_limit",
- "invalid_request",
- "server_error",
- "unknown"
- ]
- }
- },
- "required": [
- "type",
- "uuid"
- ],
- "additionalProperties": false
- },
- {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "result"
- },
- "subtype": {
- "type": "string",
- "const": "success"
- },
- "uuid": {
- "type": "string"
- },
- "duration_ms": {
- "type": "number"
- },
- "duration_api_ms": {
- "type": "number"
- },
- "is_error": {
- "type": "boolean"
- },
- "num_turns": {
- "type": "number"
- },
- "message": {
- "type": "string"
- },
- "result": {
- "anyOf": [
- {
- "anyOf": [
- {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "mediaOnly"
- },
- "medias": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "IMAGE",
- "VIDEO"
- ]
- },
- "url": {
- "type": "string"
- },
- "thumbUrl": {
- "type": "string"
- },
- "prompt": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "url"
- ],
- "additionalProperties": false
- }
- },
- "action": {
- "type": "string",
- "const": "none"
- }
- },
- "required": [
- "type",
- "medias",
- "action"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "mediaOnly"
- },
- "medias": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "IMAGE",
- "VIDEO"
- ]
- },
- "url": {
- "type": "string"
- },
- "thumbUrl": {
- "type": "string"
- },
- "prompt": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "url"
- ],
- "additionalProperties": false
- }
- },
- "action": {
- "type": "string",
- "const": "navigateToMedia"
- },
- "mediaId": {
- "type": "string"
- },
- "groupId": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "medias",
- "action",
- "mediaId",
- "groupId"
- ],
- "additionalProperties": false
- }
- ]
- },
- {
- "minItems": 1,
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "fullContent"
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "medias": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "IMAGE",
- "VIDEO"
- ]
- },
- "url": {
- "type": "string"
- },
- "thumbUrl": {
- "type": "string"
- },
- "prompt": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "url"
- ],
- "additionalProperties": false
- }
- },
- "action": {
- "type": "string",
- "const": "none"
- },
- "platform": {
- "type": "string",
- "enum": [
- "douyin",
- "xhs",
- "wxSph",
- "KWAI",
- "youtube",
- "wxGzh",
- "bilibili",
- "twitter",
- "tiktok",
- "facebook",
- "instagram",
- "threads",
- "pinterest",
- "linkedin"
- ]
- }
- },
- "required": [
- "type",
- "title",
- "description",
- "tags",
- "medias",
- "action"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "fullContent"
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "medias": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "IMAGE",
- "VIDEO"
- ]
- },
- "url": {
- "type": "string"
- },
- "thumbUrl": {
- "type": "string"
- },
- "prompt": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "url"
- ],
- "additionalProperties": false
- }
- },
- "action": {
- "type": "string",
- "const": "navigateToDraft"
- },
- "groupId": {
- "type": "string"
- },
- "platform": {
- "type": "string",
- "enum": [
- "douyin",
- "xhs",
- "wxSph",
- "KWAI",
- "youtube",
- "wxGzh",
- "bilibili",
- "twitter",
- "tiktok",
- "facebook",
- "instagram",
- "threads",
- "pinterest",
- "linkedin"
- ]
- }
- },
- "required": [
- "type",
- "title",
- "description",
- "tags",
- "medias",
- "action",
- "groupId"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "fullContent"
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "medias": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "IMAGE",
- "VIDEO"
- ]
- },
- "url": {
- "type": "string"
- },
- "thumbUrl": {
- "type": "string"
- },
- "prompt": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "url"
- ],
- "additionalProperties": false
- }
- },
- "action": {
- "type": "string",
- "const": "navigateToMedia"
- },
- "mediaId": {
- "type": "string"
- },
- "groupId": {
- "type": "string"
- },
- "platform": {
- "type": "string",
- "enum": [
- "douyin",
- "xhs",
- "wxSph",
- "KWAI",
- "youtube",
- "wxGzh",
- "bilibili",
- "twitter",
- "tiktok",
- "facebook",
- "instagram",
- "threads",
- "pinterest",
- "linkedin"
- ]
- }
- },
- "required": [
- "type",
- "title",
- "description",
- "tags",
- "medias",
- "action",
- "mediaId",
- "groupId"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "fullContent"
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "medias": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "IMAGE",
- "VIDEO"
- ]
- },
- "url": {
- "type": "string"
- },
- "thumbUrl": {
- "type": "string"
- },
- "prompt": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "url"
- ],
- "additionalProperties": false
- }
- },
- "action": {
- "type": "string",
- "const": "createChannel"
- },
- "platform": {
- "type": "string",
- "enum": [
- "douyin",
- "xhs",
- "wxSph",
- "KWAI",
- "youtube",
- "wxGzh",
- "bilibili",
- "twitter",
- "tiktok",
- "facebook",
- "instagram",
- "threads",
- "pinterest",
- "linkedin"
- ]
- },
- "errorMessage": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "title",
- "description",
- "tags",
- "medias",
- "action",
- "platform"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "fullContent"
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "medias": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "IMAGE",
- "VIDEO"
- ]
- },
- "url": {
- "type": "string"
- },
- "thumbUrl": {
- "type": "string"
- },
- "prompt": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "url"
- ],
- "additionalProperties": false
- }
- },
- "action": {
- "type": "string",
- "const": "updateChannel"
- },
- "platform": {
- "type": "string",
- "enum": [
- "douyin",
- "xhs",
- "wxSph",
- "KWAI",
- "youtube",
- "wxGzh",
- "bilibili",
- "twitter",
- "tiktok",
- "facebook",
- "instagram",
- "threads",
- "pinterest",
- "linkedin"
- ]
- },
- "accountId": {
- "type": "string"
- },
- "errorMessage": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "title",
- "description",
- "tags",
- "medias",
- "action",
- "platform"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "fullContent"
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "medias": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "IMAGE",
- "VIDEO"
- ]
- },
- "url": {
- "type": "string"
- },
- "thumbUrl": {
- "type": "string"
- },
- "prompt": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "url"
- ],
- "additionalProperties": false
- }
- },
- "action": {
- "type": "string",
- "const": "navigateToPublish"
- },
- "platform": {
- "type": "string",
- "enum": [
- "douyin",
- "xhs",
- "wxSph",
- "KWAI",
- "youtube",
- "wxGzh",
- "bilibili",
- "twitter",
- "tiktok",
- "facebook",
- "instagram",
- "threads",
- "pinterest",
- "linkedin"
- ]
- },
- "accountId": {
- "type": "string"
- },
- "publishTime": {
- "type": "string",
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
- },
- "topics": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "errorMessage": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "title",
- "description",
- "tags",
- "medias",
- "action",
- "platform"
- ],
- "additionalProperties": false
- }
- ]
- }
- }
- ]
- },
- {
- "type": "null"
- }
- ]
- },
- "total_cost_usd": {
- "type": "number"
- },
- "usage": {
- "type": "object",
- "properties": {
- "cache_creation": {
- "type": "object",
- "properties": {
- "ephemeral_1h_input_tokens": {
- "type": "number"
- },
- "ephemeral_5m_input_tokens": {
- "type": "number"
- }
- },
- "required": [
- "ephemeral_1h_input_tokens",
- "ephemeral_5m_input_tokens"
- ],
- "additionalProperties": false
- },
- "cache_creation_input_tokens": {
- "type": "number"
- },
- "cache_read_input_tokens": {
- "type": "number"
- },
- "input_tokens": {
- "type": "number"
- },
- "output_tokens": {
- "type": "number"
- },
- "server_tool_use": {
- "type": "object",
- "properties": {
- "web_search_requests": {
- "type": "number"
- }
- },
- "required": [
- "web_search_requests"
- ],
- "additionalProperties": false
- }
- },
- "additionalProperties": false
- },
- "permission_denials": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "tool_name": {
- "type": "string"
- },
- "tool_use_id": {
- "type": "string"
- },
- "tool_input": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {},
- "properties": {}
- }
- },
- "required": [
- "tool_name",
- "tool_use_id",
- "tool_input"
- ],
- "additionalProperties": false
- }
- },
- "structured_output": {}
- },
- "required": [
- "type",
- "subtype",
- "uuid"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "result"
- },
- "subtype": {
- "type": "string",
- "enum": [
- "error_during_execution",
- "error_max_turns",
- "error_max_budget_usd",
- "error_max_structured_output_retries"
- ]
- },
- "uuid": {
- "type": "string"
- },
- "duration_ms": {
- "type": "number"
- },
- "duration_api_ms": {
- "type": "number"
- },
- "is_error": {
- "type": "boolean"
- },
- "num_turns": {
- "type": "number"
- },
- "total_cost_usd": {
- "type": "number"
- },
- "usage": {
- "type": "object",
- "properties": {
- "cache_creation": {
- "type": "object",
- "properties": {
- "ephemeral_1h_input_tokens": {
- "type": "number"
- },
- "ephemeral_5m_input_tokens": {
- "type": "number"
- }
- },
- "required": [
- "ephemeral_1h_input_tokens",
- "ephemeral_5m_input_tokens"
- ],
- "additionalProperties": false
- },
- "cache_creation_input_tokens": {
- "type": "number"
- },
- "cache_read_input_tokens": {
- "type": "number"
- },
- "input_tokens": {
- "type": "number"
- },
- "output_tokens": {
- "type": "number"
- },
- "server_tool_use": {
- "type": "object",
- "properties": {
- "web_search_requests": {
- "type": "number"
- }
- },
- "required": [
- "web_search_requests"
- ],
- "additionalProperties": false
- }
- },
- "additionalProperties": false
- },
- "permission_denials": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "tool_name": {
- "type": "string"
- },
- "tool_use_id": {
- "type": "string"
- },
- "tool_input": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {},
- "properties": {}
- }
- },
- "required": [
- "tool_name",
- "tool_use_id",
- "tool_input"
- ],
- "additionalProperties": false
- }
- },
- "errors": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "required": [
- "type",
- "subtype",
- "uuid"
- ],
- "additionalProperties": false
- }
- ]
- },
- {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "system"
- },
- "subtype": {
- "type": "string",
- "const": "compact_boundary"
- },
- "uuid": {
- "type": "string"
- },
- "compact_metadata": {
- "type": "object",
- "properties": {
- "trigger": {
- "type": "string",
- "enum": [
- "manual",
- "auto"
- ]
- },
- "pre_tokens": {
- "type": "number"
- }
- },
- "required": [
- "trigger",
- "pre_tokens"
- ],
- "additionalProperties": false
- }
- },
- "required": [
- "type",
- "subtype",
- "uuid"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "system"
- },
- "subtype": {
- "type": "string",
- "const": "status"
- },
- "uuid": {
- "type": "string"
- },
- "status": {
- "anyOf": [
- {
- "type": "string",
- "enum": [
- "compacting"
- ]
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "required": [
- "type",
- "subtype",
- "uuid"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "system"
- },
- "subtype": {
- "type": "string",
- "const": "hook_response"
- },
- "uuid": {
- "type": "string"
- },
- "hook_name": {
- "type": "string"
- },
- "hook_event": {
- "type": "string"
- },
- "stdout": {
- "type": "string"
- },
- "stderr": {
- "type": "string"
- },
- "exit_code": {
- "type": "number"
- }
- },
- "required": [
- "type",
- "subtype",
- "uuid"
- ],
- "additionalProperties": false
- }
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "stream_event"
- },
- "uuid": {
- "type": "string"
- },
- "event": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "message_start"
- },
- "message": {}
- },
- "required": [
- "type",
- "message"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "message_delta"
- },
- "delta": {
- "type": "object",
- "properties": {
- "stop_reason": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "stop_sequence": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "additionalProperties": false
- },
- "usage": {
- "type": "object",
- "properties": {
- "cache_creation_input_tokens": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ]
- },
- "cache_read_input_tokens": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ]
- },
- "input_tokens": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ]
- },
- "output_tokens": {
- "type": "number"
- },
- "server_tool_use": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "web_search_requests": {
- "type": "number"
- }
- },
- "required": [
- "web_search_requests"
- ],
- "additionalProperties": false
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "additionalProperties": {}
- }
- },
- "required": [
- "type"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "message_stop"
- }
- },
- "required": [
- "type"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "content_block_start"
- },
- "index": {
- "type": "number"
- },
- "content_block": {}
- },
- "required": [
- "type",
- "index",
- "content_block"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "content_block_delta"
- },
- "index": {
- "type": "number"
- },
- "delta": {}
- },
- "required": [
- "type",
- "index",
- "delta"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "content_block_stop"
- },
- "index": {
- "type": "number"
- }
- },
- "required": [
- "type",
- "index"
- ],
- "additionalProperties": false
- }
- ]
- },
- "parent_tool_use_id": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "required": [
- "type",
- "uuid"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "tool_progress"
- },
- "uuid": {
- "type": "string"
- },
- "tool_use_id": {
- "type": "string"
- },
- "tool_name": {
- "type": "string"
- },
- "parent_tool_use_id": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "elapsed_time_seconds": {
- "type": "number"
- }
- },
- "required": [
- "type",
- "uuid"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "auth_status"
- },
- "uuid": {
- "type": "string"
- },
- "isAuthenticating": {
- "type": "boolean"
- },
- "output": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "error": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "uuid"
- ],
- "additionalProperties": false
- }
- ]
- }
- }
- },
- "required": [
- "type",
- "taskId"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "keep_alive"
- }
- },
- "required": [
- "type"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "title_updated"
- },
- "taskId": {
- "type": "string"
- },
- "title": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "taskId",
- "title"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "assistant",
- "user",
- "result",
- "system",
- "stream_event",
- "tool_progress",
- "auth_status"
- ]
- },
- "message": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "user"
- },
- "uuid": {
- "type": "string"
- },
- "message": {
- "type": "object",
- "properties": {
- "content": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "array",
- "items": {}
- }
- ]
- },
- "role": {
- "type": "string",
- "enum": [
- "user",
- "assistant"
- ]
- }
- },
- "required": [
- "content",
- "role"
- ],
- "additionalProperties": false
- },
- "content": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "array",
- "items": {}
- }
- ]
- },
- "parent_tool_use_id": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "isSynthetic": {
- "type": "boolean"
- },
- "tool_use_result": {},
- "isReplay": {
- "type": "boolean",
- "const": true
- }
- },
- "required": [
- "type"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "assistant"
- },
- "uuid": {
- "type": "string"
- },
- "message": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "content": {
- "type": "array",
- "items": {}
- },
- "model": {
- "type": "string"
- },
- "role": {
- "type": "string",
- "const": "assistant"
- },
- "stop_reason": {
- "anyOf": [
- {
- "type": "string",
- "enum": [
- "end_turn",
- "max_tokens",
- "stop_sequence",
- "tool_use",
- "pause_turn",
- "refusal"
- ]
- },
- {
- "type": "null"
- }
- ]
- },
- "stop_sequence": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "type": {
- "type": "string",
- "const": "message"
- },
- "usage": {
- "type": "object",
- "properties": {
- "cache_creation": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "ephemeral_1h_input_tokens": {
- "type": "number"
- },
- "ephemeral_5m_input_tokens": {
- "type": "number"
- }
- },
- "required": [
- "ephemeral_1h_input_tokens",
- "ephemeral_5m_input_tokens"
- ],
- "additionalProperties": false
- },
- {
- "type": "null"
- }
- ]
- },
- "cache_creation_input_tokens": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ]
- },
- "cache_read_input_tokens": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ]
- },
- "input_tokens": {
- "type": "number"
- },
- "output_tokens": {
- "type": "number"
- },
- "server_tool_use": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "web_search_requests": {
- "type": "number"
- }
- },
- "required": [
- "web_search_requests"
- ],
- "additionalProperties": false
- },
- {
- "type": "null"
- }
- ]
- },
- "service_tier": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "additionalProperties": {}
- },
- "container": {
- "anyOf": [
- {},
- {
- "type": "null"
- }
- ]
- },
- "context_management": {
- "anyOf": [
- {},
- {
- "type": "null"
- }
- ]
- }
- },
- "additionalProperties": {}
- },
- "parent_tool_use_id": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "error": {
- "type": "string",
- "enum": [
- "authentication_failed",
- "billing_error",
- "rate_limit",
- "invalid_request",
- "server_error",
- "unknown"
- ]
- }
- },
- "required": [
- "type",
- "uuid"
- ],
- "additionalProperties": false
- },
- {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "result"
- },
- "subtype": {
- "type": "string",
- "const": "success"
- },
- "uuid": {
- "type": "string"
- },
- "duration_ms": {
- "type": "number"
- },
- "duration_api_ms": {
- "type": "number"
- },
- "is_error": {
- "type": "boolean"
- },
- "num_turns": {
- "type": "number"
- },
- "message": {
- "type": "string"
- },
- "result": {
- "anyOf": [
- {
- "anyOf": [
- {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "mediaOnly"
- },
- "medias": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "IMAGE",
- "VIDEO"
- ]
- },
- "url": {
- "type": "string"
- },
- "thumbUrl": {
- "type": "string"
- },
- "prompt": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "url"
- ],
- "additionalProperties": false
- }
- },
- "action": {
- "type": "string",
- "const": "none"
- }
- },
- "required": [
- "type",
- "medias",
- "action"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "mediaOnly"
- },
- "medias": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "IMAGE",
- "VIDEO"
- ]
- },
- "url": {
- "type": "string"
- },
- "thumbUrl": {
- "type": "string"
- },
- "prompt": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "url"
- ],
- "additionalProperties": false
- }
- },
- "action": {
- "type": "string",
- "const": "navigateToMedia"
- },
- "mediaId": {
- "type": "string"
- },
- "groupId": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "medias",
- "action",
- "mediaId",
- "groupId"
- ],
- "additionalProperties": false
- }
- ]
- },
- {
- "minItems": 1,
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "fullContent"
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "medias": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "IMAGE",
- "VIDEO"
- ]
- },
- "url": {
- "type": "string"
- },
- "thumbUrl": {
- "type": "string"
- },
- "prompt": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "url"
- ],
- "additionalProperties": false
- }
- },
- "action": {
- "type": "string",
- "const": "none"
- },
- "platform": {
- "type": "string",
- "enum": [
- "douyin",
- "xhs",
- "wxSph",
- "KWAI",
- "youtube",
- "wxGzh",
- "bilibili",
- "twitter",
- "tiktok",
- "facebook",
- "instagram",
- "threads",
- "pinterest",
- "linkedin"
- ]
- }
- },
- "required": [
- "type",
- "title",
- "description",
- "tags",
- "medias",
- "action"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "fullContent"
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "medias": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "IMAGE",
- "VIDEO"
- ]
- },
- "url": {
- "type": "string"
- },
- "thumbUrl": {
- "type": "string"
- },
- "prompt": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "url"
- ],
- "additionalProperties": false
- }
- },
- "action": {
- "type": "string",
- "const": "navigateToDraft"
- },
- "groupId": {
- "type": "string"
- },
- "platform": {
- "type": "string",
- "enum": [
- "douyin",
- "xhs",
- "wxSph",
- "KWAI",
- "youtube",
- "wxGzh",
- "bilibili",
- "twitter",
- "tiktok",
- "facebook",
- "instagram",
- "threads",
- "pinterest",
- "linkedin"
- ]
- }
- },
- "required": [
- "type",
- "title",
- "description",
- "tags",
- "medias",
- "action",
- "groupId"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "fullContent"
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "medias": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "IMAGE",
- "VIDEO"
- ]
- },
- "url": {
- "type": "string"
- },
- "thumbUrl": {
- "type": "string"
- },
- "prompt": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "url"
- ],
- "additionalProperties": false
- }
- },
- "action": {
- "type": "string",
- "const": "navigateToMedia"
- },
- "mediaId": {
- "type": "string"
- },
- "groupId": {
- "type": "string"
- },
- "platform": {
- "type": "string",
- "enum": [
- "douyin",
- "xhs",
- "wxSph",
- "KWAI",
- "youtube",
- "wxGzh",
- "bilibili",
- "twitter",
- "tiktok",
- "facebook",
- "instagram",
- "threads",
- "pinterest",
- "linkedin"
- ]
- }
- },
- "required": [
- "type",
- "title",
- "description",
- "tags",
- "medias",
- "action",
- "mediaId",
- "groupId"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "fullContent"
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "medias": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "IMAGE",
- "VIDEO"
- ]
- },
- "url": {
- "type": "string"
- },
- "thumbUrl": {
- "type": "string"
- },
- "prompt": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "url"
- ],
- "additionalProperties": false
- }
- },
- "action": {
- "type": "string",
- "const": "createChannel"
- },
- "platform": {
- "type": "string",
- "enum": [
- "douyin",
- "xhs",
- "wxSph",
- "KWAI",
- "youtube",
- "wxGzh",
- "bilibili",
- "twitter",
- "tiktok",
- "facebook",
- "instagram",
- "threads",
- "pinterest",
- "linkedin"
- ]
- },
- "errorMessage": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "title",
- "description",
- "tags",
- "medias",
- "action",
- "platform"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "fullContent"
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "medias": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "IMAGE",
- "VIDEO"
- ]
- },
- "url": {
- "type": "string"
- },
- "thumbUrl": {
- "type": "string"
- },
- "prompt": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "url"
- ],
- "additionalProperties": false
- }
- },
- "action": {
- "type": "string",
- "const": "updateChannel"
- },
- "platform": {
- "type": "string",
- "enum": [
- "douyin",
- "xhs",
- "wxSph",
- "KWAI",
- "youtube",
- "wxGzh",
- "bilibili",
- "twitter",
- "tiktok",
- "facebook",
- "instagram",
- "threads",
- "pinterest",
- "linkedin"
- ]
- },
- "accountId": {
- "type": "string"
- },
- "errorMessage": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "title",
- "description",
- "tags",
- "medias",
- "action",
- "platform"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "fullContent"
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "medias": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "IMAGE",
- "VIDEO"
- ]
- },
- "url": {
- "type": "string"
- },
- "thumbUrl": {
- "type": "string"
- },
- "prompt": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "url"
- ],
- "additionalProperties": false
- }
- },
- "action": {
- "type": "string",
- "const": "navigateToPublish"
- },
- "platform": {
- "type": "string",
- "enum": [
- "douyin",
- "xhs",
- "wxSph",
- "KWAI",
- "youtube",
- "wxGzh",
- "bilibili",
- "twitter",
- "tiktok",
- "facebook",
- "instagram",
- "threads",
- "pinterest",
- "linkedin"
- ]
- },
- "accountId": {
- "type": "string"
- },
- "publishTime": {
- "type": "string",
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
- },
- "topics": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "errorMessage": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "title",
- "description",
- "tags",
- "medias",
- "action",
- "platform"
- ],
- "additionalProperties": false
- }
- ]
- }
- }
- ]
- },
- {
- "type": "null"
- }
- ]
- },
- "total_cost_usd": {
- "type": "number"
- },
- "usage": {
- "type": "object",
- "properties": {
- "cache_creation": {
- "type": "object",
- "properties": {
- "ephemeral_1h_input_tokens": {
- "type": "number"
- },
- "ephemeral_5m_input_tokens": {
- "type": "number"
- }
- },
- "required": [
- "ephemeral_1h_input_tokens",
- "ephemeral_5m_input_tokens"
- ],
- "additionalProperties": false
- },
- "cache_creation_input_tokens": {
- "type": "number"
- },
- "cache_read_input_tokens": {
- "type": "number"
- },
- "input_tokens": {
- "type": "number"
- },
- "output_tokens": {
- "type": "number"
- },
- "server_tool_use": {
- "type": "object",
- "properties": {
- "web_search_requests": {
- "type": "number"
- }
- },
- "required": [
- "web_search_requests"
- ],
- "additionalProperties": false
- }
- },
- "additionalProperties": false
- },
- "permission_denials": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "tool_name": {
- "type": "string"
- },
- "tool_use_id": {
- "type": "string"
- },
- "tool_input": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {},
- "properties": {}
- }
- },
- "required": [
- "tool_name",
- "tool_use_id",
- "tool_input"
- ],
- "additionalProperties": false
- }
- },
- "structured_output": {}
- },
- "required": [
- "type",
- "subtype",
- "uuid"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "result"
- },
- "subtype": {
- "type": "string",
- "enum": [
- "error_during_execution",
- "error_max_turns",
- "error_max_budget_usd",
- "error_max_structured_output_retries"
- ]
- },
- "uuid": {
- "type": "string"
- },
- "duration_ms": {
- "type": "number"
- },
- "duration_api_ms": {
- "type": "number"
- },
- "is_error": {
- "type": "boolean"
- },
- "num_turns": {
- "type": "number"
- },
- "total_cost_usd": {
- "type": "number"
- },
- "usage": {
- "type": "object",
- "properties": {
- "cache_creation": {
- "type": "object",
- "properties": {
- "ephemeral_1h_input_tokens": {
- "type": "number"
- },
- "ephemeral_5m_input_tokens": {
- "type": "number"
- }
- },
- "required": [
- "ephemeral_1h_input_tokens",
- "ephemeral_5m_input_tokens"
- ],
- "additionalProperties": false
- },
- "cache_creation_input_tokens": {
- "type": "number"
- },
- "cache_read_input_tokens": {
- "type": "number"
- },
- "input_tokens": {
- "type": "number"
- },
- "output_tokens": {
- "type": "number"
- },
- "server_tool_use": {
- "type": "object",
- "properties": {
- "web_search_requests": {
- "type": "number"
- }
- },
- "required": [
- "web_search_requests"
- ],
- "additionalProperties": false
- }
- },
- "additionalProperties": false
- },
- "permission_denials": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "tool_name": {
- "type": "string"
- },
- "tool_use_id": {
- "type": "string"
- },
- "tool_input": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {},
- "properties": {}
- }
- },
- "required": [
- "tool_name",
- "tool_use_id",
- "tool_input"
- ],
- "additionalProperties": false
- }
- },
- "errors": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "required": [
- "type",
- "subtype",
- "uuid"
- ],
- "additionalProperties": false
- }
- ]
- },
- {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "system"
- },
- "subtype": {
- "type": "string",
- "const": "compact_boundary"
- },
- "uuid": {
- "type": "string"
- },
- "compact_metadata": {
- "type": "object",
- "properties": {
- "trigger": {
- "type": "string",
- "enum": [
- "manual",
- "auto"
- ]
- },
- "pre_tokens": {
- "type": "number"
- }
- },
- "required": [
- "trigger",
- "pre_tokens"
- ],
- "additionalProperties": false
- }
- },
- "required": [
- "type",
- "subtype",
- "uuid"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "system"
- },
- "subtype": {
- "type": "string",
- "const": "status"
- },
- "uuid": {
- "type": "string"
- },
- "status": {
- "anyOf": [
- {
- "type": "string",
- "enum": [
- "compacting"
- ]
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "required": [
- "type",
- "subtype",
- "uuid"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "system"
- },
- "subtype": {
- "type": "string",
- "const": "hook_response"
- },
- "uuid": {
- "type": "string"
- },
- "hook_name": {
- "type": "string"
- },
- "hook_event": {
- "type": "string"
- },
- "stdout": {
- "type": "string"
- },
- "stderr": {
- "type": "string"
- },
- "exit_code": {
- "type": "number"
- }
- },
- "required": [
- "type",
- "subtype",
- "uuid"
- ],
- "additionalProperties": false
- }
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "stream_event"
- },
- "uuid": {
- "type": "string"
- },
- "event": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "message_start"
- },
- "message": {}
- },
- "required": [
- "type",
- "message"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "message_delta"
- },
- "delta": {
- "type": "object",
- "properties": {
- "stop_reason": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "stop_sequence": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "additionalProperties": false
- },
- "usage": {
- "type": "object",
- "properties": {
- "cache_creation_input_tokens": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ]
- },
- "cache_read_input_tokens": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ]
- },
- "input_tokens": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ]
- },
- "output_tokens": {
- "type": "number"
- },
- "server_tool_use": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "web_search_requests": {
- "type": "number"
- }
- },
- "required": [
- "web_search_requests"
- ],
- "additionalProperties": false
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "additionalProperties": {}
- }
- },
- "required": [
- "type"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "message_stop"
- }
- },
- "required": [
- "type"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "content_block_start"
- },
- "index": {
- "type": "number"
- },
- "content_block": {}
- },
- "required": [
- "type",
- "index",
- "content_block"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "content_block_delta"
- },
- "index": {
- "type": "number"
- },
- "delta": {}
- },
- "required": [
- "type",
- "index",
- "delta"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "content_block_stop"
- },
- "index": {
- "type": "number"
- }
- },
- "required": [
- "type",
- "index"
- ],
- "additionalProperties": false
- }
- ]
- },
- "parent_tool_use_id": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "required": [
- "type",
- "uuid"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "tool_progress"
- },
- "uuid": {
- "type": "string"
- },
- "tool_use_id": {
- "type": "string"
- },
- "tool_name": {
- "type": "string"
- },
- "parent_tool_use_id": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "elapsed_time_seconds": {
- "type": "number"
- }
- },
- "required": [
- "type",
- "uuid"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "auth_status"
- },
- "uuid": {
- "type": "string"
- },
- "isAuthenticating": {
- "type": "boolean"
- },
- "output": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "error": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "uuid"
- ],
- "additionalProperties": false
- }
- ]
- }
- },
- "required": [
- "type",
- "message"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "error"
- },
- "code": {
- "type": "number"
- },
- "message": {
- "type": "string"
- },
- "data": {},
- "timestamp": {
- "type": "number"
- }
- },
- "required": [
- "type",
- "code",
- "message",
- "timestamp"
- ],
- "additionalProperties": false
- }
- ]
- }
- },
- "required": [
- "data"
- ]
- }
- }
- },
- "headers": {}
- }
- },
- "security": []
- }
- },
- "/api/agent/tasks/{taskId}": {
- "get": {
- "summary": "Get Content Generation Task",
- "deprecated": false,
- "description": "Get a content generation task.",
- "operationId": "AgentController_getContentGenerationTask",
- "tags": [
- "Close/Me/Agent"
- ],
- "parameters": [
- {
- "name": "taskId",
- "in": "path",
- "description": "",
- "required": true,
- "example": "",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "userId": {
- "type": "string"
- },
- "createdAt": {
- "type": "string",
- "format": "date-time"
- },
- "updatedAt": {
- "type": "string",
- "format": "date-time"
- },
- "title": {
- "type": "string"
- },
- "messages": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "user"
- },
- "uuid": {
- "type": "string"
- },
- "message": {
- "type": "object",
- "properties": {
- "content": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "array",
- "items": {}
- }
- ]
- },
- "role": {
- "type": "string",
- "enum": [
- "user",
- "assistant"
- ]
- }
- },
- "required": [
- "content",
- "role"
- ],
- "additionalProperties": false
- },
- "content": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "array",
- "items": {}
- }
- ]
- },
- "parent_tool_use_id": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "isSynthetic": {
- "type": "boolean"
- },
- "tool_use_result": {},
- "isReplay": {
- "type": "boolean",
- "const": true
- }
- },
- "required": [
- "type"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "assistant"
- },
- "uuid": {
- "type": "string"
- },
- "message": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "content": {
- "type": "array",
- "items": {}
- },
- "model": {
- "type": "string"
- },
- "role": {
- "type": "string",
- "const": "assistant"
- },
- "stop_reason": {
- "anyOf": [
- {
- "type": "string",
- "enum": [
- "end_turn",
- "max_tokens",
- "stop_sequence",
- "tool_use",
- "pause_turn",
- "refusal"
- ]
- },
- {
- "type": "null"
- }
- ]
- },
- "stop_sequence": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "type": {
- "type": "string",
- "const": "message"
- },
- "usage": {
- "type": "object",
- "properties": {
- "cache_creation": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "ephemeral_1h_input_tokens": {
- "type": "number"
- },
- "ephemeral_5m_input_tokens": {
- "type": "number"
- }
- },
- "required": [
- "ephemeral_1h_input_tokens",
- "ephemeral_5m_input_tokens"
- ],
- "additionalProperties": false
- },
- {
- "type": "null"
- }
- ]
- },
- "cache_creation_input_tokens": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ]
- },
- "cache_read_input_tokens": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ]
- },
- "input_tokens": {
- "type": "number"
- },
- "output_tokens": {
- "type": "number"
- },
- "server_tool_use": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "web_search_requests": {
- "type": "number"
- }
- },
- "required": [
- "web_search_requests"
- ],
- "additionalProperties": false
- },
- {
- "type": "null"
- }
- ]
- },
- "service_tier": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "additionalProperties": {}
- },
- "container": {
- "anyOf": [
- {},
- {
- "type": "null"
- }
- ]
- },
- "context_management": {
- "anyOf": [
- {},
- {
- "type": "null"
- }
- ]
- }
- },
- "additionalProperties": {}
- },
- "parent_tool_use_id": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "error": {
- "type": "string",
- "enum": [
- "authentication_failed",
- "billing_error",
- "rate_limit",
- "invalid_request",
- "server_error",
- "unknown"
- ]
- }
- },
- "required": [
- "type",
- "uuid"
- ],
- "additionalProperties": false
- },
- {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "result"
- },
- "subtype": {
- "type": "string",
- "const": "success"
- },
- "uuid": {
- "type": "string"
- },
- "duration_ms": {
- "type": "number"
- },
- "duration_api_ms": {
- "type": "number"
- },
- "is_error": {
- "type": "boolean"
- },
- "num_turns": {
- "type": "number"
- },
- "message": {
- "type": "string"
- },
- "result": {
- "anyOf": [
- {
- "anyOf": [
- {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "mediaOnly"
- },
- "medias": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "IMAGE",
- "VIDEO"
- ]
- },
- "url": {
- "type": "string"
- },
- "thumbUrl": {
- "type": "string"
- },
- "prompt": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "url"
- ],
- "additionalProperties": false
- }
- },
- "action": {
- "type": "string",
- "const": "none"
- }
- },
- "required": [
- "type",
- "medias",
- "action"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "mediaOnly"
- },
- "medias": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "IMAGE",
- "VIDEO"
- ]
- },
- "url": {
- "type": "string"
- },
- "thumbUrl": {
- "type": "string"
- },
- "prompt": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "url"
- ],
- "additionalProperties": false
- }
- },
- "action": {
- "type": "string",
- "const": "navigateToMedia"
- },
- "mediaId": {
- "type": "string"
- },
- "groupId": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "medias",
- "action",
- "mediaId",
- "groupId"
- ],
- "additionalProperties": false
- }
- ]
- },
- {
- "minItems": 1,
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "fullContent"
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "medias": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "IMAGE",
- "VIDEO"
- ]
- },
- "url": {
- "type": "string"
- },
- "thumbUrl": {
- "type": "string"
- },
- "prompt": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "url"
- ],
- "additionalProperties": false
- }
- },
- "action": {
- "type": "string",
- "const": "none"
- },
- "platform": {
- "type": "string",
- "enum": [
- "douyin",
- "xhs",
- "wxSph",
- "KWAI",
- "youtube",
- "wxGzh",
- "bilibili",
- "twitter",
- "tiktok",
- "facebook",
- "instagram",
- "threads",
- "pinterest",
- "linkedin"
- ]
- }
- },
- "required": [
- "type",
- "title",
- "description",
- "tags",
- "medias",
- "action"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "fullContent"
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "medias": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "IMAGE",
- "VIDEO"
- ]
- },
- "url": {
- "type": "string"
- },
- "thumbUrl": {
- "type": "string"
- },
- "prompt": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "url"
- ],
- "additionalProperties": false
- }
- },
- "action": {
- "type": "string",
- "const": "navigateToDraft"
- },
- "groupId": {
- "type": "string"
- },
- "platform": {
- "type": "string",
- "enum": [
- "douyin",
- "xhs",
- "wxSph",
- "KWAI",
- "youtube",
- "wxGzh",
- "bilibili",
- "twitter",
- "tiktok",
- "facebook",
- "instagram",
- "threads",
- "pinterest",
- "linkedin"
- ]
- }
- },
- "required": [
- "type",
- "title",
- "description",
- "tags",
- "medias",
- "action",
- "groupId"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "fullContent"
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "medias": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "IMAGE",
- "VIDEO"
- ]
- },
- "url": {
- "type": "string"
- },
- "thumbUrl": {
- "type": "string"
- },
- "prompt": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "url"
- ],
- "additionalProperties": false
- }
- },
- "action": {
- "type": "string",
- "const": "navigateToMedia"
- },
- "mediaId": {
- "type": "string"
- },
- "groupId": {
- "type": "string"
- },
- "platform": {
- "type": "string",
- "enum": [
- "douyin",
- "xhs",
- "wxSph",
- "KWAI",
- "youtube",
- "wxGzh",
- "bilibili",
- "twitter",
- "tiktok",
- "facebook",
- "instagram",
- "threads",
- "pinterest",
- "linkedin"
- ]
- }
- },
- "required": [
- "type",
- "title",
- "description",
- "tags",
- "medias",
- "action",
- "mediaId",
- "groupId"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "fullContent"
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "medias": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "IMAGE",
- "VIDEO"
- ]
- },
- "url": {
- "type": "string"
- },
- "thumbUrl": {
- "type": "string"
- },
- "prompt": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "url"
- ],
- "additionalProperties": false
- }
- },
- "action": {
- "type": "string",
- "const": "createChannel"
- },
- "platform": {
- "type": "string",
- "enum": [
- "douyin",
- "xhs",
- "wxSph",
- "KWAI",
- "youtube",
- "wxGzh",
- "bilibili",
- "twitter",
- "tiktok",
- "facebook",
- "instagram",
- "threads",
- "pinterest",
- "linkedin"
- ]
- },
- "errorMessage": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "title",
- "description",
- "tags",
- "medias",
- "action",
- "platform"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "fullContent"
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "medias": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "IMAGE",
- "VIDEO"
- ]
- },
- "url": {
- "type": "string"
- },
- "thumbUrl": {
- "type": "string"
- },
- "prompt": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "url"
- ],
- "additionalProperties": false
- }
- },
- "action": {
- "type": "string",
- "const": "updateChannel"
- },
- "platform": {
- "type": "string",
- "enum": [
- "douyin",
- "xhs",
- "wxSph",
- "KWAI",
- "youtube",
- "wxGzh",
- "bilibili",
- "twitter",
- "tiktok",
- "facebook",
- "instagram",
- "threads",
- "pinterest",
- "linkedin"
- ]
- },
- "accountId": {
- "type": "string"
- },
- "errorMessage": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "title",
- "description",
- "tags",
- "medias",
- "action",
- "platform"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "fullContent"
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "medias": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "IMAGE",
- "VIDEO"
- ]
- },
- "url": {
- "type": "string"
- },
- "thumbUrl": {
- "type": "string"
- },
- "prompt": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "url"
- ],
- "additionalProperties": false
- }
- },
- "action": {
- "type": "string",
- "const": "navigateToPublish"
- },
- "platform": {
- "type": "string",
- "enum": [
- "douyin",
- "xhs",
- "wxSph",
- "KWAI",
- "youtube",
- "wxGzh",
- "bilibili",
- "twitter",
- "tiktok",
- "facebook",
- "instagram",
- "threads",
- "pinterest",
- "linkedin"
- ]
- },
- "accountId": {
- "type": "string"
- },
- "publishTime": {
- "type": "string",
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
- },
- "topics": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "errorMessage": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "title",
- "description",
- "tags",
- "medias",
- "action",
- "platform"
- ],
- "additionalProperties": false
- }
- ]
- }
- }
- ]
- },
- {
- "type": "null"
- }
- ]
- },
- "total_cost_usd": {
- "type": "number"
- },
- "usage": {
- "type": "object",
- "properties": {
- "cache_creation": {
- "type": "object",
- "properties": {
- "ephemeral_1h_input_tokens": {
- "type": "number"
- },
- "ephemeral_5m_input_tokens": {
- "type": "number"
- }
- },
- "required": [
- "ephemeral_1h_input_tokens",
- "ephemeral_5m_input_tokens"
- ],
- "additionalProperties": false
- },
- "cache_creation_input_tokens": {
- "type": "number"
- },
- "cache_read_input_tokens": {
- "type": "number"
- },
- "input_tokens": {
- "type": "number"
- },
- "output_tokens": {
- "type": "number"
- },
- "server_tool_use": {
- "type": "object",
- "properties": {
- "web_search_requests": {
- "type": "number"
- }
- },
- "required": [
- "web_search_requests"
- ],
- "additionalProperties": false
- }
- },
- "additionalProperties": false
- },
- "permission_denials": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "tool_name": {
- "type": "string"
- },
- "tool_use_id": {
- "type": "string"
- },
- "tool_input": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {},
- "properties": {}
- }
- },
- "required": [
- "tool_name",
- "tool_use_id",
- "tool_input"
- ],
- "additionalProperties": false
- }
- },
- "structured_output": {}
- },
- "required": [
- "type",
- "subtype",
- "uuid"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "result"
- },
- "subtype": {
- "type": "string",
- "enum": [
- "error_during_execution",
- "error_max_turns",
- "error_max_budget_usd",
- "error_max_structured_output_retries"
- ]
- },
- "uuid": {
- "type": "string"
- },
- "duration_ms": {
- "type": "number"
- },
- "duration_api_ms": {
- "type": "number"
- },
- "is_error": {
- "type": "boolean"
- },
- "num_turns": {
- "type": "number"
- },
- "total_cost_usd": {
- "type": "number"
- },
- "usage": {
- "type": "object",
- "properties": {
- "cache_creation": {
- "type": "object",
- "properties": {
- "ephemeral_1h_input_tokens": {
- "type": "number"
- },
- "ephemeral_5m_input_tokens": {
- "type": "number"
- }
- },
- "required": [
- "ephemeral_1h_input_tokens",
- "ephemeral_5m_input_tokens"
- ],
- "additionalProperties": false
- },
- "cache_creation_input_tokens": {
- "type": "number"
- },
- "cache_read_input_tokens": {
- "type": "number"
- },
- "input_tokens": {
- "type": "number"
- },
- "output_tokens": {
- "type": "number"
- },
- "server_tool_use": {
- "type": "object",
- "properties": {
- "web_search_requests": {
- "type": "number"
- }
- },
- "required": [
- "web_search_requests"
- ],
- "additionalProperties": false
- }
- },
- "additionalProperties": false
- },
- "permission_denials": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "tool_name": {
- "type": "string"
- },
- "tool_use_id": {
- "type": "string"
- },
- "tool_input": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {},
- "properties": {}
- }
- },
- "required": [
- "tool_name",
- "tool_use_id",
- "tool_input"
- ],
- "additionalProperties": false
- }
- },
- "errors": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "required": [
- "type",
- "subtype",
- "uuid"
- ],
- "additionalProperties": false
- }
- ]
- },
- {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "system"
- },
- "subtype": {
- "type": "string",
- "const": "compact_boundary"
- },
- "uuid": {
- "type": "string"
- },
- "compact_metadata": {
- "type": "object",
- "properties": {
- "trigger": {
- "type": "string",
- "enum": [
- "manual",
- "auto"
- ]
- },
- "pre_tokens": {
- "type": "number"
- }
- },
- "required": [
- "trigger",
- "pre_tokens"
- ],
- "additionalProperties": false
- }
- },
- "required": [
- "type",
- "subtype",
- "uuid"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "system"
- },
- "subtype": {
- "type": "string",
- "const": "status"
- },
- "uuid": {
- "type": "string"
- },
- "status": {
- "anyOf": [
- {
- "type": "string",
- "enum": [
- "compacting"
- ]
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "required": [
- "type",
- "subtype",
- "uuid"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "system"
- },
- "subtype": {
- "type": "string",
- "const": "hook_response"
- },
- "uuid": {
- "type": "string"
- },
- "hook_name": {
- "type": "string"
- },
- "hook_event": {
- "type": "string"
- },
- "stdout": {
- "type": "string"
- },
- "stderr": {
- "type": "string"
- },
- "exit_code": {
- "type": "number"
- }
- },
- "required": [
- "type",
- "subtype",
- "uuid"
- ],
- "additionalProperties": false
- }
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "stream_event"
- },
- "uuid": {
- "type": "string"
- },
- "event": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "message_start"
- },
- "message": {}
- },
- "required": [
- "type",
- "message"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "message_delta"
- },
- "delta": {
- "type": "object",
- "properties": {
- "stop_reason": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "stop_sequence": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "additionalProperties": false
- },
- "usage": {
- "type": "object",
- "properties": {
- "cache_creation_input_tokens": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ]
- },
- "cache_read_input_tokens": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ]
- },
- "input_tokens": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ]
- },
- "output_tokens": {
- "type": "number"
- },
- "server_tool_use": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "web_search_requests": {
- "type": "number"
- }
- },
- "required": [
- "web_search_requests"
- ],
- "additionalProperties": false
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "additionalProperties": {}
- }
- },
- "required": [
- "type"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "message_stop"
- }
- },
- "required": [
- "type"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "content_block_start"
- },
- "index": {
- "type": "number"
- },
- "content_block": {}
- },
- "required": [
- "type",
- "index",
- "content_block"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "content_block_delta"
- },
- "index": {
- "type": "number"
- },
- "delta": {}
- },
- "required": [
- "type",
- "index",
- "delta"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "content_block_stop"
- },
- "index": {
- "type": "number"
- }
- },
- "required": [
- "type",
- "index"
- ],
- "additionalProperties": false
- }
- ]
- },
- "parent_tool_use_id": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "required": [
- "type",
- "uuid"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "tool_progress"
- },
- "uuid": {
- "type": "string"
- },
- "tool_use_id": {
- "type": "string"
- },
- "tool_name": {
- "type": "string"
- },
- "parent_tool_use_id": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "elapsed_time_seconds": {
- "type": "number"
- }
- },
- "required": [
- "type",
- "uuid"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "auth_status"
- },
- "uuid": {
- "type": "string"
- },
- "isAuthenticating": {
- "type": "boolean"
- },
- "output": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "error": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "uuid"
- ],
- "additionalProperties": false
- }
- ]
- }
- },
- "status": {
- "type": "string",
- "enum": [
- "running",
- "completed",
- "requires_action",
- "error"
- ]
- },
- "rating": {
- "type": "integer",
- "minimum": 1,
- "maximum": 5
- },
- "ratingComment": {
- "type": "string"
- }
- },
- "required": [
- "id",
- "userId",
- "createdAt",
- "updatedAt",
- "status"
- ],
- "additionalProperties": false
- }
- },
- "required": [
- "data"
- ]
- }
- }
- },
- "headers": {}
- }
- },
- "security": []
- },
- "delete": {
- "summary": "Delete Content Generation Task",
- "deprecated": false,
- "description": "Delete a content generation task.",
- "operationId": "AgentController_deleteTask",
- "tags": [
- "Close/Me/Agent"
- ],
- "parameters": [
- {
- "name": "taskId",
- "in": "path",
- "description": "",
- "required": true,
- "example": "",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {}
- }
- }
- },
- "headers": {}
- }
- },
- "security": []
- },
- "patch": {
- "summary": "Update Content Generation Task",
- "deprecated": false,
- "description": "Update content generation task.",
- "operationId": "AgentController_updateTask",
- "tags": [
- "Close/Me/Agent"
- ],
- "parameters": [
- {
- "name": "taskId",
- "in": "path",
- "description": "",
- "required": true,
- "example": "",
- "schema": {
- "type": "string"
- }
- }
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/UpdateContentGenerationTaskTitleDto"
- }
- }
- },
- "required": true
- },
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {}
- }
- }
- },
- "headers": {}
- }
- },
- "security": []
- }
- },
- "/api/agent/tasks/{taskId}/rating": {
- "get": {
- "summary": "Get Content Generation Task Rating",
- "deprecated": false,
- "description": "Get rating and comment for a content generation task.",
- "operationId": "AgentController_getRating",
- "tags": [
- "Close/Me/Agent"
- ],
- "parameters": [
- {
- "name": "taskId",
- "in": "path",
- "description": "",
- "required": true,
- "example": "",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "rating": {
- "type": "integer",
- "minimum": 1,
- "maximum": 5
- },
- "comment": {
- "type": "string"
- }
- }
- }
- },
- "required": [
- "data"
- ]
- }
- }
- },
- "headers": {}
- }
- },
- "security": []
- },
- "post": {
- "summary": "Create or Update Content Generation Task Rating",
- "deprecated": false,
- "description": "Create or update a rating for a content generation task.",
- "operationId": "AgentController_createRating",
- "tags": [
- "Close/Me/Agent"
- ],
- "parameters": [
- {
- "name": "taskId",
- "in": "path",
- "description": "",
- "required": true,
- "example": "",
- "schema": {
- "type": "string"
- }
- }
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreateContentGenerationTaskRatingDto"
- }
- }
- },
- "required": true
- },
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {}
- }
- }
- },
- "headers": {}
- }
- },
- "security": []
- }
- }
- },
- "components": {
- "schemas": {
- "ContentGenerationTaskListVo": {
- "type": "object",
- "properties": {
- "page": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- },
- "pageSize": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- },
- "totalPages": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- },
- "total": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- },
- "list": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "userId": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "status": {
- "type": "string",
- "enum": [
- "running",
- "completed",
- "requires_action",
- "error"
- ]
- },
- "createdAt": {
- "type": "string",
- "format": "date-time"
- },
- "updatedAt": {
- "type": "string",
- "format": "date-time"
- }
- },
- "required": [
- "id",
- "userId",
- "status",
- "createdAt",
- "updatedAt"
- ]
- }
- }
- },
- "required": [
- "page",
- "pageSize",
- "totalPages",
- "total",
- "list"
- ],
- "id": "ContentGenerationTaskListVo"
- },
- "UpdateContentGenerationTaskTitleDto": {
- "type": "object",
- "properties": {
- "title": {
- "description": "对话标题",
- "type": "string",
- "minLength": 1,
- "maxLength": 200
- }
- },
- "required": [
- "title"
- ],
- "id": "UpdateContentGenerationTaskTitleDto"
- },
- "TaskMessagesVo": {
- "type": "object",
- "properties": {
- "messages": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "user"
- },
- "uuid": {
- "type": "string"
- },
- "message": {
- "type": "object",
- "properties": {
- "content": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "array",
- "items": {}
- }
- ]
- },
- "role": {
- "type": "string",
- "enum": [
- "user",
- "assistant"
- ]
- }
- },
- "required": [
- "content",
- "role"
- ]
- },
- "content": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "array",
- "items": {}
- }
- ]
- },
- "parent_tool_use_id": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "isSynthetic": {
- "type": "boolean"
- },
- "tool_use_result": {},
- "isReplay": {
- "type": "boolean",
- "const": true
- }
- },
- "required": [
- "type"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "assistant"
- },
- "uuid": {
- "type": "string"
- },
- "message": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "content": {
- "type": "array",
- "items": {}
- },
- "model": {
- "type": "string"
- },
- "role": {
- "type": "string",
- "const": "assistant"
- },
- "stop_reason": {
- "anyOf": [
- {
- "type": "string",
- "enum": [
- "end_turn",
- "max_tokens",
- "stop_sequence",
- "tool_use",
- "pause_turn",
- "refusal"
- ]
- },
- {
- "type": "null"
- }
- ]
- },
- "stop_sequence": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "type": {
- "type": "string",
- "const": "message"
- },
- "usage": {
- "type": "object",
- "properties": {
- "cache_creation": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "ephemeral_1h_input_tokens": {
- "type": "number"
- },
- "ephemeral_5m_input_tokens": {
- "type": "number"
- }
- },
- "required": [
- "ephemeral_1h_input_tokens",
- "ephemeral_5m_input_tokens"
- ]
- },
- {
- "type": "null"
- }
- ]
- },
- "cache_creation_input_tokens": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ]
- },
- "cache_read_input_tokens": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ]
- },
- "input_tokens": {
- "type": "number"
- },
- "output_tokens": {
- "type": "number"
- },
- "server_tool_use": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "web_search_requests": {
- "type": "number"
- }
- },
- "required": [
- "web_search_requests"
- ]
- },
- {
- "type": "null"
- }
- ]
- },
- "service_tier": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "additionalProperties": {}
- },
- "container": {
- "anyOf": [
- {},
- {
- "type": "null"
- }
- ]
- },
- "context_management": {
- "anyOf": [
- {},
- {
- "type": "null"
- }
- ]
- }
- },
- "additionalProperties": {}
- },
- "parent_tool_use_id": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "error": {
- "type": "string",
- "enum": [
- "authentication_failed",
- "billing_error",
- "rate_limit",
- "invalid_request",
- "server_error",
- "unknown"
- ]
- }
- },
- "required": [
- "type",
- "uuid"
- ]
- },
- {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "result"
- },
- "subtype": {
- "type": "string",
- "const": "success"
- },
- "uuid": {
- "type": "string"
- },
- "duration_ms": {
- "type": "number"
- },
- "duration_api_ms": {
- "type": "number"
- },
- "is_error": {
- "type": "boolean"
- },
- "num_turns": {
- "type": "number"
- },
- "message": {
- "type": "string"
- },
- "result": {
- "anyOf": [
- {
- "anyOf": [
- {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "mediaOnly"
- },
- "medias": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "IMAGE",
- "VIDEO"
- ]
- },
- "url": {
- "type": "string"
- },
- "thumbUrl": {
- "type": "string"
- },
- "prompt": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "url"
- ]
- }
- },
- "action": {
- "type": "string",
- "const": "none"
- }
- },
- "required": [
- "type",
- "medias",
- "action"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "mediaOnly"
- },
- "medias": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "IMAGE",
- "VIDEO"
- ]
- },
- "url": {
- "type": "string"
- },
- "thumbUrl": {
- "type": "string"
- },
- "prompt": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "url"
- ]
- }
- },
- "action": {
- "type": "string",
- "const": "navigateToMedia"
- },
- "mediaId": {
- "type": "string"
- },
- "groupId": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "medias",
- "action",
- "mediaId",
- "groupId"
- ]
- }
- ]
- },
- {
- "minItems": 1,
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "fullContent"
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "medias": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "IMAGE",
- "VIDEO"
- ]
- },
- "url": {
- "type": "string"
- },
- "thumbUrl": {
- "type": "string"
- },
- "prompt": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "url"
- ]
- }
- },
- "action": {
- "type": "string",
- "const": "none"
- },
- "platform": {
- "type": "string",
- "enum": [
- "douyin",
- "xhs",
- "wxSph",
- "KWAI",
- "youtube",
- "wxGzh",
- "bilibili",
- "twitter",
- "tiktok",
- "facebook",
- "instagram",
- "threads",
- "pinterest",
- "linkedin"
- ]
- }
- },
- "required": [
- "type",
- "title",
- "description",
- "tags",
- "medias",
- "action"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "fullContent"
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "medias": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "IMAGE",
- "VIDEO"
- ]
- },
- "url": {
- "type": "string"
- },
- "thumbUrl": {
- "type": "string"
- },
- "prompt": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "url"
- ]
- }
- },
- "action": {
- "type": "string",
- "const": "navigateToDraft"
- },
- "groupId": {
- "type": "string"
- },
- "platform": {
- "type": "string",
- "enum": [
- "douyin",
- "xhs",
- "wxSph",
- "KWAI",
- "youtube",
- "wxGzh",
- "bilibili",
- "twitter",
- "tiktok",
- "facebook",
- "instagram",
- "threads",
- "pinterest",
- "linkedin"
- ]
- }
- },
- "required": [
- "type",
- "title",
- "description",
- "tags",
- "medias",
- "action",
- "groupId"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "fullContent"
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "medias": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "IMAGE",
- "VIDEO"
- ]
- },
- "url": {
- "type": "string"
- },
- "thumbUrl": {
- "type": "string"
- },
- "prompt": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "url"
- ]
- }
- },
- "action": {
- "type": "string",
- "const": "navigateToMedia"
- },
- "mediaId": {
- "type": "string"
- },
- "groupId": {
- "type": "string"
- },
- "platform": {
- "type": "string",
- "enum": [
- "douyin",
- "xhs",
- "wxSph",
- "KWAI",
- "youtube",
- "wxGzh",
- "bilibili",
- "twitter",
- "tiktok",
- "facebook",
- "instagram",
- "threads",
- "pinterest",
- "linkedin"
- ]
- }
- },
- "required": [
- "type",
- "title",
- "description",
- "tags",
- "medias",
- "action",
- "mediaId",
- "groupId"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "fullContent"
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "medias": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "IMAGE",
- "VIDEO"
- ]
- },
- "url": {
- "type": "string"
- },
- "thumbUrl": {
- "type": "string"
- },
- "prompt": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "url"
- ]
- }
- },
- "action": {
- "type": "string",
- "const": "createChannel"
- },
- "platform": {
- "type": "string",
- "enum": [
- "douyin",
- "xhs",
- "wxSph",
- "KWAI",
- "youtube",
- "wxGzh",
- "bilibili",
- "twitter",
- "tiktok",
- "facebook",
- "instagram",
- "threads",
- "pinterest",
- "linkedin"
- ]
- },
- "errorMessage": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "title",
- "description",
- "tags",
- "medias",
- "action",
- "platform"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "fullContent"
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "medias": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "IMAGE",
- "VIDEO"
- ]
- },
- "url": {
- "type": "string"
- },
- "thumbUrl": {
- "type": "string"
- },
- "prompt": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "url"
- ]
- }
- },
- "action": {
- "type": "string",
- "const": "updateChannel"
- },
- "platform": {
- "type": "string",
- "enum": [
- "douyin",
- "xhs",
- "wxSph",
- "KWAI",
- "youtube",
- "wxGzh",
- "bilibili",
- "twitter",
- "tiktok",
- "facebook",
- "instagram",
- "threads",
- "pinterest",
- "linkedin"
- ]
- },
- "accountId": {
- "type": "string"
- },
- "errorMessage": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "title",
- "description",
- "tags",
- "medias",
- "action",
- "platform"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "fullContent"
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "medias": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "IMAGE",
- "VIDEO"
- ]
- },
- "url": {
- "type": "string"
- },
- "thumbUrl": {
- "type": "string"
- },
- "prompt": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "url"
- ]
- }
- },
- "action": {
- "type": "string",
- "const": "navigateToPublish"
- },
- "platform": {
- "type": "string",
- "enum": [
- "douyin",
- "xhs",
- "wxSph",
- "KWAI",
- "youtube",
- "wxGzh",
- "bilibili",
- "twitter",
- "tiktok",
- "facebook",
- "instagram",
- "threads",
- "pinterest",
- "linkedin"
- ]
- },
- "accountId": {
- "type": "string"
- },
- "publishTime": {
- "type": "string",
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
- },
- "topics": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "errorMessage": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "title",
- "description",
- "tags",
- "medias",
- "action",
- "platform"
- ]
- }
- ]
- }
- }
- ]
- },
- {
- "type": "null"
- }
- ]
- },
- "total_cost_usd": {
- "type": "number"
- },
- "usage": {
- "type": "object",
- "properties": {
- "cache_creation": {
- "type": "object",
- "properties": {
- "ephemeral_1h_input_tokens": {
- "type": "number"
- },
- "ephemeral_5m_input_tokens": {
- "type": "number"
- }
- },
- "required": [
- "ephemeral_1h_input_tokens",
- "ephemeral_5m_input_tokens"
- ]
- },
- "cache_creation_input_tokens": {
- "type": "number"
- },
- "cache_read_input_tokens": {
- "type": "number"
- },
- "input_tokens": {
- "type": "number"
- },
- "output_tokens": {
- "type": "number"
- },
- "server_tool_use": {
- "type": "object",
- "properties": {
- "web_search_requests": {
- "type": "number"
- }
- },
- "required": [
- "web_search_requests"
- ]
- }
- }
- },
- "permission_denials": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "tool_name": {
- "type": "string"
- },
- "tool_use_id": {
- "type": "string"
- },
- "tool_input": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {},
- "properties": {}
- }
- },
- "required": [
- "tool_name",
- "tool_use_id",
- "tool_input"
- ]
- }
- },
- "structured_output": {}
- },
- "required": [
- "type",
- "subtype",
- "uuid"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "result"
- },
- "subtype": {
- "type": "string",
- "enum": [
- "error_during_execution",
- "error_max_turns",
- "error_max_budget_usd",
- "error_max_structured_output_retries"
- ]
- },
- "uuid": {
- "type": "string"
- },
- "duration_ms": {
- "type": "number"
- },
- "duration_api_ms": {
- "type": "number"
- },
- "is_error": {
- "type": "boolean"
- },
- "num_turns": {
- "type": "number"
- },
- "total_cost_usd": {
- "type": "number"
- },
- "usage": {
- "type": "object",
- "properties": {
- "cache_creation": {
- "type": "object",
- "properties": {
- "ephemeral_1h_input_tokens": {
- "type": "number"
- },
- "ephemeral_5m_input_tokens": {
- "type": "number"
- }
- },
- "required": [
- "ephemeral_1h_input_tokens",
- "ephemeral_5m_input_tokens"
- ]
- },
- "cache_creation_input_tokens": {
- "type": "number"
- },
- "cache_read_input_tokens": {
- "type": "number"
- },
- "input_tokens": {
- "type": "number"
- },
- "output_tokens": {
- "type": "number"
- },
- "server_tool_use": {
- "type": "object",
- "properties": {
- "web_search_requests": {
- "type": "number"
- }
- },
- "required": [
- "web_search_requests"
- ]
- }
- }
- },
- "permission_denials": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "tool_name": {
- "type": "string"
- },
- "tool_use_id": {
- "type": "string"
- },
- "tool_input": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {},
- "properties": {}
- }
- },
- "required": [
- "tool_name",
- "tool_use_id",
- "tool_input"
- ]
- }
- },
- "errors": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "required": [
- "type",
- "subtype",
- "uuid"
- ]
- }
- ]
- },
- {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "system"
- },
- "subtype": {
- "type": "string",
- "const": "compact_boundary"
- },
- "uuid": {
- "type": "string"
- },
- "compact_metadata": {
- "type": "object",
- "properties": {
- "trigger": {
- "type": "string",
- "enum": [
- "manual",
- "auto"
- ]
- },
- "pre_tokens": {
- "type": "number"
- }
- },
- "required": [
- "trigger",
- "pre_tokens"
- ]
- }
- },
- "required": [
- "type",
- "subtype",
- "uuid"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "system"
- },
- "subtype": {
- "type": "string",
- "const": "status"
- },
- "uuid": {
- "type": "string"
- },
- "status": {
- "anyOf": [
- {
- "type": "string",
- "enum": [
- "compacting"
- ]
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "required": [
- "type",
- "subtype",
- "uuid"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "system"
- },
- "subtype": {
- "type": "string",
- "const": "hook_response"
- },
- "uuid": {
- "type": "string"
- },
- "hook_name": {
- "type": "string"
- },
- "hook_event": {
- "type": "string"
- },
- "stdout": {
- "type": "string"
- },
- "stderr": {
- "type": "string"
- },
- "exit_code": {
- "type": "number"
- }
- },
- "required": [
- "type",
- "subtype",
- "uuid"
- ]
- }
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "stream_event"
- },
- "uuid": {
- "type": "string"
- },
- "event": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "message_start"
- },
- "message": {}
- },
- "required": [
- "type",
- "message"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "message_delta"
- },
- "delta": {
- "type": "object",
- "properties": {
- "stop_reason": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "stop_sequence": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- }
- }
- },
- "usage": {
- "type": "object",
- "properties": {
- "cache_creation_input_tokens": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ]
- },
- "cache_read_input_tokens": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ]
- },
- "input_tokens": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ]
- },
- "output_tokens": {
- "type": "number"
- },
- "server_tool_use": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "web_search_requests": {
- "type": "number"
- }
- },
- "required": [
- "web_search_requests"
- ]
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "additionalProperties": {}
- }
- },
- "required": [
- "type"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "message_stop"
- }
- },
- "required": [
- "type"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "content_block_start"
- },
- "index": {
- "type": "number"
- },
- "content_block": {}
- },
- "required": [
- "type",
- "index",
- "content_block"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "content_block_delta"
- },
- "index": {
- "type": "number"
- },
- "delta": {}
- },
- "required": [
- "type",
- "index",
- "delta"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "content_block_stop"
- },
- "index": {
- "type": "number"
- }
- },
- "required": [
- "type",
- "index"
- ]
- }
- ]
- },
- "parent_tool_use_id": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "required": [
- "type",
- "uuid"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "tool_progress"
- },
- "uuid": {
- "type": "string"
- },
- "tool_use_id": {
- "type": "string"
- },
- "tool_name": {
- "type": "string"
- },
- "parent_tool_use_id": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "elapsed_time_seconds": {
- "type": "number"
- }
- },
- "required": [
- "type",
- "uuid"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "auth_status"
- },
- "uuid": {
- "type": "string"
- },
- "isAuthenticating": {
- "type": "boolean"
- },
- "output": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "error": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "uuid"
- ]
- }
- ]
- }
- },
- "status": {
- "type": "string",
- "enum": [
- "running",
- "completed",
- "requires_action",
- "error"
- ]
- }
- },
- "required": [
- "messages",
- "status"
- ],
- "id": "TaskMessagesVo"
- },
- "CreateContentGenerationTaskDto": {
- "type": "object",
- "properties": {
- "prompt": {
- "description": "提示词(字符串或内容块数组)",
- "anyOf": [
- {
- "type": "string",
- "minLength": 1,
- "maxLength": 4000
- },
- {
- "minItems": 1,
- "maxItems": 20,
- "type": "array",
- "items": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "text"
- },
- "text": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": [
- "type",
- "text"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "image"
- },
- "source": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "url"
- },
- "url": {
- "type": "string",
- "format": "uri"
- }
- },
- "required": [
- "type",
- "url"
- ]
- }
- },
- "required": [
- "type",
- "source"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "video"
- },
- "source": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "url"
- },
- "url": {
- "type": "string",
- "format": "uri"
- }
- },
- "required": [
- "type",
- "url"
- ]
- }
- },
- "required": [
- "type",
- "source"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "document"
- },
- "source": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "text"
- },
- "media_type": {
- "type": "string",
- "const": "text/plain"
- },
- "data": {
- "type": "string"
- }
- },
- "required": [
- "type",
- "media_type",
- "data"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "content"
- },
- "content": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "text"
- },
- "text": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": [
- "type",
- "text"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "image"
- },
- "source": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "url"
- },
- "url": {
- "type": "string",
- "format": "uri"
- }
- },
- "required": [
- "type",
- "url"
- ]
- }
- },
- "required": [
- "type",
- "source"
- ]
- }
- ]
- }
- }
- ]
- }
- },
- "required": [
- "type",
- "content"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "url"
- },
- "url": {
- "type": "string",
- "format": "uri"
- }
- },
- "required": [
- "type",
- "url"
- ]
- }
- ]
- },
- "cache_control": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "ephemeral"
- }
- },
- "required": [
- "type"
- ]
- }
- },
- "required": [
- "type",
- "source"
- ]
- }
- ]
- }
- }
- ]
- },
- "model": {
- "description": "使用的模型",
- "default": "claude-sonnet-4-5-20250929",
- "type": "string",
- "enum": [
- "claude-haiku-4-5-20251001",
- "claude-sonnet-4-5-20250929",
- "claude-opus-4-1-20250805",
- "claude-opus-4-5-20251101"
- ]
- },
- "includePartialMessages": {
- "description": "是否包含部分消息(流式)",
- "default": false,
- "type": "boolean"
- },
- "taskId": {
- "description": "任务ID(恢复对话时使用)",
- "type": "string",
- "minLength": 1
- }
- },
- "required": [
- "prompt"
- ],
- "id": "CreateContentGenerationTaskDto"
- },
- "CreateContentGenerationTaskRatingDto": {
- "type": "object",
- "properties": {
- "rating": {
- "description": "评分 (1-5)",
- "type": "integer",
- "minimum": 1,
- "maximum": 5
- },
- "comment": {
- "description": "评论文本",
- "type": "string",
- "maxLength": 1000
- }
- },
- "required": [
- "rating"
- ],
- "id": "CreateContentGenerationTaskRatingDto"
- }
- },
- "responses": {},
- "securitySchemes": {}
- },
- "servers": [],
- "security": []
-}
\ No newline at end of file
diff --git "a/project/web/public/\344\273\273\345\212\241\350\256\260\345\275\225\350\257\246\346\203\205data.txt" "b/project/web/public/\344\273\273\345\212\241\350\256\260\345\275\225\350\257\246\346\203\205data.txt"
deleted file mode 100644
index 054c2b58..00000000
--- "a/project/web/public/\344\273\273\345\212\241\350\256\260\345\275\225\350\257\246\346\203\205data.txt"
+++ /dev/null
@@ -1,6661 +0,0 @@
-{
- "data": {
- "id": "694a52603e7b39da998b386e",
- "userId": "68abbe6af812ccb3e1a53d68",
- "createdAt": "2025-12-23T08:27:12.131Z",
- "updatedAt": "2025-12-23T08:34:13.695Z",
- "title": "望庐山瀑布视频",
- "messages": [
- {
- "type": "user",
- "content": [
- {
- "type": "text",
- "text": "帮我生成一个望庐山瀑布的视频"
- }
- ]
- },
- {
- "type": "stream_event",
- "uuid": "7e9b89a7-7e6e-43e9-8491-8b5cb23848ef",
- "event": {
- "type": "message_start",
- "message": {
- "model": "claude-sonnet-4-5-20250929",
- "id": "msg_01AV5PENNz3mMB11228SYByo",
- "type": "message",
- "role": "assistant",
- "content": [],
- "stop_reason": null,
- "stop_sequence": null,
- "usage": {
- "input_tokens": 3,
- "cache_creation_input_tokens": 24950,
- "cache_read_input_tokens": 1867,
- "cache_creation": {
- "ephemeral_5m_input_tokens": 24950,
- "ephemeral_1h_input_tokens": 0
- },
- "output_tokens": 1,
- "service_tier": "standard"
- }
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "81242755-6dee-4bb1-881a-f107cf3b1a70",
- "event": {
- "type": "content_block_start",
- "index": 0,
- "content_block": {
- "type": "text",
- "text": ""
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "ea0dbf42-3028-429f-a2e8-ab20e110d0f0",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "我将为"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "85117454-a67c-4445-9a5f-170db42bd3a9",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "您生成一个以"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "2cc66a74-463b-42ba-a216-a9054b0e9ec0",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "李"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "5608f9e7-8108-47b4-9659-1cf27206dd48",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "白《"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "0c00cea3-5ddf-4f66-8036-4a7b731608a8",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "望庐山瀑布"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "5967448c-9db5-4e1a-a6f9-03920704ee02",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "》为"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "bfc8e9cd-a5fd-4c61-a5c8-ac6c07c5bea5",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "主题的视频。"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "assistant",
- "uuid": "cc724ffa-f996-4642-b49b-78c41549daf5",
- "message": {
- "id": "msg_01AV5PENNz3mMB11228SYByo",
- "content": [
- {
- "type": "text",
- "text": "我将为您生成一个以李白《望庐山瀑布》为主题的视频。"
- }
- ],
- "model": "claude-sonnet-4-5-20250929",
- "role": "assistant",
- "stop_reason": null,
- "stop_sequence": null,
- "type": "message",
- "usage": {
- "cache_creation": {
- "ephemeral_1h_input_tokens": 0,
- "ephemeral_5m_input_tokens": 24950
- },
- "cache_creation_input_tokens": 24950,
- "cache_read_input_tokens": 1867,
- "input_tokens": 3,
- "output_tokens": 1,
- "service_tier": "standard"
- },
- "context_management": null
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "baffb801-3f4e-4c19-a564-a77038de6269",
- "event": {
- "type": "content_block_stop",
- "index": 0
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "1e640dbe-008d-4e77-832e-e30b3d2fb870",
- "event": {
- "type": "content_block_start",
- "index": 1,
- "content_block": {
- "type": "tool_use",
- "id": "toolu_01QYqkiegdYbjkqziDajYiwG",
- "name": "mcp__sessionTools__setTitle",
- "input": {}
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "05896945-e604-48b8-b660-13390e6acf32",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": ""
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "2ad40560-6c07-4290-8f38-89c609a5834e",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "{\"title\":"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "15a10057-7081-4c52-bbd7-1ac519a96b66",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": " \"望庐山瀑布视频\"}"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "assistant",
- "uuid": "a57d32fb-7ec7-4b4c-a2d3-386d760d5858",
- "message": {
- "id": "msg_01AV5PENNz3mMB11228SYByo",
- "content": [
- {
- "type": "tool_use",
- "id": "toolu_01QYqkiegdYbjkqziDajYiwG",
- "name": "mcp__sessionTools__setTitle",
- "input": {
- "title": "望庐山瀑布视频"
- }
- }
- ],
- "model": "claude-sonnet-4-5-20250929",
- "role": "assistant",
- "stop_reason": null,
- "stop_sequence": null,
- "type": "message",
- "usage": {
- "cache_creation": {
- "ephemeral_1h_input_tokens": 0,
- "ephemeral_5m_input_tokens": 24950
- },
- "cache_creation_input_tokens": 24950,
- "cache_read_input_tokens": 1867,
- "input_tokens": 3,
- "output_tokens": 1,
- "service_tier": "standard"
- },
- "context_management": null
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "40bc9c7a-06bd-4b8a-a5da-2d82544df96e",
- "event": {
- "type": "content_block_stop",
- "index": 1
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "563fb14e-1866-402f-979e-45d98fdb1096",
- "event": {
- "type": "message_delta",
- "delta": {
- "stop_reason": "tool_use",
- "stop_sequence": null
- },
- "usage": {
- "cache_creation_input_tokens": 24950,
- "cache_read_input_tokens": 1867,
- "input_tokens": 3,
- "output_tokens": 97
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "cb1ff5b6-7b59-41a6-aeb4-2d1be9f6dfe6",
- "event": {
- "type": "message_stop"
- },
- "parent_tool_use_id": null
- },
- {
- "type": "user",
- "uuid": "d9b45ef5-4faf-458f-aa5d-c1894b3cc3bf",
- "message": {
- "content": [
- {
- "tool_use_id": "toolu_01QYqkiegdYbjkqziDajYiwG",
- "type": "tool_result",
- "content": [
- {
- "type": "text",
- "text": "Title updated successfully"
- }
- ]
- }
- ],
- "role": "user"
- },
- "parent_tool_use_id": null,
- "tool_use_result": [
- {
- "type": "text",
- "text": "Title updated successfully"
- }
- ]
- },
- {
- "type": "stream_event",
- "uuid": "6edda0bb-09bb-47dc-a313-13ca1a208255",
- "event": {
- "type": "message_start",
- "message": {
- "model": "claude-sonnet-4-5-20250929",
- "id": "msg_014TKvT1QyLC4AqKJgcNujsS",
- "type": "message",
- "role": "assistant",
- "content": [
- {
- "type": "text",
- "text": "📋"
- }
- ],
- "stop_reason": null,
- "stop_sequence": null,
- "usage": {
- "input_tokens": 6,
- "cache_creation_input_tokens": 109,
- "cache_read_input_tokens": 26817,
- "cache_creation": {
- "ephemeral_5m_input_tokens": 109,
- "ephemeral_1h_input_tokens": 0
- },
- "output_tokens": 2,
- "service_tier": "standard"
- }
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "7c1b3638-3879-443c-a49a-9b9afee1a8d8",
- "event": {
- "type": "content_block_start",
- "index": 0,
- "content_block": {
- "type": "text",
- "text": ""
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "b10c23c8-85e0-48d0-9a06-ae8c14ffae76",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "📋"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "eb5b2152-a21e-4fad-80a5-29728ced1258",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": " **执"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "232a0935-b186-4814-a980-af7b4ca41e15",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "行计划**"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "ed8baba7-8c56-4253-b2d8-34df0516ede5",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "\n**"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "5be9735b-dec1-44f9-b5fa-e7a8cc04c998",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "需求**: 生"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "2d5d6d62-6568-4f1a-84aa-242aad5b4520",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "成一个关"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "f3837a16-81b1-4261-9cfd-d041e0fc8ad1",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "于李"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "1c18b805-cd83-459a-933f-50050af87f3f",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "白名"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "8a1128ae-ea62-4d18-be3c-38182622802e",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "作"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "388e1fc2-d9ea-4b36-9e41-d38467a79a46",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "《望庐山瀑"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "1ba60385-fbc0-457c-9507-d1676c824d49",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "布》的视频\n**步"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "e8f11ffe-2f7a-4f49-ba57-c04f08fc2fb3",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "骤**: "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "773fa4c6-9556-43ae-a2a8-81df73b861dc",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "\n1. 使用AI"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "8d0ee0e2-2d74-4d6f-b37f-4183816345a6",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "视频生"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "8cdf1fe9-6179-4e86-8f7b-85274438f9ee",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "成工具创"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "efd313e9-2652-48ee-b34d-20fd41c46c3c",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "建"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "a9efa697-4ae0-4fa7-804c-6bbda0bb5e6a",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "庐山瀑布主"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "d6878686-184e-4310-af2f-1cea3f23e35e",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "题视频\n2. 等"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "cf3245bd-4d5a-4c64-a59b-83feef4034a0",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "待视"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "ebd0419a-cc13-4357-8556-6f48682340e6",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "频生成完成\n3."
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "199b7ca7-11e5-4d6c-b7c8-db1296ac487f",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": " 返回生"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "faa9ce20-b800-4b7b-8805-2c5421059804",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "成的视频结"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "530db10b-782e-45a0-958d-0975d1675a7f",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "果\n\n**资"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "b8b5d9ce-ba2b-43f4-ab11-b528a3e00507",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "源**:"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "cd43a2fb-3361-432d-bf1f-fa686c9cdd8c",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": " 视"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "9d080588-babb-45c7-bf9c-11a475517229",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "频模"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "54690df6-d3d1-4d63-870c-9ee46628cc6c",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "型:"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "4492d238-9b55-422f-b987-9795dc620ab3",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": " sora-2,"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "46c2cbb5-44bc-4061-a973-277f4b549b6e",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": " 时长: 10"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "5cfb0ff0-3799-4cc2-9a50-96e30a1bd944",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "秒, 分辨率:"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "a8087e79-bd7d-4497-abdf-8d5838a3a4c2",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": " 720p ("
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "fa5d1f0e-c19f-4a9b-87bf-2bd90987ba2b",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "标清)"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "3fcd89e3-ec01-4b15-baa7-9476ae90dde2",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "\n\n开"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "52919ab2-6998-4e41-b2fd-40423e13e949",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "始生成..."
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "assistant",
- "uuid": "fe6f20ce-4dde-44ae-8422-f4c741ce1f0d",
- "message": {
- "id": "msg_014TKvT1QyLC4AqKJgcNujsS",
- "content": [
- {
- "type": "text",
- "text": "📋 **执行计划**\n**需求**: 生成一个关于李白名作《望庐山瀑布》的视频\n**步骤**: \n1. 使用AI视频生成工具创建庐山瀑布主题视频\n2. 等待视频生成完成\n3. 返回生成的视频结果\n\n**资源**: 视频模型: sora-2, 时长: 10秒, 分辨率: 720p (标清)\n\n开始生成..."
- }
- ],
- "model": "claude-sonnet-4-5-20250929",
- "role": "assistant",
- "stop_reason": null,
- "stop_sequence": null,
- "type": "message",
- "usage": {
- "cache_creation": {
- "ephemeral_1h_input_tokens": 0,
- "ephemeral_5m_input_tokens": 109
- },
- "cache_creation_input_tokens": 109,
- "cache_read_input_tokens": 26817,
- "input_tokens": 6,
- "output_tokens": 2,
- "service_tier": "standard"
- },
- "context_management": null
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "a9ca7316-7791-4f73-82e2-03752e7132b9",
- "event": {
- "type": "content_block_stop",
- "index": 0
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "0ecc3ab6-2afc-4366-9431-54f7756290a3",
- "event": {
- "type": "content_block_start",
- "index": 1,
- "content_block": {
- "type": "tool_use",
- "id": "toolu_01WnN8UXWTSbGNBgQhyj46Kw",
- "name": "mcp__mediaGeneration__generateVideo",
- "input": {}
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "fed7b7d2-503c-462b-9df4-ad117a549b39",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": ""
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "aaccb026-fe44-4ce5-ac5b-ad4e8c748584",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "{\"userId\": "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "0fbef39a-2f68-4249-b161-a967edfffe1a",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "\"68abbe6"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "16b2ef83-9e51-47d6-b9ec-867e8ce33bb4",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "af8"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "e32d2a44-7731-475c-a7da-07936dfb44f1",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "12ccb3e1a53"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "a48cb7ba-8603-480b-8f77-9de423e439c5",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "d68\""
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "8c759fc4-0378-4d90-be02-be59d80ee8af",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": ", "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "edd916cf-d25f-4c41-ab1e-b20e33043d18",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "\"prompt\""
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "112c1548-94ed-4367-badf-c4c3a306af9f",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": ": \"A majesti"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "154078ec-fa01-4bd8-93e9-c6e6f44c7687",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "c wat"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "41b470cc-36c7-41a2-880f-4edbcca0d19e",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "erfal"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "57860ec1-386d-42ba-8bbe-9cd41bedffc4",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "l casc"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "d9f22fbe-a493-495b-a070-7708a3c4f542",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "ading down"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "a0f69fcb-8f06-47d4-a0e7-6d0bdb3b2f0b",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": " the ste"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "cf7877b3-480e-419e-8b68-b92d15236f9b",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "ep clif"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "56053571-eb99-4139-b4f5-f71fb05e8713",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "fs of Mou"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "d2e1058f-b2d1-4d10-854e-fbbac728d033",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "nt Lu"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "0df7c9a1-1078-4bd1-b815-57a7bafba5d2",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": " (Lus"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "b976bc5a-124e-44df-9deb-ada0300d4ad8",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "han) in Ch"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "10dde4e3-ff8e-4c38-9dae-b713471d7aef",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "ina. The"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "c885ddb6-d774-467f-baf6-80385af866e2",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": " wate"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "e88abad0-5f82-443b-a809-a65e7c2adef1",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "rfall p"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "99fe201d-7853-4c52-bd29-03364822d720",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "lunges fro"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "7d18f557-f9ec-41e0-b63c-6091b389d118",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "m great"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "8dc0d023-7901-415d-a8e2-e033a85b1e49",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": " heigh"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "9bd4d826-2819-4329-9252-89b68acb8f72",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "ts, creatin"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "8730d632-f727-4f0a-b748-018d2180dbb1",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "g mist "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "1180d1f9-4fb3-4985-92c0-8a7095f4f6d1",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "and"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "1ee8b2bd-6cdf-408c-8744-ebcf82606b51",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": " spra"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "dbddd633-2fe2-41a9-9c0c-e4f21a000fa9",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "y "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "8fa9a75e-7496-449f-acbd-bd4341a24744",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "that "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "48de3d68-dbdc-41b9-9377-839495b8707e",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "catches"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "4d3cc1be-a029-492d-b0a9-f7962d8cad84",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": " the sunli"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "b709991b-b0a3-4c9e-8794-ea040d8c4614",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "ght, ap"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "08b1ccea-07df-49c0-8706-4c8f6a19ba8c",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "pearing"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "ce2e863b-2c0f-4516-b898-5238c66ded8f",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": " l"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "c0f2c94a-f45b-4654-8f56-f9a2d2999f6d",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "ike a sil"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "e2ef1644-9495-46ec-9031-e7447a089df2",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "ver"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "84495910-0ddd-4a06-8ee8-4dea9e2d6e25",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": " r"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "656fd33e-cca2-4227-bb37-de9eacb9c1d2",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "ibbo"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "72051491-4547-486a-9b52-2845e2f58d8a",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "n falling"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "2cedf3af-ce5e-4226-8333-b4a663355ac0",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": " from t"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "fb2d3186-04e4-402d-a741-2444dc3d4177",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "he sky. A"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "627e0bdc-22f7-463b-8fa0-fac74c47d66d",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "nc"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "0dc2b614-ea77-4c4e-a2a4-4fd498d78e3d",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "ient pin"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "ad350966-4753-4b34-b4ea-8a482a99a10a",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "e "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "53bbd967-b45a-49ed-8eb3-434d01cab768",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "trees c"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "780b6e1e-d925-47a1-9c05-87b5781bb7b4",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "lin"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "c5d80492-e21b-4be7-9b8c-9fe173ed6113",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "g "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "b22308c0-09b7-4ec5-90f7-7db1ed426a99",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "to the ro"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "9fa9018a-32bd-48f6-ac73-8401f50306db",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "cky cliffs."
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "1a0c5ec6-5956-44a6-bb62-f4c975ed5833",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": " The"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "9af5ba2b-1bdf-4750-8180-f3163b69fc22",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": " scene cap"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "440d0cbe-c883-4ff3-b379-2df54a506c92",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "tures th"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "8fb167c8-a069-47fb-8938-74e906c8e12f",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "e "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "ae4f435a-3b07-4148-8a4b-b43c538c94ef",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "grandeur "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "71238876-68e3-4b45-bb57-a2b1a3f0cc73",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "and po"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "7b248091-ce28-41d6-9fe0-41f484afc80f",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "etic beaut"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "630e5025-9f11-4426-99c2-5095ff763944",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "y describe"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "74df5661-8f2e-4ddf-a667-88bed1b8b7a7",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "d in Li Bai'"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "b14e5982-91fc-4700-88f1-ace2a0b4d5fe",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "s famous p"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "fb224a39-a8d3-46ae-9c16-e6a0b5e42aaa",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "oem "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "29d9bd11-5c40-4994-b736-4253d38ef9b9",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "\\\""
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "29dd2e19-c23f-4419-b74a-4f08293bc326",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "View"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "8dc1b12f-e84c-4631-8a4b-93f00cf27f3d",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "ing the "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "c6dcbbf1-ff49-4d6d-b653-beccb274a7b2",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "Waterfa"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "02fab5eb-4ff9-4a3a-877f-364192a3c996",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "ll a"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "93b06edb-2e58-4066-98d0-261f10ee5c60",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "t Mount L"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "c335744f-e78a-491b-9533-7ec3c87b271a",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "u\\\""
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "15b49e01-4899-479d-bfc6-a50604d50aeb",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": ". Cin"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "b9aeb0c6-756a-43d1-93c4-d9798ed6070f",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "ematic, e"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "6751d0b3-ade6-425f-9a2f-576f0e363196",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "therea"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "7376408c-13ce-4849-ac2e-32ba988a20e9",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "l atmosphe"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "7ffb4a9a-5741-4154-9beb-a6f9978cd81b",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "re "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "3e4dc9b4-01ab-43c3-bbf1-5afc42f6b725",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "with soft"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "e82d3154-7a99-4b69-8d2b-ca6b8d7188b6",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": " morning l"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "cfefb7a4-58a7-4e32-a28d-dae130f499e2",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "ight, tradit"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "687c5895-5713-4e50-a386-7bac1b2e3976",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "ional Chine"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "4dfba71b-a8e0-4359-9def-aa0b81ac5044",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "se land"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "b45dc5fc-3631-4eaa-9c1f-6986edcee2f3",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "scape"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "5505400f-1eaf-45a4-a656-b79a28628b59",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": " painti"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "c808a7a2-1989-4342-8ac9-b2d701c98010",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "ng aesthe"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "5d62ab1b-fd82-46a9-89ad-dff2180c016f",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "tic.\""
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "3f549573-139e-49f2-a980-903538524a9a",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": ", \"model\": "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "6d5aa312-ca86-4244-a295-93f406e85cb5",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "\"sora-2\"}"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "assistant",
- "uuid": "5e16cf82-e234-4d13-ad63-7ccaf9782f8b",
- "message": {
- "id": "msg_014TKvT1QyLC4AqKJgcNujsS",
- "content": [
- {
- "type": "tool_use",
- "id": "toolu_01WnN8UXWTSbGNBgQhyj46Kw",
- "name": "mcp__mediaGeneration__generateVideo",
- "input": {
- "userId": "68abbe6af812ccb3e1a53d68",
- "prompt": "A majestic waterfall cascading down the steep cliffs of Mount Lu (Lushan) in China. The waterfall plunges from great heights, creating mist and spray that catches the sunlight, appearing like a silver ribbon falling from the sky. Ancient pine trees cling to the rocky cliffs. The scene captures the grandeur and poetic beauty described in Li Bai's famous poem \"Viewing the Waterfall at Mount Lu\". Cinematic, ethereal atmosphere with soft morning light, traditional Chinese landscape painting aesthetic.",
- "model": "sora-2"
- }
- }
- ],
- "model": "claude-sonnet-4-5-20250929",
- "role": "assistant",
- "stop_reason": "tool_use",
- "stop_sequence": null,
- "type": "message",
- "usage": {
- "cache_creation": {
- "ephemeral_1h_input_tokens": 0,
- "ephemeral_5m_input_tokens": 109
- },
- "cache_creation_input_tokens": 109,
- "cache_read_input_tokens": 26817,
- "input_tokens": 6,
- "output_tokens": 363,
- "service_tier": "standard"
- },
- "context_management": null
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "65f1f60e-ed4e-49e4-b1d8-7aedae7fbb5d",
- "event": {
- "type": "content_block_stop",
- "index": 1
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "2770c02a-d63f-45a7-ad1a-4a306be539fc",
- "event": {
- "type": "message_delta",
- "delta": {
- "stop_reason": "tool_use",
- "stop_sequence": null
- },
- "usage": {
- "cache_creation_input_tokens": 109,
- "cache_read_input_tokens": 26817,
- "input_tokens": 6,
- "output_tokens": 363
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "4f40d350-d691-425e-b37f-f581b926aeb6",
- "event": {
- "type": "message_stop"
- },
- "parent_tool_use_id": null
- },
- {
- "type": "user",
- "uuid": "bf19048f-5eee-4386-875e-e928c25658c1",
- "message": {
- "content": [
- {
- "tool_use_id": "toolu_01WnN8UXWTSbGNBgQhyj46Kw",
- "type": "tool_result",
- "content": [
- {
- "type": "text",
- "text": "Video is generating with OpenAI sora-2, task id: 694a527b3e7b39da998b3945"
- }
- ]
- }
- ],
- "role": "user"
- },
- "parent_tool_use_id": null,
- "tool_use_result": [
- {
- "type": "text",
- "text": "Video is generating with OpenAI sora-2, task id: 694a527b3e7b39da998b3945"
- }
- ]
- },
- {
- "type": "stream_event",
- "uuid": "0a78b077-5045-4c8d-97f9-f87263bd4d69",
- "event": {
- "type": "message_start",
- "message": {
- "model": "claude-sonnet-4-5-20250929",
- "id": "msg_01NxVBLPT3rqfZ7SrGEEFK2T",
- "type": "message",
- "role": "assistant",
- "content": [],
- "stop_reason": null,
- "stop_sequence": null,
- "usage": {
- "input_tokens": 6,
- "cache_creation_input_tokens": 405,
- "cache_read_input_tokens": 26926,
- "cache_creation": {
- "ephemeral_5m_input_tokens": 405,
- "ephemeral_1h_input_tokens": 0
- },
- "output_tokens": 1,
- "service_tier": "standard"
- }
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "1cdb8469-db5b-40cf-ac39-55911c3a4a63",
- "event": {
- "type": "content_block_start",
- "index": 0,
- "content_block": {
- "type": "text",
- "text": ""
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "87b1013e-ae3d-4d86-85db-cf5c0c0de0aa",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "视"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "594ee47a-06b4-40b7-bc75-7072560423e7",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "频正"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "f1a192c9-5cdb-46e5-a41f-ed1961813ca8",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "在生成中,"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "5dc5c6cd-7d6c-4a62-891b-22b726c47dd1",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "请稍候..."
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "assistant",
- "uuid": "5c99a807-2a09-43cc-8145-2ea4066a27a1",
- "message": {
- "id": "msg_01NxVBLPT3rqfZ7SrGEEFK2T",
- "content": [
- {
- "type": "text",
- "text": "视频正在生成中,请稍候..."
- }
- ],
- "model": "claude-sonnet-4-5-20250929",
- "role": "assistant",
- "stop_reason": null,
- "stop_sequence": null,
- "type": "message",
- "usage": {
- "cache_creation": {
- "ephemeral_1h_input_tokens": 0,
- "ephemeral_5m_input_tokens": 405
- },
- "cache_creation_input_tokens": 405,
- "cache_read_input_tokens": 26926,
- "input_tokens": 6,
- "output_tokens": 1,
- "service_tier": "standard"
- },
- "context_management": null
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "794fa99c-3a6b-4162-899c-806d61958670",
- "event": {
- "type": "content_block_stop",
- "index": 0
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "d2d13fc1-dff6-4305-8330-79fc5ded46c8",
- "event": {
- "type": "content_block_start",
- "index": 1,
- "content_block": {
- "type": "tool_use",
- "id": "toolu_016n3ZE99rKJF9L9G6Bt9zRk",
- "name": "Task",
- "input": {}
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "2eb51e4b-1755-46b4-be46-e11810693c1d",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": ""
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "66497b0a-5bc6-4a00-acc4-0839027d706d",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "{\"suba"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "081d472b-8c9c-46b6-90c4-647d42f9ee5a",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "gent_"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "998dd43b-7d4e-43e2-99bb-91d886fdb427",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "typ"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "15db4ff3-60b2-4a55-9400-7adf9cae7d36",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "e\":"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "1d7c5db7-9645-4bca-bc9c-157169c3b010",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": " \"general"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "d383134f-96dc-48c2-b845-4534d2ada4d1",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "-purpos"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "b2c1298c-9587-4e3d-ab7f-7a6946829dd6",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "e\""
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "d0a2c144-f2fe-4ce2-a317-f57ddcec9583",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": ", \"d"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "26648c94-3d40-4346-867f-cdba43c17413",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "escrip"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "5e481957-dced-495d-8d8f-f3c9c68a13e9",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "tion\": "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "2d9cd572-dc31-48d6-bb4f-1282a4670db2",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "\"Poll video "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "693d8a7b-ffab-48d2-9c0e-681a6bdd89ac",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "generation"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "160f08b0-ff45-4192-bc00-7220545a059f",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": " status\""
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "e4d7a709-0359-4299-a35c-80aedfbae4f4",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": ", \"model\":"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "b2c175fc-43b1-433c-a45b-5660719cd5c2",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": " \"haiku\""
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "7cae4668-a282-4823-a6dd-3f9e6c6c86b4",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": ", \"prompt\""
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "f724f6ec-52cf-4174-be25-a76fa105ba72",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": ": \"Pol"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "d60fa0c3-228c-4c88-adf7-6fa4a9b76746",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "l the video "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "63807379-f326-4fc6-bf5b-9ca8772bec99",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "generation "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "dc00f8d2-f4e9-40de-ba47-17e3df43174a",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "tas"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "4562ec64-a4fa-4e89-8b35-08370ef100b6",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "k sta"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "f0242cd0-f6f6-4860-b48b-8788c7f952d3",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "tus using"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "42b6ed24-2f4a-4427-80b4-893a7eeb5f87",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": " getVide"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "2d159275-47fd-4a4f-83d9-3f3a2bf5c650",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "oStat"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "5d4b2b7b-cda4-4acc-87f1-6539c0df437a",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "us tool. \\"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "f8307cdd-f949-4003-9c14-161d1953de36",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "n- userId"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "b23db5cb-390f-4927-9c9b-2b267d2ca1d3",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": ": 68abbe"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "2f7c1468-17bd-486f-8e79-6590452047ba",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "6af812ccb3e"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "cc466701-e53a-4259-8de9-20bda5116efb",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "1a53d68"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "d007c87d-30eb-4ba7-a086-f9ba51e9eb91",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "\\n- us"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "b99d3c42-ee2e-41ea-b0bf-c6f1278cc26a",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "erType"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "5a6683db-5e40-42e9-8d4f-bd5a2c0a1251",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": ": user\\n-"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "5baf838d-974f-4407-8873-825ea3ac8aa5",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": " tas"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "55fe6772-4a46-496f-b463-25f56c1fc5bd",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "kId: 69"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "731caa7c-29e4-45fc-bcd8-f406947a5036",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "4a527b3e7"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "fdd7a76e-67c7-4ff2-8344-d1fa1f8904f5",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "b39da"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "a1e80733-02c5-4f33-910c-ad7d2cc5c1ff",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "998b3"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "a78fa6f4-aecf-4706-8290-7aceb58b237c",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "945\\n\\nWa"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "f083000e-46a9-46a2-bb58-d2b1a1a6132f",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "it 210 "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "d2eefb0f-e86b-40a4-8cc0-9260084c98d9",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "se"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "a6e00809-177e-4d0c-8d63-43cbb5bcfd77",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "co"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "4d889728-ecc4-4544-bea3-5ff2f8973f02",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "nds befor"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "e72efd6b-45df-4ffd-ab61-3a67c025354b",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "e first c"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "9ee06a93-f266-461a-909f-2bffc6986708",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "heck, then c"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "46f82c72-9180-457d-a207-da2a30d4845b",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "heck ever"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "b75faa3e-a5f1-47f4-a3d3-fe6e8de1590f",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "y 30"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "450d8554-6471-4d41-a626-bc50725794e6",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": " s"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "59f7df36-6e29-4eff-aeb0-b07110421b53",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "econds u"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "52cbd208-7406-43d8-8040-036bee22b934",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "ntil "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "8be7b70f-f9d2-4152-afa4-4ba9a6b66ec9",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "the video is"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "e3d998af-d946-494c-bf81-df31100bc660",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": " completed. "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "82164bd3-2b21-4925-b51e-3a653d897636",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "Return the f"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "46be4ff8-06a7-433a-9436-c67c4b926d95",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "inal v"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "9557040d-42e4-4518-b387-8cc0580bfcdd",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "ideo URL "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "84fdf052-fc5a-4ff3-9169-9cf4d941c372",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "when done.\"}"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "assistant",
- "uuid": "c051b1d3-61db-426f-8344-8a210233c87e",
- "message": {
- "id": "msg_01NxVBLPT3rqfZ7SrGEEFK2T",
- "content": [
- {
- "type": "tool_use",
- "id": "toolu_016n3ZE99rKJF9L9G6Bt9zRk",
- "name": "Task",
- "input": {
- "subagent_type": "general-purpose",
- "description": "Poll video generation status",
- "model": "haiku",
- "prompt": "Poll the video generation task status using getVideoStatus tool. \n- userId: 68abbe6af812ccb3e1a53d68\n- userType: user\n- taskId: 694a527b3e7b39da998b3945\n\nWait 210 seconds before first check, then check every 30 seconds until the video is completed. Return the final video URL when done."
- }
- }
- ],
- "model": "claude-sonnet-4-5-20250929",
- "role": "assistant",
- "stop_reason": "tool_use",
- "stop_sequence": null,
- "type": "message",
- "usage": {
- "cache_creation": {
- "ephemeral_1h_input_tokens": 0,
- "ephemeral_5m_input_tokens": 405
- },
- "cache_creation_input_tokens": 405,
- "cache_read_input_tokens": 26926,
- "input_tokens": 6,
- "output_tokens": 214,
- "service_tier": "standard"
- },
- "context_management": null
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "a4eb474c-e518-49e1-96a0-3c08976089c9",
- "event": {
- "type": "content_block_stop",
- "index": 1
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "62a03622-7e2d-4517-8f13-6880fbca7371",
- "event": {
- "type": "message_delta",
- "delta": {
- "stop_reason": "tool_use",
- "stop_sequence": null
- },
- "usage": {
- "cache_creation_input_tokens": 405,
- "cache_read_input_tokens": 26926,
- "input_tokens": 6,
- "output_tokens": 214
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "14837aae-791b-418f-83b7-7d892ea6c019",
- "event": {
- "type": "message_stop"
- },
- "parent_tool_use_id": null
- },
- {
- "type": "user",
- "uuid": "d73afecf-c376-47cd-973c-fc22e74b7c0e",
- "message": {
- "content": [
- {
- "type": "text",
- "text": "Poll the video generation task status using getVideoStatus tool. \n- userId: 68abbe6af812ccb3e1a53d68\n- userType: user\n- taskId: 694a527b3e7b39da998b3945\n\nWait 210 seconds before first check, then check every 30 seconds until the video is completed. Return the final video URL when done."
- }
- ],
- "role": "user"
- },
- "parent_tool_use_id": "toolu_016n3ZE99rKJF9L9G6Bt9zRk"
- },
- {
- "type": "assistant",
- "uuid": "a33a5454-4241-41b4-b6a0-45785dd8bf28",
- "message": {
- "id": "msg_01VdC9kNUKFUedaY4eWkTkoz",
- "content": [
- {
- "type": "tool_use",
- "id": "toolu_01HYCi1n8vr7rGpscbF8mjP1",
- "name": "mcp__util__wait",
- "input": {
- "seconds": 210
- }
- }
- ],
- "model": "claude-haiku-4-5-20251001",
- "role": "assistant",
- "stop_reason": null,
- "stop_sequence": null,
- "type": "message",
- "usage": {
- "cache_creation": {
- "ephemeral_1h_input_tokens": 0,
- "ephemeral_5m_input_tokens": 23202
- },
- "cache_creation_input_tokens": 23202,
- "cache_read_input_tokens": 0,
- "input_tokens": 2,
- "output_tokens": 8,
- "service_tier": "standard"
- },
- "context_management": null
- },
- "parent_tool_use_id": "toolu_016n3ZE99rKJF9L9G6Bt9zRk"
- },
- {
- "type": "user",
- "uuid": "5880a79b-a002-4144-993a-d8948b10b7bb",
- "message": {
- "content": [
- {
- "tool_use_id": "toolu_01HYCi1n8vr7rGpscbF8mjP1",
- "type": "tool_result",
- "content": [
- {
- "type": "text",
- "text": "Waited for 210 seconds"
- }
- ]
- }
- ],
- "role": "user"
- },
- "parent_tool_use_id": "toolu_016n3ZE99rKJF9L9G6Bt9zRk",
- "tool_use_result": [
- {
- "type": "text",
- "text": "Waited for 210 seconds"
- }
- ]
- },
- {
- "type": "assistant",
- "uuid": "01951a64-3cf6-4ad5-af15-98df1bef561f",
- "message": {
- "id": "msg_013oa6KHDTSLrsm5jVnfyUmG",
- "content": [
- {
- "type": "tool_use",
- "id": "toolu_011mBJrcMivshRGWVp7dHNF4",
- "name": "mcp__mediaGeneration__getVideoStatus",
- "input": {
- "userId": "68abbe6af812ccb3e1a53d68",
- "userType": "user",
- "taskId": "694a527b3e7b39da998b3945"
- }
- }
- ],
- "model": "claude-haiku-4-5-20251001",
- "role": "assistant",
- "stop_reason": "tool_use",
- "stop_sequence": null,
- "type": "message",
- "usage": {
- "cache_creation": {
- "ephemeral_1h_input_tokens": 0,
- "ephemeral_5m_input_tokens": 99
- },
- "cache_creation_input_tokens": 99,
- "cache_read_input_tokens": 23202,
- "input_tokens": 5,
- "output_tokens": 134,
- "service_tier": "standard"
- },
- "context_management": null
- },
- "parent_tool_use_id": "toolu_016n3ZE99rKJF9L9G6Bt9zRk"
- },
- {
- "type": "user",
- "uuid": "bb420148-ef8f-4a21-8a9d-c2f4561fbc85",
- "message": {
- "content": [
- {
- "tool_use_id": "toolu_011mBJrcMivshRGWVp7dHNF4",
- "type": "tool_result",
- "content": [
- {
- "type": "text",
- "text": "Video is queued, progress: 20%, task id: 694a527b3e7b39da998b3945\nStart time: 2025-12-23T08:27:38.000Z\nCurrent time: 2025-12-23T08:31:33.417Z\nElapsed time: 3 minutes 55 seconds"
- }
- ]
- }
- ],
- "role": "user"
- },
- "parent_tool_use_id": "toolu_016n3ZE99rKJF9L9G6Bt9zRk",
- "tool_use_result": [
- {
- "type": "text",
- "text": "Video is queued, progress: 20%, task id: 694a527b3e7b39da998b3945\nStart time: 2025-12-23T08:27:38.000Z\nCurrent time: 2025-12-23T08:31:33.417Z\nElapsed time: 3 minutes 55 seconds"
- }
- ]
- },
- {
- "type": "assistant",
- "uuid": "abb7e39c-4052-4379-856f-4714b05425b1",
- "message": {
- "id": "msg_01TvmDNZZT9H2fiKYmyUUvrR",
- "content": [
- {
- "type": "tool_use",
- "id": "toolu_01Jadp7zo9GqAuKybnDMaUsC",
- "name": "mcp__util__wait",
- "input": {
- "seconds": 30
- }
- }
- ],
- "model": "claude-haiku-4-5-20251001",
- "role": "assistant",
- "stop_reason": null,
- "stop_sequence": null,
- "type": "message",
- "usage": {
- "cache_creation": {
- "ephemeral_1h_input_tokens": 0,
- "ephemeral_5m_input_tokens": 227
- },
- "cache_creation_input_tokens": 227,
- "cache_read_input_tokens": 23301,
- "input_tokens": 5,
- "output_tokens": 76,
- "service_tier": "standard"
- },
- "context_management": null
- },
- "parent_tool_use_id": "toolu_016n3ZE99rKJF9L9G6Bt9zRk"
- },
- {
- "type": "user",
- "uuid": "dbb1a224-de27-4d62-841d-b6ad8d695a3a",
- "message": {
- "content": [
- {
- "tool_use_id": "toolu_01Jadp7zo9GqAuKybnDMaUsC",
- "type": "tool_result",
- "content": [
- {
- "type": "text",
- "text": "Waited for 30 seconds"
- }
- ]
- }
- ],
- "role": "user"
- },
- "parent_tool_use_id": "toolu_016n3ZE99rKJF9L9G6Bt9zRk",
- "tool_use_result": [
- {
- "type": "text",
- "text": "Waited for 30 seconds"
- }
- ]
- },
- {
- "type": "assistant",
- "uuid": "77553289-098d-4b8f-89a9-f809ad63829c",
- "message": {
- "id": "msg_01BS1uD4rXeMgTPJWLp5BAbB",
- "content": [
- {
- "type": "tool_use",
- "id": "toolu_013Rnrzfvp9wJRhD56oU5LqY",
- "name": "mcp__mediaGeneration__getVideoStatus",
- "input": {
- "taskId": "694a527b3e7b39da998b3945",
- "userId": "68abbe6af812ccb3e1a53d68",
- "userType": "user"
- }
- }
- ],
- "model": "claude-haiku-4-5-20251001",
- "role": "assistant",
- "stop_reason": null,
- "stop_sequence": null,
- "type": "message",
- "usage": {
- "cache_creation": {
- "ephemeral_1h_input_tokens": 0,
- "ephemeral_5m_input_tokens": 95
- },
- "cache_creation_input_tokens": 95,
- "cache_read_input_tokens": 23528,
- "input_tokens": 5,
- "output_tokens": 32,
- "service_tier": "standard"
- },
- "context_management": null
- },
- "parent_tool_use_id": "toolu_016n3ZE99rKJF9L9G6Bt9zRk"
- },
- {
- "type": "user",
- "uuid": "121b7c72-c29c-424f-bf15-3221d415f7f8",
- "message": {
- "content": [
- {
- "tool_use_id": "toolu_013Rnrzfvp9wJRhD56oU5LqY",
- "type": "tool_result",
- "content": [
- {
- "type": "text",
- "text": "Video is queued, progress: 20%, task id: 694a527b3e7b39da998b3945\nStart time: 2025-12-23T08:27:38.000Z\nCurrent time: 2025-12-23T08:32:25.264Z\nElapsed time: 4 minutes 47 seconds"
- }
- ]
- }
- ],
- "role": "user"
- },
- "parent_tool_use_id": "toolu_016n3ZE99rKJF9L9G6Bt9zRk",
- "tool_use_result": [
- {
- "type": "text",
- "text": "Video is queued, progress: 20%, task id: 694a527b3e7b39da998b3945\nStart time: 2025-12-23T08:27:38.000Z\nCurrent time: 2025-12-23T08:32:25.264Z\nElapsed time: 4 minutes 47 seconds"
- }
- ]
- },
- {
- "type": "assistant",
- "uuid": "6f07dbb7-037f-4977-9d8c-ed48dc12b876",
- "message": {
- "id": "msg_01JhGj2kW3DwgimMUU5Vj1g7",
- "content": [
- {
- "type": "tool_use",
- "id": "toolu_01PL2SNsujangpT73eGt3WKM",
- "name": "mcp__util__wait",
- "input": {
- "seconds": 30
- }
- }
- ],
- "model": "claude-haiku-4-5-20251001",
- "role": "assistant",
- "stop_reason": null,
- "stop_sequence": null,
- "type": "message",
- "usage": {
- "cache_creation": {
- "ephemeral_1h_input_tokens": 0,
- "ephemeral_5m_input_tokens": 327
- },
- "cache_creation_input_tokens": 327,
- "cache_read_input_tokens": 23623,
- "input_tokens": 2,
- "output_tokens": 1,
- "service_tier": "standard"
- },
- "context_management": null
- },
- "parent_tool_use_id": "toolu_016n3ZE99rKJF9L9G6Bt9zRk"
- },
- {
- "type": "user",
- "uuid": "3f401c8c-417e-4bd7-b7b0-acf70db2536f",
- "message": {
- "content": [
- {
- "tool_use_id": "toolu_01PL2SNsujangpT73eGt3WKM",
- "type": "tool_result",
- "content": [
- {
- "type": "text",
- "text": "Waited for 30 seconds"
- }
- ]
- }
- ],
- "role": "user"
- },
- "parent_tool_use_id": "toolu_016n3ZE99rKJF9L9G6Bt9zRk",
- "tool_use_result": [
- {
- "type": "text",
- "text": "Waited for 30 seconds"
- }
- ]
- },
- {
- "type": "assistant",
- "uuid": "38a16d39-8849-434f-8c15-afa7087a25b3",
- "message": {
- "id": "msg_01BWwZjCqXeL8PbSWvrvFHbA",
- "content": [
- {
- "type": "tool_use",
- "id": "toolu_01WJ87hZiuH3nPVxfwGfgqs2",
- "name": "mcp__mediaGeneration__getVideoStatus",
- "input": {
- "taskId": "694a527b3e7b39da998b3945",
- "userId": "68abbe6af812ccb3e1a53d68",
- "userType": "user"
- }
- }
- ],
- "model": "claude-haiku-4-5-20251001",
- "role": "assistant",
- "stop_reason": null,
- "stop_sequence": null,
- "type": "message",
- "usage": {
- "cache_creation": {
- "ephemeral_1h_input_tokens": 0,
- "ephemeral_5m_input_tokens": 78
- },
- "cache_creation_input_tokens": 78,
- "cache_read_input_tokens": 23950,
- "input_tokens": 5,
- "output_tokens": 32,
- "service_tier": "standard"
- },
- "context_management": null
- },
- "parent_tool_use_id": "toolu_016n3ZE99rKJF9L9G6Bt9zRk"
- },
- {
- "type": "user",
- "uuid": "ad50e6e1-7039-4081-af98-81bd14431428",
- "message": {
- "content": [
- {
- "tool_use_id": "toolu_01WJ87hZiuH3nPVxfwGfgqs2",
- "type": "tool_result",
- "content": [
- {
- "type": "text",
- "text": "Video is queued, progress: 20%, task id: 694a527b3e7b39da998b3945\nStart time: 2025-12-23T08:27:38.000Z\nCurrent time: 2025-12-23T08:33:05.834Z\nElapsed time: 5 minutes 27 seconds"
- }
- ]
- }
- ],
- "role": "user"
- },
- "parent_tool_use_id": "toolu_016n3ZE99rKJF9L9G6Bt9zRk",
- "tool_use_result": [
- {
- "type": "text",
- "text": "Video is queued, progress: 20%, task id: 694a527b3e7b39da998b3945\nStart time: 2025-12-23T08:27:38.000Z\nCurrent time: 2025-12-23T08:33:05.834Z\nElapsed time: 5 minutes 27 seconds"
- }
- ]
- },
- {
- "type": "assistant",
- "uuid": "ac3fdd1a-94c4-4f08-abec-fcf2044cdc1a",
- "message": {
- "id": "msg_019Savc7jHUrUFkCNSLoUQr3",
- "content": [
- {
- "type": "tool_use",
- "id": "toolu_01QSrwYRiyJzCd9ia61LhP9C",
- "name": "mcp__util__wait",
- "input": {
- "seconds": 30
- }
- }
- ],
- "model": "claude-haiku-4-5-20251001",
- "role": "assistant",
- "stop_reason": null,
- "stop_sequence": null,
- "type": "message",
- "usage": {
- "cache_creation": {
- "ephemeral_1h_input_tokens": 0,
- "ephemeral_5m_input_tokens": 327
- },
- "cache_creation_input_tokens": 327,
- "cache_read_input_tokens": 24028,
- "input_tokens": 2,
- "output_tokens": 1,
- "service_tier": "standard"
- },
- "context_management": null
- },
- "parent_tool_use_id": "toolu_016n3ZE99rKJF9L9G6Bt9zRk"
- },
- {
- "type": "user",
- "uuid": "b5e8e03b-306c-40ac-9e84-dc2eb1edca08",
- "message": {
- "content": [
- {
- "tool_use_id": "toolu_01QSrwYRiyJzCd9ia61LhP9C",
- "type": "tool_result",
- "content": [
- {
- "type": "text",
- "text": "Waited for 30 seconds"
- }
- ]
- }
- ],
- "role": "user"
- },
- "parent_tool_use_id": "toolu_016n3ZE99rKJF9L9G6Bt9zRk",
- "tool_use_result": [
- {
- "type": "text",
- "text": "Waited for 30 seconds"
- }
- ]
- },
- {
- "type": "assistant",
- "uuid": "b51ff6d7-a532-4089-a53f-0474ca9e0c82",
- "message": {
- "id": "msg_01DAkcCoZS7merNFLfMxLQH7",
- "content": [
- {
- "type": "tool_use",
- "id": "toolu_013uqixmCz7UZfUr2qMFZLg6",
- "name": "mcp__mediaGeneration__getVideoStatus",
- "input": {
- "taskId": "694a527b3e7b39da998b3945",
- "userId": "68abbe6af812ccb3e1a53d68",
- "userType": "user"
- }
- }
- ],
- "model": "claude-haiku-4-5-20251001",
- "role": "assistant",
- "stop_reason": "tool_use",
- "stop_sequence": null,
- "type": "message",
- "usage": {
- "cache_creation": {
- "ephemeral_1h_input_tokens": 0,
- "ephemeral_5m_input_tokens": 83
- },
- "cache_creation_input_tokens": 83,
- "cache_read_input_tokens": 24355,
- "input_tokens": 5,
- "output_tokens": 123,
- "service_tier": "standard"
- },
- "context_management": null
- },
- "parent_tool_use_id": "toolu_016n3ZE99rKJF9L9G6Bt9zRk"
- },
- {
- "type": "user",
- "uuid": "8c40f3d8-f4cb-42c4-92d4-97475cf6736e",
- "message": {
- "content": [
- {
- "tool_use_id": "toolu_013uqixmCz7UZfUr2qMFZLg6",
- "type": "tool_result",
- "content": [
- {
- "type": "text",
- "text": "Video is completed, task id: 694a527b3e7b39da998b3945 and video url is https://aitoearn.s3.ap-southeast-1.amazonaws.com/ai/video/sora-2/68abbe6af812ccb3e1a53d68/694a527b3e7b39da998b3945.mp4\nStart time: 2025-12-23T08:27:38.000Z\nCurrent time: 2025-12-23T08:33:45.770Z\nElapsed time: 6 minutes 7 seconds"
- }
- ]
- }
- ],
- "role": "user"
- },
- "parent_tool_use_id": "toolu_016n3ZE99rKJF9L9G6Bt9zRk",
- "tool_use_result": [
- {
- "type": "text",
- "text": "Video is completed, task id: 694a527b3e7b39da998b3945 and video url is https://aitoearn.s3.ap-southeast-1.amazonaws.com/ai/video/sora-2/68abbe6af812ccb3e1a53d68/694a527b3e7b39da998b3945.mp4\nStart time: 2025-12-23T08:27:38.000Z\nCurrent time: 2025-12-23T08:33:45.770Z\nElapsed time: 6 minutes 7 seconds"
- }
- ]
- },
- {
- "type": "user",
- "uuid": "02649074-21f8-46a5-a5e1-d06ba86a6214",
- "message": {
- "content": [
- {
- "tool_use_id": "toolu_016n3ZE99rKJF9L9G6Bt9zRk",
- "type": "tool_result",
- "content": [
- {
- "type": "text",
- "text": "Perfect! The video generation task has been completed successfully.\n\n**Final Result:**\n\nThe video generation task (ID: 694a527b3e7b39da998b3945) has completed with the following details:\n\n- **Status:** Completed\n- **Start Time:** 2025-12-23T08:27:38.000Z\n- **Completion Time:** 2025-12-23T08:33:45.770Z\n- **Total Processing Time:** 6 minutes 7 seconds\n- **Final Video URL:** https://aitoearn.s3.ap-southeast-1.amazonaws.com/ai/video/sora-2/68abbe6af812ccb3e1a53d68/694a527b3e7b39da998b3945.mp4\n\nThe video is now ready for use and can be accessed via the provided S3 URL."
- },
- {
- "type": "text",
- "text": "agentId: ac2740e (for resuming to continue this agent's work if needed)"
- }
- ]
- }
- ],
- "role": "user"
- },
- "parent_tool_use_id": null,
- "tool_use_result": {
- "status": "completed",
- "prompt": "Poll the video generation task status using getVideoStatus tool. \n- userId: 68abbe6af812ccb3e1a53d68\n- userType: user\n- taskId: 694a527b3e7b39da998b3945\n\nWait 210 seconds before first check, then check every 30 seconds until the video is completed. Return the final video URL when done.",
- "agentId": "ac2740e",
- "content": [
- {
- "type": "text",
- "text": "Perfect! The video generation task has been completed successfully.\n\n**Final Result:**\n\nThe video generation task (ID: 694a527b3e7b39da998b3945) has completed with the following details:\n\n- **Status:** Completed\n- **Start Time:** 2025-12-23T08:27:38.000Z\n- **Completion Time:** 2025-12-23T08:33:45.770Z\n- **Total Processing Time:** 6 minutes 7 seconds\n- **Final Video URL:** https://aitoearn.s3.ap-southeast-1.amazonaws.com/ai/video/sora-2/68abbe6af812ccb3e1a53d68/694a527b3e7b39da998b3945.mp4\n\nThe video is now ready for use and can be accessed via the provided S3 URL."
- }
- ],
- "totalDurationMs": 361355,
- "totalTokens": 25034,
- "totalToolUseCount": 8,
- "usage": {
- "input_tokens": 2,
- "cache_creation_input_tokens": 388,
- "cache_read_input_tokens": 24438,
- "cache_creation": {
- "ephemeral_5m_input_tokens": 388,
- "ephemeral_1h_input_tokens": 0
- },
- "output_tokens": 206,
- "service_tier": "standard"
- }
- }
- },
- {
- "type": "stream_event",
- "uuid": "d0e8342a-18d7-4a67-b872-fb95377ca1ee",
- "event": {
- "type": "message_start",
- "message": {
- "model": "claude-sonnet-4-5-20250929",
- "id": "msg_01N7yKkob9ofMwt7Frzin7Y1",
- "type": "message",
- "role": "assistant",
- "content": [],
- "stop_reason": null,
- "stop_sequence": null,
- "usage": {
- "input_tokens": 5,
- "cache_creation_input_tokens": 25914,
- "cache_read_input_tokens": 1867,
- "cache_creation": {
- "ephemeral_5m_input_tokens": 25914,
- "ephemeral_1h_input_tokens": 0
- },
- "output_tokens": 1,
- "service_tier": "standard"
- }
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "e52e7216-d8b4-4b0e-9e70-c19908b0472c",
- "event": {
- "type": "content_block_start",
- "index": 0,
- "content_block": {
- "type": "text",
- "text": ""
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "ec282180-2377-4305-9cba-50b6d1ef93e5",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "太"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "50949746-8bb2-44dc-88a3-273579ec7882",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "好了!您"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "e82bae7e-9a74-4f8c-a9bb-b04626010b68",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "的《"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "cf4e7ae7-d4ca-42c5-8346-e5754fd0cd0f",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "望庐山瀑布"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "1a48fa0d-8937-40fb-bccf-d495b0ae5528",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "》视频已"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "47eba675-a74a-4627-8f19-fea6df8f3709",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "经"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "90587acc-49c6-4547-bc92-c83c8957f67d",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "生"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "2e27f8ad-7535-40d3-80f4-ddd94eb0527f",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "成完"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "6d754424-25bc-460a-9d44-1d5d35a3ca47",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "成!"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "f18991ea-4710-4ece-bbc4-a57ce4c9caf6",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "🎬"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "8da1077c-39d9-4a7f-a44e-7da608a2748f",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "\n\n**视"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "44cad5e0-a7db-4e4d-8561-6256eb58b5ce",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "频信"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "91c000a8-b483-44b4-a77a-29dfd5330a1a",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "息:**\n- "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "ecfd8e38-31a8-43ba-9952-22785cf49ab5",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "✅ 生"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "c1ddef5c-bd28-4852-a2e3-fec3edf1d715",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "成成"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "b9157858-d1db-45b4-aed8-49ab2364a8b4",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "功"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "751d2164-74c3-43c0-8acc-667f4fb9e358",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "\n- "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "ddf82d05-d86c-456d-b1d4-6a84a502d0f0",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "⏱️ 用"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "600cdd67-d823-4efb-a111-dd571bbcf95f",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "时:"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "f5aa77d4-e30f-4898-8319-e8d45359dc7c",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "约"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "05dde112-b1af-49c3-9d0f-cef1a5500758",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "6分钟"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "cdaf78ca-839c-4ed4-98a3-3bcfedaac37e",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "\n- "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "996aa093-20c3-4d7b-9bc9-b6bf82968e42",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "📹"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "08a43126-8c91-4f89-b44c-422738addffc",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": " 时"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "697b1fe8-85ca-4ff4-8934-e432567afcaf",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "长:10秒\n- "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "232f2171-3856-4173-a621-dd9a103c1f16",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "🎨"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "c39577ad-a19f-4050-a8cc-f647d694bbc6",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": " 主题:庐山"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "dd719695-ff66-48e4-a2d2-c8ecbba508c6",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "瀑布的"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "d6b4b83e-7991-4f44-a4fd-fd80c157219d",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "壮"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "10d8e05d-f224-4e03-ab99-7e06637e29e8",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "丽景观"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "29f865bf-d2bd-4e46-b1a3-9c9a8c7abd62",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": ","
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "98a54a69-0cfd-4f6e-ab7f-a5fb19c22460",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "展"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "5d4fa839-b8d3-4cc1-a564-e12e565e77d5",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "现李"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "31757e85-46a8-4762-88a7-28e040f29e79",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "白"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "f53a9bef-691c-4a2c-8f18-fcb1c859c096",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "诗作"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "721dd6ff-5b02-42ce-a4aa-c3c4c8c5c3d1",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "中"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "70bf7f77-d059-456b-be30-17e15d6321aa",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "\""
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "a8d4d77f-1349-4a12-b370-95d12c55b81a",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "飞流"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "009d256e-0706-46cb-9f4e-b9b6a375ad20",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "直下三千尺,"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "42f2f06a-e7ff-4c7c-81d0-a3a6619a091b",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "疑是银"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "27234d5f-5d4f-4cc1-82ca-d5346a618bbb",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "河落九天\"的意"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "b6b4e702-515d-4783-8053-6db7c5035dbf",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "境\n\n您"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "21244fb4-595a-45c7-a995-634757424172",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "可以观"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "1a93accd-00b0-4a09-be70-0ec6f8df5926",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "看生成的视频,画"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "af32a63a-da16-42a3-97bc-17f4022d5498",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "面展"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "61a36d9f-9548-4541-9fef-cad53c29de74",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "现"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "1e734ee8-e803-4764-b4ad-66c5423c576a",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "了:"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "db05747b-fa76-46eb-b6f9-34e80d3f117a",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "\n- 庐山"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "68d1dfd5-5189-41ae-a7f0-514cc8c845dd",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "陡峭"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "676bde25-3a03-4d6e-b646-36e1907625af",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "悬崖上"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "296daee6-f13b-4c37-889d-1696c5cb3475",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "倾"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "efaadcc3-02c5-4fa2-aa25-bbef5e619767",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "泻而下的"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "ef90d9a6-9428-4d51-971a-8acb0e6eeec5",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "壮观"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "eb15319d-10a8-4c47-bec7-3325da851d47",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "瀑布\n- "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "92ca8bec-6a19-406b-af30-d3f5167d6a28",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "阳光照"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "4dc9927f-ce04-4a7e-9c73-8e4af3f793c6",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "射"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "1be5a556-5b28-4979-b817-ddc57ad9ca90",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "下的水"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "1bcd2782-f408-40f7-a193-86debe60e213",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "雾与"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "9fff58a9-b06f-423e-bf5f-e88a4d506e81",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "飞"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "47d64b18-9235-486a-b5fb-9be4cd5785e3",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "溅\n- 古松"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "25d2262f-d914-42e8-b813-187cd621cdd3",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "点"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "abbadf51-a430-49b0-b816-bbfd5f9646e6",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "缀在"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "93dad05f-150d-4b26-b617-35f3cb5bb9c9",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "岩"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "3d3ca617-fd46-418c-b891-14eda3f112ae",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "壁间"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "4df351c8-2f79-44e2-b1f4-fe0439908455",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "\n- 中"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "3184080d-f4e4-4956-a6c5-7f36722126a4",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "国传统山水画美"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "89b514d3-f141-416a-96c7-3babe5d6137d",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "学"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "8dda7a7b-64d7-49f7-8388-b430c24141dc",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "风"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "58e37357-8800-4c50-b477-c86b22572fef",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "格"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "assistant",
- "uuid": "a290b0b6-1187-4fd1-bc1a-6b4bf3d6d210",
- "message": {
- "id": "msg_01N7yKkob9ofMwt7Frzin7Y1",
- "content": [
- {
- "type": "text",
- "text": "太好了!您的《望庐山瀑布》视频已经生成完成!🎬\n\n**视频信息:**\n- ✅ 生成成功\n- ⏱️ 用时:约6分钟\n- 📹 时长:10秒\n- 🎨 主题:庐山瀑布的壮丽景观,展现李白诗作中\"飞流直下三千尺,疑是银河落九天\"的意境\n\n您可以观看生成的视频,画面展现了:\n- 庐山陡峭悬崖上倾泻而下的壮观瀑布\n- 阳光照射下的水雾与飞溅\n- 古松点缀在岩壁间\n- 中国传统山水画美学风格"
- }
- ],
- "model": "claude-sonnet-4-5-20250929",
- "role": "assistant",
- "stop_reason": null,
- "stop_sequence": null,
- "type": "message",
- "usage": {
- "cache_creation": {
- "ephemeral_1h_input_tokens": 0,
- "ephemeral_5m_input_tokens": 25914
- },
- "cache_creation_input_tokens": 25914,
- "cache_read_input_tokens": 1867,
- "input_tokens": 5,
- "output_tokens": 1,
- "service_tier": "standard"
- },
- "context_management": null
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "eb995f69-6c31-4888-868d-963e5feb286d",
- "event": {
- "type": "content_block_stop",
- "index": 0
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "f23337a2-de94-43d1-a7e5-131d401ea2c1",
- "event": {
- "type": "content_block_start",
- "index": 1,
- "content_block": {
- "type": "tool_use",
- "id": "toolu_015DNAxP8MkumrY7KUnjN1TQ",
- "name": "mcp__sessionTools__outputTaskResult",
- "input": {}
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "182ad9de-8e0c-4796-98b1-df7f3dc8b479",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": ""
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "14e927c3-3204-4149-ab73-fbe399aab957",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "{\"r"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "e72276c6-9806-4e62-9933-87dcfc87324d",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "esul"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "a3b4a358-1206-4695-826d-6f3de13df950",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "t\""
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "9150be79-2842-404b-9679-662fb9bfad4c",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": ": {\"type\":\""
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "b28cd243-45ee-4960-bf6c-e665ee05fee7",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "mediaOn"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "daf7ede1-5aca-4bf3-a03a-ac6df1bebe5e",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "ly\",\"ac"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "64bb9d19-6f18-4429-a9cf-ef3c1085fa1b",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "tion\":\""
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "b2085a7a-481e-47f5-b22e-0ffb611c0f7a",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "none\",\"me"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "56df6e88-7247-4d26-99f5-672461cfa73b",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "dias\":["
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "fe293599-d9ba-4d82-a295-5ee61707c681",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "{\"t"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "a8596232-41e8-4a9f-978c-827157ea928c",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "ype\":\"V"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "689974bd-7e0b-41b3-bb37-a61cb493410a",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "ID"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "a58804d3-b93c-4c96-b278-f91040ae09bb",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "EO\",\"u"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "db77b56d-f5a9-4639-bbcb-47b4d75ed202",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "rl\":\"ht"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "e9650a78-be8b-4fa0-b805-d59d7f78eb50",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "tps://a"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "60400212-28d0-4801-8f54-c5969a6fc477",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "itoear"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "fddee8c8-6a60-4f9c-b6e4-6123988b8389",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "n.s"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "aca3991f-6bfc-4382-9103-54e26b51231f",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "3.ap"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "a18ca338-d07c-4639-ad1e-5a1d15b1cb0b",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "-southeast-1"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "b825b81c-4fd3-4975-b2f5-b093841de81a",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": ".amazonaw"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "1d26fa44-4ad1-4f96-9a22-458eaf3079d3",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "s.com/ai/"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "6a114901-6ae9-4fe9-b885-5969c9d0993f",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "video/sor"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "b1d4a7f6-5a40-43e7-9bc2-81d2edf1135b",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "a-2/68abbe6"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "ecfd2847-7528-421b-97b6-43017d2a1957",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "af812ccb3e1"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "fdf22de1-6556-46c3-877b-7745352f9453",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "a53d"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "b318ecaf-c426-4ebc-a522-e0a0882cd135",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "68/694a527b3"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "cb8a3b5b-0c08-4024-a512-a9503109e153",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "e7b39da998b3"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "059fe467-7a96-4aa6-9dd9-80fc55d70fe0",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "945.mp4\",\""
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "8bdec63c-cdde-4253-88b7-daaa91aae402",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "prompt\":\"A "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "7c8e27af-017c-4fb3-91a3-f79505ec27e0",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "majestic wa"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "889096c5-2465-4911-ad9a-17523c1938f0",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "terf"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "9ec66b76-c37b-4ef8-9d17-687031382ecd",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "all ca"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "145c1445-664a-4b90-8e00-1b1438dadae7",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "scading"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "595e404f-94aa-4a89-8f33-f671efaf688a",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": " down"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "5b5a8945-269d-40ae-a7cd-a63208e477e4",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": " the steep"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "abac851a-da7a-42f1-8b78-51b238756138",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": " cliffs of "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "86eea197-b483-4e5c-a4b1-a2e7e7f5ebe1",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "Mount Lu "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "189f3d07-4eee-487c-94f7-2e1987ca132b",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "(Lush"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "66cd25f0-8028-4ff0-86e4-ecdbb78d6085",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "an) in "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "c40243ee-8a27-4b58-9c56-97f88ffc84dc",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "China."
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "025fe297-2797-4066-990c-fe40d12e362c",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": " The wat"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "6e9960ce-2342-4fd7-bc18-34ccc2e01f3b",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "er"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "b8e7019f-680b-4c66-8283-b823e4785d69",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "fall plun"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "21252010-28ef-471f-b15e-a3e01f73dc26",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "ges fr"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "1f55380b-4681-44b9-8db9-9810a8175f0a",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "om great hei"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "e3757a51-e64d-485d-a329-7d55437aa1c6",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "ghts, cre"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "b8b38b75-9762-4f91-b34b-c810176c2865",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "at"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "fe6cec64-462d-490e-a973-488b9e4a1df4",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "ing"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "02c443ed-b4a9-4d1d-ab9f-2ab5c1bd67e5",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": " mi"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "46b9d956-a6fe-4630-9b16-9037eb175e2f",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "st and sp"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "fface8e2-72df-4878-8857-b55230f194d8",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "ray that"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "0b6493e1-6fa5-4544-8067-88127f482e00",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": " catche"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "ae9e5155-3683-4b85-ac81-582478151473",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "s the sunlig"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "2499ed5f-2193-4d4c-8170-7609e865d8c8",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "ht, ap"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "8fd0f732-0977-4f77-8143-5bc48436f848",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "peari"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "7f40b6e1-ff01-48c9-85bc-91164075f303",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "ng like"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "110354d2-1ae2-4b5e-94cf-736ca9dc5cee",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": " a silver ri"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "bdcac9da-8cc3-488b-91cd-f1b326fe03fa",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "bbon fal"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "9ddc494b-5c44-4153-bae9-3b7e89911286",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "ling from th"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "d140164f-0e40-4a42-ae2e-ea2efde12cde",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "e sky. Ancie"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "57b6d1b8-1a00-42f2-bc9d-149c9f0b4b8e",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "nt pine tr"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "f9e0383c-9515-4455-8784-8ec331996bbb",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "ees"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "8c700ffb-88e5-4a7c-a013-f242b8b6d226",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": " c"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "6c6989f5-f979-4339-89ad-db8198b28a5c",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "ling to the "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "acba23c4-da01-43bc-87ec-f4bbe62fa8bf",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "rocky cliff"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "01709e15-ab9f-41c0-98e9-c622989e7c7a",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "s. The scene"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "ba4a3f03-7ba0-4e4d-8bf9-8bd43787d5d0",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": " captur"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "02f3f5b3-5e8f-4fdc-aaa3-0f1a0a173d97",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "es "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "20fc0754-141e-4fc6-ac21-532805d04a97",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "the "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "84ff0aaa-5773-405a-9931-aa0531976fff",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "grandeur and"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "141fad43-beea-43e4-be0e-f51c50dc7f88",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": " poeti"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "fc564b71-50b5-4a67-916e-8b0fcb840dc8",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "c bea"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "67ec0e31-dfd8-403d-9e1e-1a804362b12e",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "uty descri"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "8d693006-7ccb-402c-8466-4adaf5ceacc4",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "bed in Li Ba"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "29845067-07a1-46bc-8404-4a309c98e461",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "i's "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "907ec31c-4034-45fc-9cd4-08e3e2f04417",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "famous poem"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "a031affc-24eb-47c4-ba0e-0e130f64717a",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": " \\\"Vie"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "f5a8257c-1893-4e77-b81b-4980e6969c8f",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "wing th"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "8e6057d3-b5ea-4160-ab8e-bdf6fef8390d",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "e Waterfall "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "f7e48ac5-3c0a-4969-8723-4916f5334d5a",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "at Mount Lu\\"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "af5a06a5-a977-4aa8-8735-0094665e1283",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "\". Cinemati"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "26399767-170e-407f-85fe-d7db853a99d5",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "c, et"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "214e449b-87b4-4b8d-9eee-abfee25df9c9",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "he"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "02bd9db7-7194-47da-beb8-69bd2b5c92cf",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "real"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "5fea571c-8b33-4b16-9c48-a269257cfe9c",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": " a"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "5ca73e4f-a1bf-4b6d-a3fb-40deb28fccf3",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "tmosphe"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "defedfb1-4ed8-482b-afdf-93bd62eabb84",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "re with so"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "b38d54e8-086b-436b-8f74-447f38740320",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "ft mornin"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "9b4bb2b0-79cd-468c-8ac9-8095ad3aebe1",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "g ligh"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "1ea6af40-b7d6-445c-b2e3-934d3f6d130a",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "t, tradition"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "855993c9-c110-4a47-94bd-683c06a41393",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "al Ch"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "7a63efdb-d33d-40d2-aa9c-1dbf116c8f8e",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "inese l"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "abf94ed0-cbd8-4a5f-a45b-fda0cb8ee31a",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "andsc"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "2b73051d-b488-48e5-ab12-cb843c4e4dd6",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "ape paintin"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "27771954-f4e0-49f6-abb3-4ff4b884fdd7",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "g aestheti"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "766a2734-c391-4ddd-9870-567033f5030e",
- "event": {
- "type": "content_block_delta",
- "index": 1,
- "delta": {
- "type": "input_json_delta",
- "partial_json": "c.\"}]}}"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "assistant",
- "uuid": "8ba69477-43c0-4424-bcb4-7105f9611163",
- "message": {
- "id": "msg_01N7yKkob9ofMwt7Frzin7Y1",
- "content": [
- {
- "type": "tool_use",
- "id": "toolu_015DNAxP8MkumrY7KUnjN1TQ",
- "name": "mcp__sessionTools__outputTaskResult",
- "input": {
- "result": {
- "type": "mediaOnly",
- "action": "none",
- "medias": [
- {
- "type": "VIDEO",
- "url": "https://aitoearn.s3.ap-southeast-1.amazonaws.com/ai/video/sora-2/68abbe6af812ccb3e1a53d68/694a527b3e7b39da998b3945.mp4",
- "prompt": "A majestic waterfall cascading down the steep cliffs of Mount Lu (Lushan) in China. The waterfall plunges from great heights, creating mist and spray that catches the sunlight, appearing like a silver ribbon falling from the sky. Ancient pine trees cling to the rocky cliffs. The scene captures the grandeur and poetic beauty described in Li Bai's famous poem \"Viewing the Waterfall at Mount Lu\". Cinematic, ethereal atmosphere with soft morning light, traditional Chinese landscape painting aesthetic."
- }
- ]
- }
- }
- }
- ],
- "model": "claude-sonnet-4-5-20250929",
- "role": "assistant",
- "stop_reason": "tool_use",
- "stop_sequence": null,
- "type": "message",
- "usage": {
- "cache_creation": {
- "ephemeral_1h_input_tokens": 0,
- "ephemeral_5m_input_tokens": 25914
- },
- "cache_creation_input_tokens": 25914,
- "cache_read_input_tokens": 1867,
- "input_tokens": 5,
- "output_tokens": 496,
- "service_tier": "standard"
- },
- "context_management": null
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "cfef3d7e-be40-4ad2-853e-1fbe536599fd",
- "event": {
- "type": "content_block_stop",
- "index": 1
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "a7504d42-715e-4561-81a3-f48bff32d695",
- "event": {
- "type": "message_delta",
- "delta": {
- "stop_reason": "tool_use",
- "stop_sequence": null
- },
- "usage": {
- "cache_creation_input_tokens": 25914,
- "cache_read_input_tokens": 1867,
- "input_tokens": 5,
- "output_tokens": 496
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "0e575e5f-aee9-43a6-9057-a6ccda7b9aa3",
- "event": {
- "type": "message_stop"
- },
- "parent_tool_use_id": null
- },
- {
- "type": "user",
- "uuid": "08612088-1666-48b9-a321-a326c565dea8",
- "message": {
- "content": [
- {
- "tool_use_id": "toolu_015DNAxP8MkumrY7KUnjN1TQ",
- "type": "tool_result",
- "content": [
- {
- "type": "text",
- "text": "Task result submitted successfully"
- }
- ]
- }
- ],
- "role": "user"
- },
- "parent_tool_use_id": null,
- "tool_use_result": [
- {
- "type": "text",
- "text": "Task result submitted successfully"
- }
- ]
- },
- {
- "type": "stream_event",
- "uuid": "573dc451-c8c8-46e4-8675-0d1ade1f3204",
- "event": {
- "type": "message_start",
- "message": {
- "model": "claude-sonnet-4-5-20250929",
- "id": "msg_01PGrBPqbi7m83q3FGK8MA3d",
- "type": "message",
- "role": "assistant",
- "content": [],
- "stop_reason": null,
- "stop_sequence": null,
- "usage": {
- "input_tokens": 2,
- "cache_creation_input_tokens": 622,
- "cache_read_input_tokens": 27781,
- "cache_creation": {
- "ephemeral_5m_input_tokens": 622,
- "ephemeral_1h_input_tokens": 0
- },
- "output_tokens": 1,
- "service_tier": "standard"
- }
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "8981cf87-b416-4cfd-90d3-b7d921ad414d",
- "event": {
- "type": "content_block_start",
- "index": 0,
- "content_block": {
- "type": "text",
- "text": ""
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "c64ae8fa-e75b-457e-9dae-1315286f091e",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "视"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "522accea-81ab-4ef8-835f-30fd1e351afd",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "频已"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "eb3afa89-4c6f-4f09-8177-0538a6e45c1c",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "经"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "d577c8a1-8330-4b6f-b834-f2899dd8eb2b",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "成"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "db6b7805-e7a9-40ae-805f-ad55d21ae0b3",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "功生成!您"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "bae5d49d-bd71-42a4-a7d7-5f59adaa8bd4",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "觉得效"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "3fd1617b-f2e3-4aa1-8306-23e16b4cdd7c",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "果如"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "5b33095c-4038-48ec-87b0-4a5ab6159e2e",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "何?"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "59924dee-4dd0-4651-86dd-0835240eef6d",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "\n\n如"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "cd176dc4-031c-44f3-9a68-3c0004e8b76b",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "果您需"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "22ec5310-5540-4eaf-b3d5-44b52141de08",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "要,"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "2f85685d-0ed3-4f85-948f-337a36a6bb5e",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "我可以帮您:"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "7c896a00-cd4c-447d-b160-603bfe2ece20",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "\n- "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "991ff58b-8869-4a41-88cc-b737ac80fef8",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "📝"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "6d9b3659-6449-4474-b151-97d6679aa16a",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": " 保"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "e5f9910c-55e4-4717-9201-fef9d7f2025e",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "存到"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "9401be4d-b6fa-4d4d-b7a6-4225505c0e5f",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "素"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "13a6352f-8edc-453c-acab-97199e30fca8",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "材库或"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "f5fdbedb-7136-4058-9435-92587fee9869",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "草"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "219a7e18-50e3-4da6-8f5e-5882f31444d1",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "稿"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "b4b56774-d7ca-41eb-a9e4-0254dfa3b12f",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "\n- "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "79762828-7d3c-4bc7-9281-9d6ef7609c7e",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "🎬 对"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "5ae25ee6-dc19-4d6d-8d94-c7645f1c7e7e",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "视频进行编辑("
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "235111b8-8534-401e-9610-7d8e04ef129a",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "添"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "c89be4de-40af-4946-bacf-82ac670054a2",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "加文字、"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "6eb16a1a-2285-4ad7-a0eb-ff0977ec6847",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "剪辑、特"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "1dedbd70-791a-4845-8154-a5dff9a76835",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "效等)\n- 📤"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "6d6fa84a-7dfb-4e0f-8757-130550ebf9b2",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": " 发布"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "cb8adb7c-289e-450d-8707-e4c7778a5690",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "到社"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "23d7a3d2-5315-40f9-9dce-e1681a92711b",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "交媒体平"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "19afa648-5804-4d5c-af17-631aa938a62c",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "台\n- "
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "3284c19a-3bc3-4e67-b281-a11eca3ee645",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "🎨"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "83601a6c-93c9-4926-b92c-312240743d9f",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": " 生"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "53365eb6-26c2-4370-a085-8792e238624b",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "成其他风"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "d281ad0b-2cb6-4871-b165-1126bded3764",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "格或"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "5e7e663d-c8fc-446c-8e44-0753732ae15b",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "主题的"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "ca5c3add-b571-4f39-88aa-399e431cb04e",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "视频\n\n有"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "fd807ddf-e05f-4b04-84dc-c294f00981c5",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "什么需"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "8aa1ff96-67be-4f5e-bd53-ac3af09588d2",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "要我"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "f58049e5-a8ac-4ae6-8cc9-6a4109370fab",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "继"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "018df726-0b4c-4be8-a4e2-e23fc53b93f0",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "续帮您"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "410a8e33-1f2d-493b-b619-6d28450bd455",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "处"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "c0767d04-3303-4eaf-9bae-0ec85015f0b4",
- "event": {
- "type": "content_block_delta",
- "index": 0,
- "delta": {
- "type": "text_delta",
- "text": "理的吗?"
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "assistant",
- "uuid": "48f7e61f-5ec1-4a35-a158-8feb6dce40b7",
- "message": {
- "id": "msg_01PGrBPqbi7m83q3FGK8MA3d",
- "content": [
- {
- "type": "text",
- "text": "视频已经成功生成!您觉得效果如何?\n\n如果您需要,我可以帮您:\n- 📝 保存到素材库或草稿\n- 🎬 对视频进行编辑(添加文字、剪辑、特效等)\n- 📤 发布到社交媒体平台\n- 🎨 生成其他风格或主题的视频\n\n有什么需要我继续帮您处理的吗?"
- }
- ],
- "model": "claude-sonnet-4-5-20250929",
- "role": "assistant",
- "stop_reason": null,
- "stop_sequence": null,
- "type": "message",
- "usage": {
- "cache_creation": {
- "ephemeral_1h_input_tokens": 0,
- "ephemeral_5m_input_tokens": 622
- },
- "cache_creation_input_tokens": 622,
- "cache_read_input_tokens": 27781,
- "input_tokens": 2,
- "output_tokens": 1,
- "service_tier": "standard"
- },
- "context_management": null
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "8b2a768f-c468-4829-a514-c7c8c55f0b3a",
- "event": {
- "type": "content_block_stop",
- "index": 0
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "1c8650fc-fc9a-480f-8ce4-6ec03de8fd99",
- "event": {
- "type": "message_delta",
- "delta": {
- "stop_reason": "end_turn",
- "stop_sequence": null
- },
- "usage": {
- "cache_creation_input_tokens": 622,
- "cache_read_input_tokens": 27781,
- "input_tokens": 2,
- "output_tokens": 135
- }
- },
- "parent_tool_use_id": null
- },
- {
- "type": "stream_event",
- "uuid": "9196c6f1-8875-4520-a65b-ece09895e5ac",
- "event": {
- "type": "message_stop"
- },
- "parent_tool_use_id": null
- },
- {
- "type": "result",
- "subtype": "success",
- "uuid": "69e5deee-af17-421a-8eac-f007f802f3ce",
- "duration_ms": 419076,
- "duration_api_ms": 131210,
- "is_error": false,
- "num_turns": 5,
- "message": "视频已经成功生成!您觉得效果如何?\n\n如果您需要,我可以帮您:\n- 📝 保存到素材库或草稿\n- 🎬 对视频进行编辑(添加文字、剪辑、特效等)\n- 📤 发布到社交媒体平台\n- 🎨 生成其他风格或主题的视频\n\n有什么需要我继续帮您处理的吗?",
- "result": {
- "type": "mediaOnly",
- "medias": [
- {
- "type": "VIDEO",
- "url": "https://aitoearn.s3.ap-southeast-1.amazonaws.com/ai/video/sora-2/68abbe6af812ccb3e1a53d68/694a527b3e7b39da998b3945.mp4",
- "prompt": "A majestic waterfall cascading down the steep cliffs of Mount Lu (Lushan) in China. The waterfall plunges from great heights, creating mist and spray that catches the sunlight, appearing like a silver ribbon falling from the sky. Ancient pine trees cling to the rocky cliffs. The scene captures the grandeur and poetic beauty described in Li Bai's famous poem \"Viewing the Waterfall at Mount Lu\". Cinematic, ethereal atmosphere with soft morning light, traditional Chinese landscape painting aesthetic."
- }
- ],
- "action": "none"
- },
- "total_cost_usd": 0.3020834,
- "usage": {
- "cache_creation": {
- "ephemeral_1h_input_tokens": 0,
- "ephemeral_5m_input_tokens": 52000
- },
- "cache_creation_input_tokens": 52000,
- "cache_read_input_tokens": 85258,
- "input_tokens": 22,
- "output_tokens": 1305,
- "server_tool_use": {
- "web_search_requests": 0
- }
- },
- "permission_denials": []
- }
- ],
- "status": "completed"
- },
- "code": 0,
- "message": "请求成功"
-}
\ No newline at end of file
diff --git a/project/web/src/app/[lng]/accounts/components/AccountsTopNav/components/AccountSelector.tsx b/project/web/src/app/[lng]/accounts/components/AccountsTopNav/components/AccountSelector.tsx
index 511f7882..c413e279 100644
--- a/project/web/src/app/[lng]/accounts/components/AccountsTopNav/components/AccountSelector.tsx
+++ b/project/web/src/app/[lng]/accounts/components/AccountsTopNav/components/AccountSelector.tsx
@@ -13,9 +13,9 @@ import {
import { ScrollArea } from '@/components/ui/scroll-area'
import { cn } from '@/lib/utils'
import { getOssUrl } from '@/utils/oss'
+import AccountItem from './AccountItem'
import AccountSearchBar from './AccountSearchBar'
import AllChannelsItem from './AllChannelsItem'
-import AccountItem from './AccountItem'
import SpaceGroupItem from './SpaceGroupItem'
interface AccountSelectorProps {
@@ -32,7 +32,6 @@ interface AccountSelectorProps {
onAccountDelete: (account: SocialAccount) => void
onToggleSpaceCollapse: (spaceId: string) => void
onGroupSort: (groupId: string, direction: 'up' | 'down') => void
- onGroupDelete: (group: AccountGroup) => void
searchText: string
onSearchChange: (text: string) => void
}
@@ -51,7 +50,6 @@ const AccountSelector = memo(({
onAccountDelete,
onToggleSpaceCollapse,
onGroupSort,
- onGroupDelete,
searchText,
onSearchChange,
}: AccountSelectorProps) => {
@@ -113,37 +111,34 @@ const AccountSelector = memo(({
// 多空间: 按空间分组显示,支持折叠
sortedGroups.length > 0
? sortedGroups.map((group) => {
- const isCollapsed = collapsedSpaces.has(group.id)
- const groupAccounts = filteredAccounts.filter(account =>
- group.children.some(child => child.id === account.id)
- )
- const isDefaultGroup = group.isDefault
- const currentIndex = sortedGroups.findIndex(g => g.id === group.id)
- const canMoveUp = !isDefaultGroup && currentIndex > 0
- const canMoveDown = !isDefaultGroup && currentIndex < sortedGroups.length - 1
- const canDelete = !isDefaultGroup
+ const isCollapsed = collapsedSpaces.has(group.id)
+ const groupAccounts = filteredAccounts.filter(account =>
+ group.children.some(child => child.id === account.id),
+ )
+ const isDefaultGroup = group.isDefault
+ const currentIndex = sortedGroups.findIndex(g => g.id === group.id)
+ const canMoveUp = !isDefaultGroup && currentIndex > 0
+ const canMoveDown = !isDefaultGroup && currentIndex < sortedGroups.length - 1
- return (
- <SpaceGroupItem
- key={group.id}
- group={group}
- accounts={groupAccounts}
- isCollapsed={isCollapsed}
- isDefaultGroup={isDefaultGroup}
- canMoveUp={canMoveUp}
- canMoveDown={canMoveDown}
- canDelete={canDelete}
- activeAccountId={accountActive?.id}
- sortLoading={sortLoading}
- deleteLoading={deleteLoading}
- onToggleCollapse={onToggleSpaceCollapse}
- onSelectAccount={onAccountSelect}
- onDeleteAccount={onAccountDelete}
- onGroupSort={onGroupSort}
- onGroupDelete={onGroupDelete}
- />
- )
- })
+ return (
+ <SpaceGroupItem
+ key={group.id}
+ group={group}
+ accounts={groupAccounts}
+ isCollapsed={isCollapsed}
+ isDefaultGroup={isDefaultGroup}
+ canMoveUp={canMoveUp}
+ canMoveDown={canMoveDown}
+ activeAccountId={accountActive?.id}
+ sortLoading={sortLoading}
+ deleteLoading={deleteLoading}
+ onToggleCollapse={onToggleSpaceCollapse}
+ onSelectAccount={onAccountSelect}
+ onDeleteAccount={onAccountDelete}
+ onGroupSort={onGroupSort}
+ />
+ )
+ })
: (
<div className="text-center text-muted-foreground text-sm py-8">
{accountList.length === 0
@@ -156,18 +151,18 @@ const AccountSelector = memo(({
// 单空间: 直接显示所有账号
filteredAccounts.length > 0
? filteredAccounts.map((account) => {
- const isActive = accountActive?.id === account.id
- return (
- <AccountItem
- key={account.id}
- account={account}
- isActive={isActive}
- onSelect={onAccountSelect}
- onDelete={onAccountDelete}
- deleteLoading={deleteLoading}
- />
- )
- })
+ const isActive = accountActive?.id === account.id
+ return (
+ <AccountItem
+ key={account.id}
+ account={account}
+ isActive={isActive}
+ onSelect={onAccountSelect}
+ onDelete={onAccountDelete}
+ deleteLoading={deleteLoading}
+ />
+ )
+ })
: (
<div className="text-center text-muted-foreground text-sm py-8">
{accountList.length === 0
@@ -186,4 +181,3 @@ const AccountSelector = memo(({
AccountSelector.displayName = 'AccountSelector'
export default AccountSelector
-
diff --git a/project/web/src/app/[lng]/accounts/components/AccountsTopNav/components/ContextMenu.tsx b/project/web/src/app/[lng]/accounts/components/AccountsTopNav/components/ContextMenu.tsx
index ec355630..5c05bd3e 100644
--- a/project/web/src/app/[lng]/accounts/components/AccountsTopNav/components/ContextMenu.tsx
+++ b/project/web/src/app/[lng]/accounts/components/AccountsTopNav/components/ContextMenu.tsx
@@ -1,6 +1,6 @@
-import type { AccountGroupItem } from '@/api/types/account.type'
-import type { SocialAccount } from '@/api/types/account.type'
-import { DeleteOutlined, DownOutlined, UpOutlined } from '@ant-design/icons'
+import type { AccountGroupItem, SocialAccount } from '@/api/types/account.type'
+
+import { ChevronDown, ChevronUp, Trash2 } from 'lucide-react'
import { memo, useEffect } from 'react'
import { useTransClient } from '@/app/i18n/client'
@@ -14,7 +14,6 @@ interface ContextMenuProps {
onClose: () => void
onAccountDelete: (account: SocialAccount) => void
onGroupSort: (groupId: string, direction: 'up' | 'down') => void
- onGroupDelete: (group: AccountGroupItem) => void
}
const ContextMenu = memo(({
@@ -27,12 +26,12 @@ const ContextMenu = memo(({
onClose,
onAccountDelete,
onGroupSort,
- onGroupDelete,
}: ContextMenuProps) => {
const { t } = useTransClient('account')
useEffect(() => {
- if (!open) return
+ if (!open)
+ return
const handleClickOutside = () => {
onClose()
@@ -44,7 +43,8 @@ const ContextMenu = memo(({
}
}, [open, onClose])
- if (!open || !data) return null
+ if (!open || !data)
+ return null
return (
<div
@@ -53,7 +53,7 @@ const ContextMenu = memo(({
left: x,
top: y,
}}
- onClick={(e) => e.stopPropagation()}
+ onClick={e => e.stopPropagation()}
>
{target === 'account' && (
<button
@@ -63,7 +63,7 @@ const ContextMenu = memo(({
onClose()
}}
>
- <DeleteOutlined />
+ <Trash2 className="h-4 w-4" />
{t('deleteAccount')}
</button>
)}
@@ -73,7 +73,6 @@ const ContextMenu = memo(({
const currentIndex = sortedGroups.findIndex(g => g.id === group.id)
const canMoveUp = !isDefaultGroup && currentIndex > 0
const canMoveDown = !isDefaultGroup && currentIndex < sortedGroups.length - 1
- const canDelete = !isDefaultGroup
return (
<>
@@ -85,7 +84,7 @@ const ContextMenu = memo(({
}}
disabled={!canMoveUp}
>
- <UpOutlined />
+ <ChevronUp className="h-4 w-4" />
{t('sidebar.moveUp')}
</button>
<button
@@ -96,21 +95,9 @@ const ContextMenu = memo(({
}}
disabled={!canMoveDown}
>
- <DownOutlined />
+ <ChevronDown className="h-4 w-4" />
{t('sidebar.moveDown')}
</button>
- <div className="h-px bg-border my-1" />
- <button
- className="w-full flex items-center gap-2 px-2 py-1.5 text-sm hover:bg-muted rounded-sm text-destructive disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer"
- onClick={() => {
- onGroupDelete(group)
- onClose()
- }}
- disabled={!canDelete}
- >
- <DeleteOutlined />
- {t('userManageSidebar.delete')}
- </button>
</>
)
})()}
@@ -121,4 +108,3 @@ const ContextMenu = memo(({
ContextMenu.displayName = 'ContextMenu'
export default ContextMenu
-
diff --git a/project/web/src/app/[lng]/accounts/components/AccountsTopNav/components/SpaceGroupItem.tsx b/project/web/src/app/[lng]/accounts/components/AccountsTopNav/components/SpaceGroupItem.tsx
index db8bb8b9..4865d6e4 100644
--- a/project/web/src/app/[lng]/accounts/components/AccountsTopNav/components/SpaceGroupItem.tsx
+++ b/project/web/src/app/[lng]/accounts/components/AccountsTopNav/components/SpaceGroupItem.tsx
@@ -1,16 +1,8 @@
import type { SocialAccount } from '@/api/types/account.type'
import type { AccountGroup } from '@/store/account'
-import { DeleteOutlined, DownOutlined, EllipsisOutlined, LoadingOutlined, RightOutlined, UpOutlined } from '@ant-design/icons'
+import { DownOutlined, RightOutlined, UpOutlined } from '@ant-design/icons'
import { memo } from 'react'
import { useTransClient } from '@/app/i18n/client'
-import {
- DropdownMenu,
- DropdownMenuContent,
- DropdownMenuItem,
- DropdownMenuSeparator,
- DropdownMenuTrigger,
-} from '@/components/ui/dropdown-menu'
-import { cn } from '@/lib/utils'
import AccountItem from './AccountItem'
interface SpaceGroupItemProps {
@@ -20,7 +12,6 @@ interface SpaceGroupItemProps {
isDefaultGroup: boolean
canMoveUp: boolean
canMoveDown: boolean
- canDelete: boolean
activeAccountId?: string
sortLoading?: string | null
deleteLoading?: string | null
@@ -28,7 +19,6 @@ interface SpaceGroupItemProps {
onSelectAccount: (account: SocialAccount) => void
onDeleteAccount: (account: SocialAccount) => void
onGroupSort: (groupId: string, direction: 'up' | 'down') => void
- onGroupDelete: (group: AccountGroup) => void
}
const SpaceGroupItem = memo(({
@@ -38,7 +28,6 @@ const SpaceGroupItem = memo(({
isDefaultGroup,
canMoveUp,
canMoveDown,
- canDelete,
activeAccountId,
sortLoading,
deleteLoading,
@@ -46,85 +35,27 @@ const SpaceGroupItem = memo(({
onSelectAccount,
onDeleteAccount,
onGroupSort,
- onGroupDelete,
}: SpaceGroupItemProps) => {
const { t } = useTransClient('account')
const isSorting = sortLoading === group.id
- const isDeletingGroup = deleteLoading === group.id
return (
<div className="mb-1">
{/* 空间标题 - 可点击折叠 */}
- <DropdownMenu>
- <div
- className={cn(
- 'flex items-center gap-2 px-3 py-2 transition-colors group relative',
- isDeletingGroup ? 'opacity-50 cursor-not-allowed' : 'cursor-pointer hover:bg-muted/50',
- )}
- onClick={() => !isDeletingGroup && onToggleCollapse(group.id)}
- >
- {isCollapsed
- ? <RightOutlined className="text-xs text-muted-foreground" />
- : <DownOutlined className="text-xs text-muted-foreground" />}
- <span className="text-xs font-semibold text-muted-foreground flex-1">
- {group.name || t('defaultSpace')}
- </span>
- <span className="text-xs text-muted-foreground">
- {accounts.length}
- </span>
- {!isDefaultGroup && (
- isDeletingGroup ? (
- <div className="p-1">
- <LoadingOutlined className="h-4 w-4 text-muted-foreground animate-spin" />
- </div>
- ) : (
- <DropdownMenuTrigger asChild>
- <button
- onClick={(e) => {
- e.stopPropagation()
- }}
- className="opacity-0 group-hover:opacity-100 transition-opacity p-1 hover:bg-muted rounded cursor-pointer"
- >
- <EllipsisOutlined className="h-4 w-4 text-muted-foreground" />
- </button>
- </DropdownMenuTrigger>
- )
- )}
- <DropdownMenuContent align="end">
- <DropdownMenuItem
- onClick={() => onGroupSort(group.id, 'up')}
- disabled={!canMoveUp || isSorting}
- >
- {isSorting ? (
- <LoadingOutlined className="mr-2 animate-spin" />
- ) : (
- <UpOutlined className="mr-2" />
- )}
- {t('sidebar.moveUp')}
- </DropdownMenuItem>
- <DropdownMenuItem
- onClick={() => onGroupSort(group.id, 'down')}
- disabled={!canMoveDown || isSorting}
- >
- {isSorting ? (
- <LoadingOutlined className="mr-2 animate-spin" />
- ) : (
- <DownOutlined className="mr-2" />
- )}
- {t('sidebar.moveDown')}
- </DropdownMenuItem>
- <DropdownMenuSeparator />
- <DropdownMenuItem
- onClick={() => onGroupDelete(group)}
- disabled={!canDelete}
- className="text-destructive"
- >
- <DeleteOutlined className="mr-2" />
- {t('userManageSidebar.delete')}
- </DropdownMenuItem>
- </DropdownMenuContent>
- </div>
- </DropdownMenu>
+ <div
+ className="flex items-center gap-2 px-3 py-2 transition-colors cursor-pointer hover:bg-muted/50"
+ onClick={() => onToggleCollapse(group.id)}
+ >
+ {isCollapsed
+ ? <RightOutlined className="text-xs text-muted-foreground" />
+ : <DownOutlined className="text-xs text-muted-foreground" />}
+ <span className="text-xs font-semibold text-muted-foreground flex-1">
+ {group.name || t('defaultSpace')}
+ </span>
+ <span className="text-xs text-muted-foreground">
+ {accounts.length}
+ </span>
+ </div>
{/* 频道列表 */}
{!isCollapsed && accounts.map((account) => {
@@ -148,4 +79,3 @@ const SpaceGroupItem = memo(({
SpaceGroupItem.displayName = 'SpaceGroupItem'
export default SpaceGroupItem
-
diff --git a/project/web/src/app/[lng]/accounts/components/AccountsTopNav/index.tsx b/project/web/src/app/[lng]/accounts/components/AccountsTopNav/index.tsx
index bfc9e30d..66e55d6e 100644
--- a/project/web/src/app/[lng]/accounts/components/AccountsTopNav/index.tsx
+++ b/project/web/src/app/[lng]/accounts/components/AccountsTopNav/index.tsx
@@ -15,7 +15,6 @@ import { Modal } from 'antd'
import { memo, useCallback, useMemo, useState } from 'react'
import { useShallow } from 'zustand/react/shallow'
import { deleteAccountsApi } from '@/api/account'
-import { deleteAccountGroupApi } from '@/api/account'
import { apiUpdateAccountGroupSortRank } from '@/api/accountSort'
import { useTransClient } from '@/app/i18n/client'
import { Button } from '@/components/ui/button'
@@ -80,31 +79,19 @@ const AccountsTopNav = memo<IAccountsTopNavProps>(
try {
await deleteAccountsApi([account.id])
await getAccountList()
- toast.success(t('messages.deleteSuccess' as any))
+ toast.success(t('messages.deleteSuccess'))
// 如果删除的是当前选中的账号,清空选中状态
if (accountActive?.id === account.id) {
setAccountActive(undefined)
}
- } catch (error) {
- toast.error(t('messages.sortFailed' as any))
- } finally {
- setDeleteLoading(null)
}
- }, [accountActive, getAccountList, setAccountActive, t])
-
- // 处理空间删除
- const handleGroupDelete = useCallback(async (group: AccountGroup) => {
- setDeleteLoading(group.id)
- try {
- await deleteAccountGroupApi([group.id])
- await getAccountGroup()
- toast.success(t('messages.deleteSuccess' as any))
- } catch (error) {
- toast.error(t('messages.sortFailed' as any))
- } finally {
+ catch (error) {
+ toast.error(t('messages.sortFailed'))
+ }
+ finally {
setDeleteLoading(null)
}
- }, [getAccountGroup, t])
+ }, [accountActive, getAccountList, setAccountActive, t])
// 处理空间排序
const handleGroupSort = useCallback(async (groupId: string, direction: 'up' | 'down') => {
@@ -135,21 +122,24 @@ const AccountsTopNav = memo<IAccountsTopNavProps>(
await apiUpdateAccountGroupSortRank({ list: updateList })
await getAccountGroup()
- toast.success(t('messages.sortSuccess' as any))
- } catch (error) {
- toast.error(t('messages.sortFailed' as any))
- } finally {
+ toast.success(t('messages.sortSuccess'))
+ }
+ catch (error) {
+ toast.error(t('messages.sortFailed'))
+ }
+ finally {
setSortLoading(null)
}
}, [accountGroupList, getAccountGroup, t])
// 切换空间折叠状态
const toggleSpaceCollapse = useCallback((spaceId: string) => {
- setCollapsedSpaces(prev => {
+ setCollapsedSpaces((prev) => {
const newSet = new Set(prev)
if (newSet.has(spaceId)) {
newSet.delete(spaceId)
- } else {
+ }
+ else {
newSet.add(spaceId)
}
return newSet
@@ -206,7 +196,6 @@ const AccountsTopNav = memo<IAccountsTopNavProps>(
onAccountDelete={handleAccountDelete}
onToggleSpaceCollapse={toggleSpaceCollapse}
onGroupSort={handleGroupSort}
- onGroupDelete={handleGroupDelete}
searchText={accountSearchText}
onSearchChange={setAccountSearchText}
/>
diff --git a/project/web/src/app/[lng]/accounts/components/AddAccountModal/index.tsx b/project/web/src/app/[lng]/accounts/components/AddAccountModal/index.tsx
index ce1a9774..4f402f93 100644
--- a/project/web/src/app/[lng]/accounts/components/AddAccountModal/index.tsx
+++ b/project/web/src/app/[lng]/accounts/components/AddAccountModal/index.tsx
@@ -256,7 +256,7 @@ const AddAccountModal = memo(
// 检查是否有账号
const account = platformAccounts[platform]
if (!account) {
- toast.warning(t('addAccountModal.platformNotLoggedIn' as any, { platform: platformName }))
+ toast.warning(t('addAccountModal.platformNotLoggedIn', { platform: platformName }))
return
}
@@ -264,17 +264,17 @@ const AddAccountModal = memo(
try {
const result = await syncAccountToDatabase(platform, selectedSpaceId)
if (result) {
- toast.success(t('addAccountModal.syncSuccess' as any))
+ toast.success(t('addAccountModal.syncSuccess'))
onAddSuccess(result)
onClose()
}
else {
- toast.error(t('addAccountModal.syncFailed' as any))
+ toast.error(t('addAccountModal.syncFailed'))
}
}
catch (error) {
console.error('同步账号失败:', error)
- toast.error(t('addAccountModal.syncFailed' as any))
+ toast.error(t('addAccountModal.syncFailed'))
}
finally {
setSyncLoadingPlatform(null)
@@ -314,9 +314,9 @@ const AddAccountModal = memo(
// 快手授权前先显示提示
// 在 onOk 回调中直接执行授权,确保 window.open 在用户交互上下文中
await confirm({
- title: t('addAccountModal.kwaiAuthWarning.title' as any),
- content: t('addAccountModal.kwaiAuthWarning.content' as any),
- okText: t('addAccountModal.kwaiAuthWarning.okText' as any),
+ title: t('addAccountModal.kwaiAuthWarning.title'),
+ content: t('addAccountModal.kwaiAuthWarning.content'),
+ okText: t('addAccountModal.kwaiAuthWarning.okText'),
cancelText: undefined, // 不显示取消按钮
onOk: () => {
// 在用户点击"我知道了"时立即执行授权,确保 window.open 在用户交互上下文中
@@ -435,7 +435,7 @@ const AddAccountModal = memo(
{/* 平台网格 - 响应式优化 */}
<div
className="
- w-full grid gap-2 sm:gap-3 mb-3 sm:mb-4
+ w-full p-3 grid gap-2 sm:gap-3 mb-3 sm:mb-4
overflow-y-auto overflow-x-hidden
max-h-[60vh] sm:max-h-[450px]
grid-cols-3
@@ -449,8 +449,8 @@ const AddAccountModal = memo(
scrollbarColor: '#cbd5e1 #f1f5f9'
}}
>
- <TooltipProvider>
- {AccountPlatInfoArr.map(([key, value]) => {
+ <TooltipProvider>
+ {AccountPlatInfoArr.map(([key, value]) => {
const isAvailable = isPlatformAvailable(key as PlatType)
const isLoading = syncLoadingPlatform === key
return (
@@ -518,8 +518,8 @@ const AddAccountModal = memo(
</TooltipContent>
</Tooltip>
)
- })}
- </TooltipProvider>
+ })}
+ </TooltipProvider>
</div>
{/* 属地限制提示 */}
diff --git a/project/web/src/app/[lng]/accounts/components/CalendarTiming/ListMode/SentList.tsx b/project/web/src/app/[lng]/accounts/components/CalendarTiming/ListMode/SentList.tsx
index cd4cbbef..96d34652 100644
--- a/project/web/src/app/[lng]/accounts/components/CalendarTiming/ListMode/SentList.tsx
+++ b/project/web/src/app/[lng]/accounts/components/CalendarTiming/ListMode/SentList.tsx
@@ -72,7 +72,9 @@ const SentList: React.FC<SentListProps> = ({ platform, uid, onDataChange, accoun
const responseData = (response as any)?.data || response
// Handle response data, directly use responseData as an array
- const postsData = Array.isArray(responseData) ? responseData : (responseData?.posts || responseData?.list || [])
+ const postsData = Array.isArray(responseData)
+ ? responseData
+ : (responseData?.posts || responseData?.data?.posts || responseData?.list || [])
if (append) {
setPosts(prev => [...prev, ...postsData])
@@ -235,7 +237,7 @@ const SentList: React.FC<SentListProps> = ({ platform, uid, onDataChange, accoun
{/* Bottom information */}
<div className="flex justify-between items-center pt-4 border-t border-border/50">
<div className="text-sm text-muted-foreground">
- {t('listMode.createdDaysAgo' as any, { days: daysAgo })}
+ {t('listMode.createdDaysAgo', { days: daysAgo })}
</div>
<div className="flex items-center gap-2">
<Button
@@ -244,7 +246,7 @@ const SentList: React.FC<SentListProps> = ({ platform, uid, onDataChange, accoun
className="text-sm text-primary px-2 h-auto border border-border/50 rounded bg-background transition-all hover:border-primary hover:bg-accent"
onClick={() => window.open(post.workLink, '_blank')}
>
- {t('listMode.viewPost' as any)}
+ {t('listMode.viewPost')}
{' '}
↗️
</Button>
@@ -316,7 +318,7 @@ const SentList: React.FC<SentListProps> = ({ platform, uid, onDataChange, accoun
: (
<div className="flex flex-col items-center justify-center py-16 text-center text-muted-foreground h-full min-h-[300px]">
<div className="text-4xl mb-4">📮</div>
- <p className="text-sm">{t('listMode.noSentPosts' as any)}</p>
+ <p className="text-sm">{t('listMode.noSentPosts')}</p>
</div>
)}
</div>
diff --git a/project/web/src/app/[lng]/accounts/components/CalendarTiming/ListMode/index.tsx b/project/web/src/app/[lng]/accounts/components/CalendarTiming/ListMode/index.tsx
index 3a894378..e8bc0ebe 100644
--- a/project/web/src/app/[lng]/accounts/components/CalendarTiming/ListMode/index.tsx
+++ b/project/web/src/app/[lng]/accounts/components/CalendarTiming/ListMode/index.tsx
@@ -67,7 +67,7 @@ const ListMode = memo(
<div className="flex justify-between items-center mb-[15px] pb-2.5 border-b border-border">
<div className="flex flex-col gap-1">
<h3 className="m-0 text-lg font-semibold text-foreground">
- {t('listMode.title' as any)}
+ {t('listMode.title')}
</h3>
</div>
</div>
@@ -98,7 +98,7 @@ const ListMode = memo(
: (
<div className="flex flex-col items-center justify-center py-16 text-center text-muted-foreground">
<div className="text-4xl mb-4">📋</div>
- <p className="text-sm">{t('listMode.noRecords' as any)}</p>
+ <p className="text-sm">{t('listMode.noRecords')}</p>
</div>
)}
</DndProvider>
@@ -125,7 +125,7 @@ const ListMode = memo(
<Tabs defaultValue="queue" className="flex-1 flex flex-col min-h-0">
<TabsList className="grid w-full grid-cols-2">
<TabsTrigger value="queue" className="gap-2">
- <span>{t('listMode.queue' as any)}</span>
+ <span>{t('listMode.queue')}</span>
{queueRecords.length > 0 && (
<Badge variant="secondary" className="h-5 min-w-5 px-1.5 text-xs">
{queueRecords.length}
@@ -133,7 +133,7 @@ const ListMode = memo(
)}
</TabsTrigger>
<TabsTrigger value="sent" className="gap-2">
- <span>{t('listMode.sent' as any)}</span>
+ <span>{t('listMode.sent')}</span>
{sentCount > 0 && (
<Badge variant="secondary" className="h-5 min-w-5 px-1.5 text-xs">
{sentCount}
diff --git a/project/web/src/app/[lng]/accounts/components/CalendarTimingItem/components/RecordCore.tsx b/project/web/src/app/[lng]/accounts/components/CalendarTimingItem/components/RecordCore.tsx
index b4e26af2..7c468a22 100644
--- a/project/web/src/app/[lng]/accounts/components/CalendarTimingItem/components/RecordCore.tsx
+++ b/project/web/src/app/[lng]/accounts/components/CalendarTimingItem/components/RecordCore.tsx
@@ -192,10 +192,10 @@ const RecordCore = memo(
const getClientTypeLabel = (clientType?: ClientType) => {
if (!clientType) return null
if (clientType === ClientType.WEB) {
- return t('clientType.web' as any)
+ return t('clientType.web')
}
if (clientType === ClientType.APP) {
- return t('clientType.app' as any)
+ return t('clientType.app')
}
return null
}
diff --git a/project/web/src/app/[lng]/chat/[taskId]/components/ChatHeader/index.tsx b/project/web/src/app/[lng]/chat/[taskId]/components/ChatHeader/index.tsx
index f3327bb1..10fb5a9e 100644
--- a/project/web/src/app/[lng]/chat/[taskId]/components/ChatHeader/index.tsx
+++ b/project/web/src/app/[lng]/chat/[taskId]/components/ChatHeader/index.tsx
@@ -77,9 +77,9 @@ export function ChatHeader({
<button
onClick={() => setRatingOpen(true)}
className="ml-1 text-sm text-muted-foreground hidden sm:inline"
- aria-label={t('task.rate' as any) || 'Rate'}
+ aria-label={t('task.rate') || 'Rate'}
>
- {t('task.rate' as any) || '评分'}
+ {t('task.rate') || '评分'}
</button>
</div>
</div>
diff --git a/project/web/src/app/[lng]/chat/[taskId]/hooks/useChatState.ts b/project/web/src/app/[lng]/chat/[taskId]/hooks/useChatState.ts
index 0ca4421c..94a21532 100644
--- a/project/web/src/app/[lng]/chat/[taskId]/hooks/useChatState.ts
+++ b/project/web/src/app/[lng]/chat/[taskId]/hooks/useChatState.ts
@@ -81,6 +81,56 @@ export function useChatState(options: IChatStateOptions): IChatStateReturn {
const hasLoadedRef = useRef(false)
const rawMessagesRef = useRef<TaskMessage[]>([])
+ // 当 taskId 变化时,重置与任务相关的本地状态,确保不会错误地使用上一次任务的缓存
+ useEffect(() => {
+ // 重置已加载标记,强制重新从 API 拉取数据
+ hasLoadedRef.current = false
+ // 清空上一次的原始消息,避免后续基于旧数据的短路逻辑
+ rawMessagesRef.current = []
+ // 清空本地 task 与消息状态,显示 loading,等待新的加载逻辑触发
+ setTask(null)
+ setLocalMessages([])
+ setIsLoading(true)
+ // 注意:不主动调用 startPolling,这里只做重置,后续 loadTask 会根据新任务情况自行决定是否启动轮询
+ }, [taskId])
+
+ // 当 taskId 变化时,为全局 Agent Store 添加护栏:
+ // - 如果当前 store 的 currentTaskId 与新 taskId 不同且 store 不在生成中,则清理 store 中残留的消息与 currentTaskId,
+ // 避免进入新任务时意外复用上一个任务的消息缓存。
+ // - 在组件卸载时,如果 store 的 currentTaskId 等于当前 taskId 且不在生成中,也清理 currentTaskId 与消息。
+ useEffect(() => {
+ try {
+ const state = useAgentStore.getState()
+ if (state.currentTaskId && state.currentTaskId !== taskId && !state.isGenerating) {
+ // 只清理与消息相关的最小字段,避免重置 refs 或其他全局状态
+ useAgentStore.setState({
+ currentTaskId: '',
+ messages: [],
+ markdownMessages: [],
+ workflowSteps: [],
+ })
+ }
+ } catch (e) {
+ console.warn('[ChatState] Failed to apply store guard on task change', e)
+ }
+
+ return () => {
+ try {
+ const state = useAgentStore.getState()
+ if (state.currentTaskId === taskId && !state.isGenerating) {
+ useAgentStore.setState({
+ currentTaskId: '',
+ messages: [],
+ markdownMessages: [],
+ workflowSteps: [],
+ })
+ }
+ } catch (e) {
+ console.warn('[ChatState] Failed to apply store guard on unmount', e)
+ }
+ }
+ }, [taskId])
+
// 轮询 Hook
const { isPolling, startPolling } = useTaskPolling({
taskId,
diff --git a/project/web/src/app/[lng]/chat/[taskId]/page.tsx b/project/web/src/app/[lng]/chat/[taskId]/page.tsx
index 23f94972..7c4befeb 100644
--- a/project/web/src/app/[lng]/chat/[taskId]/page.tsx
+++ b/project/web/src/app/[lng]/chat/[taskId]/page.tsx
@@ -5,7 +5,7 @@
*/
'use client'
-import { useState, useCallback, useEffect } from 'react'
+import { useState, useCallback, useEffect, useRef } from 'react'
import { useParams, useRouter } from 'next/navigation'
import { ChatInput } from '@/components/Chat/ChatInput'
import { useAgentStore } from '@/store/agent'
@@ -27,6 +27,7 @@ export default function ChatDetailPage() {
const params = useParams()
const taskId = params.taskId as string
const lng = params.lng as string
+ const isInitialRender = useRef(false);
// Store 方法
const { createTask, continueTask, stopTask, setActionContext, handleSSEMessage, consumePendingTask } = useAgentStore()
@@ -69,9 +70,17 @@ export default function ChatDetailPage() {
handleMediaRemove,
clearMedias,
} = useMediaUpload({
- onError: () => toast.error(t('media.uploadFailed' as any)),
+ onError: () => toast.error(t('media.uploadFailed')),
})
+ useEffect(() => {
+ if (isInitialRender.current || displayMessages.length === 0) return
+ isInitialRender.current = true
+ setTimeout(() => {
+ scrollToBottom()
+ }, 10)
+ }, [displayMessages, isInitialRender])
+
/**
* 设置 Action 上下文(用于处理任务结果的 action)
*/
@@ -79,7 +88,7 @@ export default function ChatDetailPage() {
setActionContext({
router,
lng,
- t: tHome as any,
+ t: tHome,
})
}, [router, lng, tHome, setActionContext])
@@ -112,7 +121,7 @@ export default function ChatDetailPage() {
})
} catch (error: any) {
console.error('[ChatPage] Create task failed:', error)
- toast.error(error.message || t('message.error' as any))
+ toast.error(error.message || t('message.error'))
// 出错时返回首页
router.replace(`/${lng}`)
}
@@ -156,7 +165,7 @@ export default function ChatDetailPage() {
})
} catch (error: any) {
console.error('Continue task failed:', error)
- toast.error(error.message || t('message.error' as any))
+ toast.error(error.message || t('message.error'))
// 恢复输入
setInputValue(currentPrompt)
setMedias(currentMedias)
@@ -235,10 +244,10 @@ export default function ChatDetailPage() {
{/* 顶部导航 */}
<ChatHeader
title={task?.title}
- defaultTitle={t('task.newChat' as any)}
+ defaultTitle={t('task.newChat')}
isGenerating={isGenerating}
progress={progress}
- thinkingText={t('message.thinking' as any)}
+ thinkingText={t('message.thinking')}
taskId={taskId}
rating={task?.rating ?? null}
onBack={handleBack}
@@ -269,7 +278,7 @@ export default function ChatDetailPage() {
onMediaRemove={handleMediaRemove}
isGenerating={isGenerating}
isUploading={isUploading}
- placeholder={t('detail.continuePlaceholder' as any)}
+ placeholder={t('detail.continuePlaceholder')}
mode="compact"
/>
</div>
diff --git a/project/web/src/app/[lng]/pricing/components/PricingContent/index.tsx b/project/web/src/app/[lng]/pricing/components/PricingContent/index.tsx
index 92120ba6..ea3f1c91 100644
--- a/project/web/src/app/[lng]/pricing/components/PricingContent/index.tsx
+++ b/project/web/src/app/[lng]/pricing/components/PricingContent/index.tsx
@@ -19,9 +19,6 @@ import { createPaymentOrderApi, PaymentType } from '@/api/vip'
import { useSettingsModalStore } from '@/components/SettingsModal/store'
import { openLoginModal } from '@/store/loginModal'
-/** 企业版联系邮箱 */
-const ENTERPRISE_EMAIL = '[email protected]'
-
interface PricingContentProps {
lng: string
}
@@ -132,7 +129,7 @@ export const PricingContent = memo(({ lng }: PricingContentProps) => {
// 企业版直接发送邮件
if (planId === 'enterprise') {
- window.open(`mailto:${ENTERPRISE_EMAIL}?subject=Enterprise Plan Inquiry`, '_blank')
+ window.open(`mailto:[email protected]?subject=Enterprise Plan Inquiry`, '_blank')
return
}
@@ -419,7 +416,7 @@ const PricingCard = memo(({
</Button>
</TooltipTrigger>
<TooltipContent>
- <p>{ENTERPRISE_EMAIL}</p>
</TooltipContent>
</Tooltip>
</TooltipProvider>
diff --git a/project/web/src/app/[lng]/tasks-history/page.tsx b/project/web/src/app/[lng]/tasks-history/page.tsx
index 34e21caf..b3af9286 100644
--- a/project/web/src/app/[lng]/tasks-history/page.tsx
+++ b/project/web/src/app/[lng]/tasks-history/page.tsx
@@ -8,6 +8,7 @@ import { useEffect, useState, useCallback } from 'react'
import { useParams, useRouter } from 'next/navigation'
import { ArrowLeft, History, RefreshCw, Star } from 'lucide-react'
import { TaskCard, TaskCardSkeleton } from '@/components/Chat'
+import TaskHistoryList from '@/components/Chat/TaskHistoryList'
import RatingModal from '@/components/Chat/Rating'
import { Button } from '@/components/ui/button'
import { Pagination } from '@/components/ui/pagination'
@@ -47,7 +48,7 @@ export default function TasksHistoryPage() {
}
} catch (error) {
console.error('Load task list failed:', error)
- toast.error(t('message.error' as any))
+ toast.error(t('message.error'))
} finally {
setIsLoading(false)
}
@@ -76,14 +77,14 @@ export default function TasksHistoryPage() {
try {
const result = await agentApi.deleteTask(id)
if (result && result.code === 0) {
- toast.success(t('task.deleteSuccess' as any))
+ toast.success(t('task.deleteSuccess'))
// 删除成功后,重新加载当前页,避免页码错乱
loadTasks(page)
} else {
- toast.error(result?.message || t('task.deleteFailed' as any))
+ toast.error(result?.message || t('task.deleteFailed'))
}
} catch (error) {
- toast.error(t('task.deleteFailed' as any))
+ toast.error(t('task.deleteFailed'))
}
}
@@ -108,7 +109,7 @@ export default function TasksHistoryPage() {
<div className="flex items-center gap-2">
<History className="w-5 h-5 text-primary" />
<h1 className="text-lg font-semibold text-foreground">
- {t('history.title' as any)}
+ {t('history.title')}
</h1>
</div>
{total > 0 && (
@@ -140,29 +141,22 @@ export default function TasksHistoryPage() {
// 空状态
<div className="flex flex-col items-center justify-center py-16">
<History className="w-16 h-16 text-muted-foreground/30 mb-4" />
- <p className="text-muted-foreground mb-4">{t('history.empty' as any)}</p>
+ <p className="text-muted-foreground mb-4">{t('history.empty')}</p>
<Button onClick={handleBack}>
- {t('home.startChat' as any)}
+ {t('home.startChat')}
</Button>
</div>
) : (
// 任务卡片网格 + 分页器
<>
- <div className="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4">
- {tasks.map((task) => (
- <TaskCard
- key={task.id}
- id={task.id}
- title={task.title || t('task.newChat' as any)}
- status={task.status}
- createdAt={task.createdAt}
- updatedAt={task.updatedAt}
- onDelete={handleDelete}
- rating={task.rating ?? null}
- ratingComment={task.ratingComment ?? null}
- onRateClick={(taskId) => setRatingModalFor(taskId)}
- />
- ))}
+ <div>
+ <TaskHistoryList
+ tasks={tasks}
+ isLoading={isLoading}
+ onDelete={handleDelete}
+ onRateClick={(taskId) => setRatingModalFor(taskId)}
+ linkBasePath={`/${lng}/chat`}
+ />
</div>
<RatingModal
taskId={ratingModalFor ?? ''}
@@ -171,7 +165,7 @@ export default function TasksHistoryPage() {
onSaved={(data) => {
setTasks((prev) => prev.map((t) => (t.id === ratingModalFor ? { ...t, rating: data.rating ?? t.rating, ratingComment: data.comment ?? t.ratingComment } : t)))
setRatingModalFor(null)
- toast.success(t('rating.saveSuccess' as any) || 'Saved')
+ toast.success(t('rating.saveSuccess') || 'Saved')
}}
/>
diff --git a/project/web/src/app/i18n/client.ts b/project/web/src/app/i18n/client.ts
index 8455cc51..5c5dd509 100644
--- a/project/web/src/app/i18n/client.ts
+++ b/project/web/src/app/i18n/client.ts
@@ -6,10 +6,7 @@ import i18next from 'i18next'
import LanguageDetector from 'i18next-browser-languagedetector'
import resourcesToBackend from 'i18next-resources-to-backend'
import { useEffect, useState } from 'react'
-import {
- initReactI18next,
- useTranslation,
-} from 'react-i18next'
+import { initReactI18next, useTranslation, type UseTranslationResponse, type UseTranslationOptions } from 'react-i18next'
import { useGetClientLng } from '@/hooks/useSystem'
import { cookieName, getOptions, languages } from './settings'
@@ -36,8 +33,10 @@ i18next
preload: runsOnServerSide ? languages : [],
})
-// eslint-disable-next-line @typescript-eslint/no-explicit-any
-export function useTransClient(ns?: any, options?: any): any {
+export function useTransClient<Ns extends string | undefined = undefined>(
+ ns?: Ns | Ns[],
+ options?: UseTranslationOptions<FlatNamespace>,
+): UseTranslationResponse<string, FlatNamespace> {
const i18nextCookie = getCookie(cookieName)
const lng = useGetClientLng()
if (typeof lng !== 'string')
@@ -81,7 +80,8 @@ export function useTransClient(ns?: any, options?: any): any {
setCookie(cookieName, lng, { path: '/' })
}, [lng, i18nextCookie])
}
- return useTranslation(ns, options)
+ // 强制类型断言以匹配 react-i18next 的签名
+ return useTranslation(ns as Ns | Ns[] | undefined, options) as UseTranslationResponse<string, FlatNamespace>
}
export default i18next
diff --git a/project/web/src/app/i18n/locales/en/account.json b/project/web/src/app/i18n/locales/en/account.json
index 5fd9fd36..6e8011c0 100644
--- a/project/web/src/app/i18n/locales/en/account.json
+++ b/project/web/src/app/i18n/locales/en/account.json
@@ -282,5 +282,23 @@
"label": "Source",
"web": "Web",
"app": "App"
+ },
+ "channelManager": {
+ "myChannels": "My Channels",
+ "title": "Channel Manager",
+ "description": "Manage your channels and space groups",
+ "tabs": {
+ "channels": "Channels",
+ "spaces": "Spaces"
+ },
+ "searchPlaceholder": "Search channels or spaces...",
+ "createSpace": "Create Space",
+ "createSpaceNamePlaceholder": "Enter space name",
+ "createSpaceSuccess": "Space created successfully",
+ "createSpaceFailed": "Failed to create space",
+ "deleteSpaceConfirm": "Confirm Delete Space",
+ "deleteSpaceSuccess": "Space deleted successfully",
+ "deleteSpaceFailed": "Failed to delete space",
+ "noData": "No data available"
}
}
diff --git a/project/web/src/app/i18n/locales/en/chat.json b/project/web/src/app/i18n/locales/en/chat.json
index 97981ad9..a5953136 100644
--- a/project/web/src/app/i18n/locales/en/chat.json
+++ b/project/web/src/app/i18n/locales/en/chat.json
@@ -62,7 +62,8 @@
"noRating": "Not rated",
"commentLabel": "Review (optional)",
"commentPlaceholder": "Write your review...",
- "commentRequiredIfLow": "A reason is required for ratings below 3"
+ "commentRequiredIfLow": "A reason is required for ratings below 3",
+ "loading": "Loading..."
},
"detail": {
"title": "Chat Details",
diff --git a/project/web/src/app/i18n/locales/en/common.json b/project/web/src/app/i18n/locales/en/common.json
index 93d5388e..20a096e2 100644
--- a/project/web/src/app/i18n/locales/en/common.json
+++ b/project/web/src/app/i18n/locales/en/common.json
@@ -87,6 +87,10 @@
"downloadNow": "Download Now",
"tip": "💡 Tip: After installation, please log in to your account in the App, then try the related operation again"
},
+ "networkBusy": "Network busy, please try again later!",
+ "networkError": "Network error, please try again later!",
+ "contact": "Need help? Contact support:"
+,
"websit": {
"termsOfService": {
"title": "Terms of Service",
diff --git a/project/web/src/app/i18n/locales/zh-CN/account.json b/project/web/src/app/i18n/locales/zh-CN/account.json
index e035fe57..5bc8c68d 100644
--- a/project/web/src/app/i18n/locales/zh-CN/account.json
+++ b/project/web/src/app/i18n/locales/zh-CN/account.json
@@ -283,5 +283,23 @@
"web": "网页端",
"app": "App端"
},
- "rightClickTip": "右键点击空间或频道可进行删除、排序等操作"
+ "rightClickTip": "右键点击空间或频道可进行删除、排序等操作",
+ "channelManager": {
+ "myChannels": "我的频道",
+ "title": "频道管理",
+ "description": "管理您的频道和空间分组",
+ "tabs": {
+ "channels": "频道",
+ "spaces": "空间"
+ },
+ "searchPlaceholder": "搜索频道或空间...",
+ "createSpace": "新建空间",
+ "createSpaceNamePlaceholder": "输入空间名称",
+ "createSpaceSuccess": "创建空间成功",
+ "createSpaceFailed": "创建空间失败",
+ "deleteSpaceConfirm": "确认删除空间",
+ "deleteSpaceSuccess": "删除空间成功",
+ "deleteSpaceFailed": "删除空间失败",
+ "noData": "暂无数据"
+ }
}
diff --git a/project/web/src/app/i18n/locales/zh-CN/chat.json b/project/web/src/app/i18n/locales/zh-CN/chat.json
index b86d74f6..b4045d64 100644
--- a/project/web/src/app/i18n/locales/zh-CN/chat.json
+++ b/project/web/src/app/i18n/locales/zh-CN/chat.json
@@ -62,7 +62,8 @@
"noRating": "未评分",
"commentLabel": "评价(可选)",
"commentPlaceholder": "填写评价...",
- "commentRequiredIfLow": "低于 3 分需要填写理由"
+ "commentRequiredIfLow": "低于 3 分需要填写理由",
+ "loading": "加载中..."
},
"detail": {
"title": "对话详情",
diff --git a/project/web/src/app/layout/LayoutSidebar/components/BottomSection/MyChannelsEntry.tsx b/project/web/src/app/layout/LayoutSidebar/components/BottomSection/MyChannelsEntry.tsx
new file mode 100644
index 00000000..a87e4f8f
--- /dev/null
+++ b/project/web/src/app/layout/LayoutSidebar/components/BottomSection/MyChannelsEntry.tsx
@@ -0,0 +1,58 @@
+/**
+ * MyChannelsEntry - 我的频道入口组件
+ */
+
+'use client'
+
+import type { SidebarCommonProps } from '../../types'
+import { Tv } from 'lucide-react'
+import { useState } from 'react'
+import { useTransClient } from '@/app/i18n/client'
+import ChannelManager from '@/components/ChannelManager'
+import {
+ Tooltip,
+ TooltipContent,
+ TooltipProvider,
+ TooltipTrigger,
+} from '@/components/ui/tooltip'
+import { cn } from '@/lib/utils'
+
+export function MyChannelsEntry({ collapsed }: SidebarCommonProps) {
+ const { t } = useTransClient('account')
+ const [isOpen, setIsOpen] = useState(false)
+
+ const handleClick = () => {
+ setIsOpen(true)
+ }
+
+ return (
+ <>
+ <TooltipProvider>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <button
+ type="button"
+ onClick={handleClick}
+ className={cn(
+ 'flex flex-1 items-center rounded-lg text-muted-foreground transition-colors hover:bg-accent hover:text-foreground cursor-pointer',
+ collapsed ? 'h-9 w-9 justify-center' : 'justify-between px-3 py-2',
+ )}
+ >
+ <div className="flex items-center gap-2">
+ <Tv size={18} className="text-primary" />
+ {!collapsed && <span className="text-sm">{t('channelManager.myChannels', '我的频道')}</span>}
+ </div>
+ </button>
+ </TooltipTrigger>
+ {collapsed && (
+ <TooltipContent side="right">
+ <p>{t('channelManager.myChannels', '我的频道')}</p>
+ </TooltipContent>
+ )}
+ </Tooltip>
+ </TooltipProvider>
+
+ <ChannelManager open={isOpen} onOpenChange={setIsOpen} />
+ </>
+ )
+}
diff --git a/project/web/src/app/layout/LayoutSidebar/components/IconBar.tsx b/project/web/src/app/layout/LayoutSidebar/components/IconBar.tsx
index 3e6d28c8..2d6a58f8 100644
--- a/project/web/src/app/layout/LayoutSidebar/components/IconBar.tsx
+++ b/project/web/src/app/layout/LayoutSidebar/components/IconBar.tsx
@@ -17,6 +17,7 @@ import {
import { cn } from '@/lib/utils'
import DownloadAppModal from '@/components/common/DownloadAppModal'
import type { IconBarProps } from '../types'
+import { CONTACT } from '@/constant'
export function IconBar({ collapsed, isLoggedIn, unreadCount, onOpenNotification, onOpenSettings }: IconBarProps) {
const { t } = useTransClient('common')
@@ -54,7 +55,7 @@ export function IconBar({ collapsed, isLoggedIn, unreadCount, onOpenNotification
<Tooltip>
<TooltipTrigger asChild>
<a
- href="mailto:[email protected]"
+ href={`mailto:${CONTACT}`}
className="flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground/70 transition-colors hover:bg-accent hover:text-muted-foreground"
>
<Mail size={18} />
@@ -64,7 +65,7 @@ export function IconBar({ collapsed, isLoggedIn, unreadCount, onOpenNotification
side={collapsed ? 'right' : 'top'}
className="bg-popover text-popover-foreground"
>
- <p>{t('contactUs')}: [email protected]</p>
+ <p>{t('contactUs')}: {CONTACT}</p>
</TooltipContent>
</Tooltip>
</TooltipProvider>
diff --git a/project/web/src/app/layout/LayoutSidebar/index.tsx b/project/web/src/app/layout/LayoutSidebar/index.tsx
index 46cf39cf..93418866 100644
--- a/project/web/src/app/layout/LayoutSidebar/index.tsx
+++ b/project/web/src/app/layout/LayoutSidebar/index.tsx
@@ -5,27 +5,29 @@
*/
'use client'
-import { useState, useEffect } from 'react'
-import { useRouter, useSelectedLayoutSegments } from 'next/navigation'
+import type { SettingsTab } from '@/components/SettingsModal'
import { BookOpen } from 'lucide-react'
+import { useRouter, useSelectedLayoutSegments } from 'next/navigation'
+import { useEffect, useState } from 'react'
+import AddAccountModal from '@/app/[lng]/accounts/components/AddAccountModal'
+import { routerData } from '@/app/layout/routerData'
+import NotificationPanel from '@/components/notification/NotificationPanel'
+import SettingsModal from '@/components/SettingsModal'
+import { useSettingsModalStore } from '@/components/SettingsModal/store'
import { useNotification } from '@/hooks/useNotification'
-import { cn } from '@/lib/utils'
-import { useUserStore } from '@/store/user'
import { toast } from '@/lib/toast'
+import { cn } from '@/lib/utils'
import { openLoginModal } from '@/store/loginModal'
-import NotificationPanel from '@/components/notification/NotificationPanel'
-import SettingsModal, { type SettingsTab } from '@/components/SettingsModal'
-import AddAccountModal from '@/app/[lng]/accounts/components/AddAccountModal'
-import { routerData } from '@/app/layout/routerData'
+import { useUserStore } from '@/store/user'
import {
- LogoSection,
- NavSection,
BottomSection,
IconBar,
+ LogoSection,
+ NavSection,
UserSection,
} from './components'
import { AffiliatesEntry } from './components/BottomSection/AffiliatesEntry'
-import { useSettingsModalStore } from '@/components/SettingsModal/store'
+import { MyChannelsEntry } from './components/BottomSection/MyChannelsEntry'
// GitHub 配置
const GITHUB_REPO = 'yikart/AiToEarn'
@@ -40,7 +42,7 @@ function ExternalLinks({ collapsed }: { collapsed: boolean }) {
useEffect(() => {
fetch(`https://api.github.com/repos/${GITHUB_REPO}`)
.then(res => res.json())
- .then(data => {
+ .then((data) => {
if (data.stargazers_count) {
const count = data.stargazers_count
setStarCount(count >= 1000 ? `${(count / 1000).toFixed(1)}k` : count.toString())
@@ -69,7 +71,7 @@ function ExternalLinks({ collapsed }: { collapsed: boolean }) {
title={`GitHub Stars: ${starCount}`}
>
<svg className="w-3.5 h-3.5" viewBox="0 0 24 24" fill="currentColor">
- <path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
+ <path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z" />
</svg>
</a>
</div>
@@ -95,7 +97,7 @@ function ExternalLinks({ collapsed }: { collapsed: boolean }) {
>
<span className="inline-flex items-center gap-1.5 px-2.5 py-1.5 text-[11px] font-medium text-muted-foreground/80 hover:bg-accent hover:text-foreground transition-colors">
<svg className="w-3 h-3" viewBox="0 0 24 24" fill="currentColor">
- <path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
+ <path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z" />
</svg>
Star
</span>
@@ -110,7 +112,7 @@ function ExternalLinks({ collapsed }: { collapsed: boolean }) {
/**
* 侧边栏主组件
*/
-const LayoutSidebar = () => {
+function LayoutSidebar() {
const router = useRouter()
const token = useUserStore(state => state.token)
const route = useSelectedLayoutSegments()
@@ -201,6 +203,11 @@ const LayoutSidebar = () => {
{/* 底部固定区域 - 不随滚动 */}
<div className="flex-shrink-0">
+ {/* 我的频道入口 */}
+ {/* <div className="pb-1 flex flex-1">
+ <MyChannelsEntry collapsed={collapsed} />
+ </div> */}
+
{/* 推广赚钱入口 - 在底部功能区横线上方 */}
<div className="pb-1">
<AffiliatesEntry collapsed={collapsed} />
@@ -256,6 +263,7 @@ const LayoutSidebar = () => {
}}
showSpaceSelector={true}
/>
+
</>
)
}
diff --git a/project/web/src/app/layout/MobileNav/index.tsx b/project/web/src/app/layout/MobileNav/index.tsx
index 24b71c5d..cc6ccd13 100644
--- a/project/web/src/app/layout/MobileNav/index.tsx
+++ b/project/web/src/app/layout/MobileNav/index.tsx
@@ -47,6 +47,7 @@ import { PluginStatus } from '@/store/plugin/types/baseTypes'
import { openLoginModal } from '@/store/loginModal'
import { centsToUsd } from '@/api/credits'
import { getOssUrl } from '@/utils/oss'
+import { CONTACT } from '@/constant'
// GitHub 配置
const GITHUB_REPO = 'yikart/AiToEarn'
@@ -353,9 +354,9 @@ function MobileBottomSection({
<div className="flex items-center justify-center gap-4 border-t border-border py-3 mt-2">
{/* 邮箱 - 联系我们 */}
<a
- href="mailto:[email protected]"
+ href={`mailto:${CONTACT}`}
className="flex h-10 w-10 items-center justify-center rounded-lg text-muted-foreground hover:bg-muted transition-colors"
- title={`${t('contactUs')}: [email protected]`}
+ title={`${t('contactUs')}: ${CONTACT}`}
>
<Mail size={20} />
</a>
diff --git a/project/web/src/app/layout/Providers.tsx b/project/web/src/app/layout/Providers.tsx
index bd90ec4a..7efbec87 100644
--- a/project/web/src/app/layout/Providers.tsx
+++ b/project/web/src/app/layout/Providers.tsx
@@ -15,6 +15,7 @@ import zh_CN from "antd/es/locale/zh_CN";
import { Suspense, useEffect } from "react";
import { Toaster } from "@/components/ui/sonner";
import { GlobalLoginModal } from "@/components/common/GlobalLoginModal";
+import NotificationCenter from "@/components/ui/NotificationCenter";
import { useDataStatisticsStore } from "@/app/[lng]/dataStatistics/useDataStatistics";
import useCssVariables from "@/app/hooks/useCssVariables";
import { fallbackLng } from "@/app/i18n/settings";
@@ -84,6 +85,8 @@ export function Providers({
<Suspense>
<AntdRegistry>
<Toaster position="top-center" richColors />
+ {/* 专用右上角通知中心(不影响现有 toast) */}
+ <NotificationCenter />
<GlobalLoginModal />
{children}
</AntdRegistry>
diff --git a/project/web/src/components/ChannelManager/channelStore.ts b/project/web/src/components/ChannelManager/channelStore.ts
new file mode 100644
index 00000000..3a0c9713
--- /dev/null
+++ b/project/web/src/components/ChannelManager/channelStore.ts
@@ -0,0 +1,28 @@
+/**
+ * ChannelManager - 频道管理器局部状态管理
+ * 只管理弹窗显示隐藏状态,所有数据使用全局account store
+ */
+
+import { create } from 'zustand'
+import { combine } from 'zustand/middleware'
+
+export interface ChannelManagerState {
+ open: boolean
+ _hasHydrated: boolean
+}
+
+const initialState: ChannelManagerState = {
+ open: false,
+ _hasHydrated: true,
+}
+
+export const useChannelManagerStore = create(
+ combine(initialState, (set, get) => {
+ return {
+ // 设置弹窗开关
+ setOpen: (open: boolean) => {
+ set({ open })
+ },
+ }
+ }),
+)
diff --git a/project/web/src/components/ChannelManager/components/UnifiedChannelSpaceList.tsx b/project/web/src/components/ChannelManager/components/UnifiedChannelSpaceList.tsx
new file mode 100644
index 00000000..12d9f968
--- /dev/null
+++ b/project/web/src/components/ChannelManager/components/UnifiedChannelSpaceList.tsx
@@ -0,0 +1,497 @@
+/**
+ * UnifiedChannelSpaceList - 统一的空间和频道管理列表
+ *
+ * 功能:
+ * - 空间列表(支持添加、编辑、删除、排序)
+ * - 每个空间下显示频道(支持删除)
+ * - 完全使用全局account store数据
+ */
+
+'use client'
+
+import {
+ ChevronDown,
+ ChevronRight,
+ ChevronUp,
+ Edit,
+ Folder,
+ MoreVertical,
+ Plus,
+ Trash2,
+} from 'lucide-react'
+import { useCallback, useRef, useState } from 'react'
+import { useShallow } from 'zustand/react/shallow'
+import { Loader2 } from 'lucide-react'
+import Image from 'next/image'
+import { createAccountGroupApi, deleteAccountGroupApi, updateAccountGroupApi } from '@/api/account'
+import { AccountPlatInfoMap } from '@/app/config/platConfig'
+import { useTransClient } from '@/app/i18n/client'
+import { getOssUrl } from '@/utils/oss'
+import {
+ AlertDialog,
+ AlertDialogAction,
+ AlertDialogCancel,
+ AlertDialogContent,
+ AlertDialogDescription,
+ AlertDialogFooter,
+ AlertDialogHeader,
+ AlertDialogTitle,
+} from '@/components/ui/alert-dialog'
+import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'
+import { Skeleton } from '@/components/ui/skeleton'
+import { Button } from '@/components/ui/button'
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuSeparator,
+ DropdownMenuTrigger,
+} from '@/components/ui/dropdown-menu'
+import { Input } from '@/components/ui/input'
+import { ScrollArea } from '@/components/ui/scroll-area'
+import { toast } from '@/lib/toast'
+import { useAccountStore } from '@/store/account'
+
+// 模拟频道数据类型(后续需要从API获取)
+interface Channel {
+ id: string
+ name: string
+ platform: string
+ accountId: string
+ avatar?: string
+ fansCount?: number
+}
+
+export function UnifiedChannelSpaceList() {
+ const { t } = useTransClient('account')
+ const {
+ accountGroupList,
+ accountList,
+ accountLoading,
+ getAccountGroup,
+ } = useAccountStore(
+ useShallow(state => ({
+ accountGroupList: state.accountGroupList,
+ accountList: state.accountList,
+ accountLoading: state.accountLoading,
+ getAccountGroup: state.getAccountGroup,
+ })),
+ )
+
+ // UI状态
+ const [editingSpace, setEditingSpace] = useState<string | null>(null)
+ const [editSpaceName, setEditSpaceName] = useState('')
+ const [showCreateSpace, setShowCreateSpace] = useState(false)
+ const [creatingSpace, setCreatingSpace] = useState(false)
+ const [editingSpaceLoading, setEditingSpaceLoading] = useState(false)
+ const [newSpaceName, setNewSpaceName] = useState('')
+
+ // 删除确认对话框
+ const [deleteDialog, setDeleteDialog] = useState<{
+ open: boolean
+ type: 'space' | 'channel'
+ id: string
+ name: string
+ }>({
+ open: false,
+ type: 'space',
+ id: '',
+ name: '',
+ })
+
+
+ // 开始编辑空间
+ const startEditingSpace = useCallback((spaceId: string, currentName: string) => {
+ setEditingSpace(spaceId)
+ setEditSpaceName(currentName)
+ }, [])
+
+ // 保存空间编辑
+ const saveSpaceEdit = useCallback(async () => {
+ if (!editingSpace || !editSpaceName.trim())
+ return
+
+ setEditingSpaceLoading(true)
+ try {
+ await updateAccountGroupApi({
+ id: editingSpace,
+ name: editSpaceName.trim(),
+ })
+ await getAccountGroup()
+ toast.success(t('channelManager.editSpaceSuccess', '空间编辑成功'))
+ setEditingSpace(null)
+ setEditSpaceName('')
+ }
+ catch (error) {
+ toast.error(t('channelManager.editSpaceFailed', '空间编辑失败'))
+ }
+ finally {
+ setEditingSpaceLoading(false)
+ }
+ }, [editingSpace, editSpaceName, getAccountGroup, t])
+
+ // 取消编辑
+ const cancelSpaceEdit = useCallback(() => {
+ setEditingSpace(null)
+ setEditSpaceName('')
+ }, [])
+
+ // 添加新空间
+ const addNewSpace = useCallback(async () => {
+ if (!newSpaceName.trim())
+ return
+
+ setCreatingSpace(true)
+ try {
+ await createAccountGroupApi({ name: newSpaceName.trim() })
+ await getAccountGroup()
+ toast.success(t('channelManager.createSpaceSuccess', '创建空间成功'))
+ setNewSpaceName('')
+ setCreatingSpace(false)
+ setShowCreateSpace(false)
+ }
+ catch (error) {
+ toast.error(t('channelManager.createSpaceFailed', '创建空间失败'))
+ setCreatingSpace(false)
+ // 注意:这里不重置showCreateSpace,让用户可以重试
+ }
+ }, [newSpaceName, getAccountGroup, t])
+
+ // 删除空间或频道
+ const confirmDelete = useCallback(async () => {
+ try {
+ if (deleteDialog.type === 'space') {
+ await deleteAccountGroupApi([deleteDialog.id])
+ toast.success(t('channelManager.deleteSpaceSuccess', '删除空间成功'))
+ }
+ else {
+ // TODO: 实现删除频道API
+ toast.success(t('channelManager.deleteChannelSuccess', '删除频道成功'))
+ }
+ await getAccountGroup()
+ }
+ catch (error) {
+ const errorType = deleteDialog.type === 'space' ? '空间' : '频道'
+ toast.error(`删除${errorType}失败`)
+ }
+
+ setDeleteDialog({ open: false, type: 'space', id: '', name: '' })
+ }, [deleteDialog, getAccountGroup, t])
+
+ // 获取空间下的频道
+ const getChannelsInSpace = useCallback((spaceId: string): Channel[] => {
+ // TODO: 从API获取真实频道数据
+ // 暂时返回模拟数据
+ return accountList
+ .filter(account => account.groupId === spaceId)
+ .map(account => ({
+ id: account.id,
+ name: account.nickname || account.account,
+ platform: account.type || 'unknown',
+ accountId: account.account,
+ avatar: account.avatar,
+ fansCount: account.fansCount,
+ }))
+ }, [accountList])
+
+ if (accountLoading) {
+ return (
+ <div className="space-y-4">
+ {/* 骨架屏 */}
+ <div className="flex items-center gap-3 p-4 bg-muted/30 border-b">
+ <Skeleton className="h-5 w-5 rounded" />
+ <Skeleton className="h-5 w-5 rounded" />
+ <div className="flex-1">
+ <Skeleton className="h-4 w-24 mb-1" />
+ <Skeleton className="h-3 w-16" />
+ </div>
+ <Skeleton className="h-8 w-8 rounded" />
+ </div>
+
+ {/* 频道骨架屏 */}
+ {Array.from({ length: 3 }).map((_, index) => (
+ <div key={index} className="flex items-center gap-3 p-4 border-b last:border-b-0">
+ <Skeleton className="h-10 w-10 rounded-full" />
+ <div className="flex-1">
+ <Skeleton className="h-4 w-32 mb-2" />
+ <div className="flex items-center gap-2">
+ <Skeleton className="h-3 w-3 rounded-full" />
+ <Skeleton className="h-3 w-16" />
+ <Skeleton className="h-3 w-12" />
+ <Skeleton className="h-3 w-20" />
+ </div>
+ </div>
+ <Skeleton className="h-8 w-8 rounded" />
+ </div>
+ ))}
+
+ {/* 加载动画 */}
+ <div className="flex items-center justify-center py-4">
+ <Loader2 className="h-6 w-6 animate-spin text-muted-foreground" />
+ <span className="ml-2 text-sm text-muted-foreground">
+ {t('common.loading', '加载中...')}
+ </span>
+ </div>
+ </div>
+ )
+ }
+
+ return (
+ <div className="flex flex-col gap-4">
+ {/* 添加新空间 */}
+ <div className="flex gap-2">
+ {showCreateSpace ? (
+ <>
+ <Input
+ placeholder={t('channelManager.createSpaceNamePlaceholder', '输入空间名称')}
+ value={newSpaceName}
+ onChange={e => setNewSpaceName(e.target.value)}
+ onKeyDown={(e) => {
+ if (e.key === 'Enter')
+ addNewSpace()
+ if (e.key === 'Escape') {
+ setNewSpaceName('')
+ setShowCreateSpace(false)
+ }
+ }}
+ disabled={creatingSpace}
+ autoFocus
+ className="flex-1"
+ />
+ <Button onClick={addNewSpace} size="sm" disabled={!newSpaceName.trim() || creatingSpace}>
+ {creatingSpace ? (
+ <Loader2 className="h-4 w-4 animate-spin mr-1" />
+ ) : (
+ <Plus className="h-4 w-4 mr-1" />
+ )}
+ {t('common.confirm', '确认')}
+ </Button>
+ <Button
+ variant="outline"
+ onClick={() => {
+ setNewSpaceName('')
+ setShowCreateSpace(false)
+ }}
+ size="sm"
+ >
+ {t('common.cancel', '取消')}
+ </Button>
+ </>
+ ) : (
+ <Button
+ variant="outline"
+ onClick={() => setShowCreateSpace(true)}
+ className="w-full justify-start"
+ disabled={showCreateSpace}
+ >
+ <Plus className="h-4 w-4 mr-2" />
+ {t('channelManager.createSpace', '新建空间')}
+ </Button>
+ )}
+ </div>
+
+ {/* 空间和频道列表 */}
+ <ScrollArea className="flex-1">
+ <div className="space-y-2">
+ {accountGroupList.map((space, index) => {
+ const channels = getChannelsInSpace(space.id)
+ const canMoveUp = index > 0
+ const canMoveDown = index < accountGroupList.length - 1
+ const isEditing = editingSpace === space.id
+
+ return (
+ <div key={space.id} className="border rounded-lg overflow-hidden">
+ {/* 空间标题栏 */}
+ <div className="flex items-center gap-3 p-4 bg-muted/30 border-b">
+ <ChevronRight className="h-4 w-4 text-muted-foreground shrink-0" />
+
+ <Folder className="h-5 w-5 text-primary shrink-0" />
+
+ {isEditing ? (
+ <div className="flex-1 flex gap-2">
+ <Input
+ value={editSpaceName}
+ onChange={e => setEditSpaceName(e.target.value)}
+ onKeyDown={(e) => {
+ if (e.key === 'Enter') saveSpaceEdit()
+ if (e.key === 'Escape') cancelSpaceEdit()
+ }}
+ autoFocus
+ className="h-8 text-sm"
+ />
+ <Button onClick={saveSpaceEdit} size="sm" disabled={editingSpaceLoading}>
+ {editingSpaceLoading ? (
+ <Loader2 className="h-4 w-4 animate-spin mr-1" />
+ ) : null}
+ {t('common.save', '保存')}
+ </Button>
+ <Button variant="outline" onClick={cancelSpaceEdit} size="sm" disabled={editingSpaceLoading}>
+ {t('common.cancel', '取消')}
+ </Button>
+ </div>
+ ) : (
+ <>
+ <div className="flex-1 min-w-0">
+ <div className="font-medium text-sm">{space.name}</div>
+ {space.isDefault && (
+ <div className="text-xs text-muted-foreground">
+ {t('account.defaultSpace', '默认空间')}
+ </div>
+ )}
+ </div>
+
+ <div className="text-xs text-muted-foreground shrink-0">
+ {channels.length} 个频道
+ </div>
+
+ {!space.isDefault && (
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <Button variant="ghost" size="sm" className="h-8 w-8 p-0 shrink-0">
+ <MoreVertical className="h-4 w-4" />
+ </Button>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent align="end">
+ <DropdownMenuItem onClick={() => startEditingSpace(space.id, space.name)}>
+ <Edit className="h-4 w-4 mr-2" />
+ {t('common.edit', '编辑')}
+ </DropdownMenuItem>
+ {canMoveUp && (
+ <DropdownMenuItem>
+ <ChevronUp className="h-4 w-4 mr-2" />
+ {t('channelManager.moveUp', '上移')}
+ </DropdownMenuItem>
+ )}
+ {canMoveDown && (
+ <DropdownMenuItem>
+ <ChevronDown className="h-4 w-4 mr-2" />
+ {t('channelManager.moveDown', '下移')}
+ </DropdownMenuItem>
+ )}
+ <DropdownMenuSeparator />
+ <DropdownMenuItem
+ onClick={() => setDeleteDialog({
+ open: true,
+ type: 'space',
+ id: space.id,
+ name: space.name,
+ })}
+ className="text-destructive"
+ >
+ <Trash2 className="h-4 w-4 mr-2" />
+ {t('common.delete', '删除')}
+ </DropdownMenuItem>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ )}
+ </>
+ )}
+ </div>
+
+ {/* 频道列表 */}
+ <div className="divide-y">
+ {channels.length === 0 ? (
+ <div className="text-sm text-muted-foreground py-8 text-center">
+ {t('channelManager.noChannels', '暂无频道')}
+ </div>
+ ) : (
+ channels.map((channel) => {
+ const platInfo = AccountPlatInfoMap.get(channel.platform as any)
+ return (
+ <div
+ key={channel.id}
+ className="flex items-center gap-3 p-4 hover:bg-accent/30 transition-colors group"
+ >
+ <Avatar className="h-10 w-10 shrink-0">
+ <AvatarImage src={getOssUrl(channel.avatar)} alt={channel.name} />
+ <AvatarFallback>{channel.name[0]}</AvatarFallback>
+ </Avatar>
+
+ <div className="flex-1 min-w-0">
+ <div className="font-medium text-sm truncate">{channel.name}</div>
+ <div className="flex items-center gap-2 mt-1 flex-wrap">
+ {platInfo?.icon && (
+ <Image
+ src={platInfo.icon}
+ alt={platInfo.name}
+ width={14}
+ height={14}
+ className="rounded-sm shrink-0"
+ />
+ )}
+ <span className="text-xs text-muted-foreground shrink-0">
+ {platInfo?.name}
+ </span>
+ {/* 状态显示 */}
+ <span className="flex items-center gap-1 text-xs text-green-600 shrink-0">
+ <div className="w-2 h-2 bg-green-600 rounded-full"></div>
+ 在线
+ </span>
+ {channel.fansCount !== undefined && (
+ <span className="text-xs text-muted-foreground shrink-0">
+ 粉丝: {channel.fansCount}
+ </span>
+ )}
+ </div>
+ </div>
+
+ <Button
+ variant="ghost"
+ size="sm"
+ onClick={() => setDeleteDialog({
+ open: true,
+ type: 'channel',
+ id: channel.id,
+ name: channel.name,
+ })}
+ className="opacity-0 group-hover:opacity-100 h-8 w-8 p-0 text-destructive hover:text-destructive shrink-0"
+ >
+ <Trash2 className="h-4 w-4" />
+ </Button>
+ </div>
+ )
+ })
+ )}
+ </div>
+ </div>
+ )
+ })}
+ </div>
+ </ScrollArea>
+
+ {/* 删除确认对话框 */}
+ <AlertDialog
+ open={deleteDialog.open}
+ onOpenChange={open =>
+ setDeleteDialog(prev => ({ ...prev, open }))}
+ >
+ <AlertDialogContent>
+ <AlertDialogHeader>
+ <AlertDialogTitle>
+ {t('channelManager.deleteConfirm', '确认删除')}
+ </AlertDialogTitle>
+ <AlertDialogDescription>
+ 确定要删除
+ {deleteDialog.type === 'space' ? '空间' : '频道'}
+ {' '}
+ "
+ {deleteDialog.name}
+ " 吗?此操作无法撤销。
+ </AlertDialogDescription>
+ </AlertDialogHeader>
+ <AlertDialogFooter>
+ <AlertDialogCancel>
+ {t('common.cancel', '取消')}
+ </AlertDialogCancel>
+ <AlertDialogAction
+ onClick={confirmDelete}
+ className="bg-destructive text-destructive-foreground hover:bg-destructive/90"
+ >
+ {t('common.confirm', '确认')}
+ </AlertDialogAction>
+ </AlertDialogFooter>
+ </AlertDialogContent>
+ </AlertDialog>
+ </div>
+ )
+}
diff --git a/project/web/src/components/ChannelManager/index.tsx b/project/web/src/components/ChannelManager/index.tsx
new file mode 100644
index 00000000..38d5b8d2
--- /dev/null
+++ b/project/web/src/components/ChannelManager/index.tsx
@@ -0,0 +1,65 @@
+/**
+ * ChannelManager - 频道管理弹窗组件
+ *
+ * 功能描述:
+ * - 空间和频道融合管理界面
+ * - 支持添加空间、编辑空间、删除空间、空间排序
+ * - 支持删除频道
+ * - 完全使用全局account store数据
+ */
+
+'use client'
+
+import { useCallback, useState } from 'react'
+import { useTransClient } from '@/app/i18n/client'
+import {
+ Dialog,
+ DialogContent,
+ DialogHeader,
+ DialogTitle,
+} from '@/components/ui/dialog'
+import { UnifiedChannelSpaceList } from './components/UnifiedChannelSpaceList'
+
+interface ChannelManagerProps {
+ open?: boolean
+ onOpenChange?: (open: boolean) => void
+}
+
+export function ChannelManager({
+ open: controlledOpen,
+ onOpenChange,
+}: ChannelManagerProps) {
+ const { t } = useTransClient('account')
+ const [internalOpen, setInternalOpen] = useState(false)
+ const isOpen = controlledOpen ?? internalOpen
+
+ // 使用useCallback优化关闭函数
+ const handleClose = useCallback(() => {
+ if (onOpenChange) {
+ onOpenChange(false)
+ } else {
+ setInternalOpen(false)
+ }
+ }, [onOpenChange])
+
+ return (
+ <Dialog open={isOpen} onOpenChange={handleClose}>
+ <DialogContent className="max-w-2xl h-[600px] overflow-hidden flex flex-col">
+ <DialogHeader>
+ <DialogTitle className="text-lg font-semibold">
+ {t('channelManager.title', '我的频道')}
+ </DialogTitle>
+ </DialogHeader>
+
+ {/* 统一的空间和频道管理列表 */}
+ <UnifiedChannelSpaceList />
+ </DialogContent>
+ </Dialog>
+ )
+}
+
+// 导出store hook
+export { useChannelManagerStore } from './channelStore'
+
+// 默认导出
+export default ChannelManager
diff --git a/project/web/src/components/Chat/ChatMessage/ChatMessage.module.scss b/project/web/src/components/Chat/ChatMessage/ChatMessage.module.scss
index 5fe9e4cd..2dae63d1 100644
--- a/project/web/src/components/Chat/ChatMessage/ChatMessage.module.scss
+++ b/project/web/src/components/Chat/ChatMessage/ChatMessage.module.scss
@@ -69,6 +69,14 @@
}
.markdownContent {
+ /* 允许内部长单词/URL在必要时换行,避免溢出父容器 */
+ overflow-wrap: anywhere;
+ word-wrap: break-word;
+ word-break: break-word;
+ -webkit-hyphens: auto;
+ -ms-hyphens: auto;
+ hyphens: auto;
+
// 段落
:global(p) {
margin: 0 0 12px 0;
@@ -223,6 +231,12 @@
color: #7c3aed;
text-decoration: none;
font-weight: 500;
+ /* 支持长链接/无空格字符串换行,防止溢出气泡容器 */
+ overflow-wrap: anywhere;
+ word-wrap: break-word;
+ /* break-all 可在必要时强制断行(对英语长链接生效) */
+ word-break: break-all;
+ hyphens: auto;
}
:global(a:hover) {
diff --git a/project/web/src/components/Chat/ChatMessage/index.tsx b/project/web/src/components/Chat/ChatMessage/index.tsx
index e0670b55..f1baeb64 100644
--- a/project/web/src/components/Chat/ChatMessage/index.tsx
+++ b/project/web/src/components/Chat/ChatMessage/index.tsx
@@ -301,7 +301,7 @@ export function ChatMessage({
</div>
{/* 消息内容 */}
- <div className={cn('flex flex-col gap-2 max-w-[80%]', isUser ? 'items-end' : 'items-start')}>
+ <div className={cn('flex flex-col gap-2 max-w-[80%] min-w-0', isUser ? 'items-end' : 'items-start')}>
{/* 媒体附件(统一使用 MediaGallery) */}
{medias.length > 0 && (
<MediaGallery
@@ -320,7 +320,7 @@ export function ChatMessage({
{/* AI 消息:多步骤渲染 - 只有有实际内容或工作流时才显示 */}
{!isUser && displaySteps.length > 0 && displaySteps.some(s => s.content?.trim() || s.workflowSteps?.length) && (
- <div className="w-full bg-card border border-border rounded-2xl rounded-bl-md px-4 py-3">
+ <div className="w-full bg-card border border-border rounded-2xl rounded-bl-md px-4 py-3 min-w-0">
{displaySteps.map((step, index) => (
<MessageStepContent
key={step.id}
diff --git a/project/web/src/components/Chat/Rating/RatingModal.tsx b/project/web/src/components/Chat/Rating/RatingModal.tsx
index d1448e96..5d179671 100644
--- a/project/web/src/components/Chat/Rating/RatingModal.tsx
+++ b/project/web/src/components/Chat/Rating/RatingModal.tsx
@@ -27,11 +27,13 @@ export const RatingModal: React.FC<RatingModalProps> = ({ taskId, open, onClose,
const [comment, setComment] = useState<string>('')
const [loading, setLoading] = useState(false)
const [initialLoaded, setInitialLoaded] = useState(false)
+ const [fetchingRating, setFetchingRating] = useState(false)
useEffect(() => {
if (!open) return
let mounted = true
setInitialLoaded(false)
+ setFetchingRating(true)
;(async () => {
try {
// Some deployments don't expose GET /tasks/:id/rating.
@@ -46,7 +48,10 @@ export const RatingModal: React.FC<RatingModalProps> = ({ taskId, open, onClose,
// ignore 404 / not rated
console.error('Get rating failed', err)
} finally {
- if (mounted) setInitialLoaded(true)
+ if (mounted) {
+ setInitialLoaded(true)
+ setFetchingRating(false)
+ }
}
})()
return () => {
@@ -62,7 +67,7 @@ export const RatingModal: React.FC<RatingModalProps> = ({ taskId, open, onClose,
const handleSubmit = async () => {
if (!canSubmit()) {
- toast.error(t('rating.requireComment' as any) || 'Please provide a comment for low ratings')
+ toast.error(t('rating.requireComment') || 'Please provide a comment for low ratings')
return
}
try {
@@ -73,7 +78,7 @@ export const RatingModal: React.FC<RatingModalProps> = ({ taskId, open, onClose,
onClose()
} catch (err) {
console.error(err)
- toast.error(t('rating.saveFailed' as any) || 'Save failed')
+ toast.error(t('rating.saveFailed') || 'Save failed')
} finally {
setLoading(false)
}
@@ -82,11 +87,11 @@ export const RatingModal: React.FC<RatingModalProps> = ({ taskId, open, onClose,
return (
<Modal
open={open}
- title={t('rating.title' as any) || '评分'}
+ title={t('rating.title') || '评分'}
onCancel={onClose}
onOk={handleSubmit}
- okText={t('rating.submit' as any) || '提交'}
- cancelText={t('rating.cancel' as any) || '取消'}
+ okText={t('rating.submit') || '提交'}
+ cancelText={t('rating.cancel') || '取消'}
confirmLoading={false}
footer={loading ? (
<div className="flex items-center justify-end w-full">
@@ -96,7 +101,16 @@ export const RatingModal: React.FC<RatingModalProps> = ({ taskId, open, onClose,
width={520}
>
<div className="space-y-4 w-full">
- <div>
+ {fetchingRating ? (
+ <div className="flex items-center justify-center py-8">
+ <Loader2 className="w-6 h-6 animate-spin text-muted-foreground" />
+ <span className="ml-2 text-sm text-muted-foreground">
+ {t('rating.loading') || '加载中...'}
+ </span>
+ </div>
+ ) : (
+ <>
+ <div>
<div className="flex items-center gap-2">
{Array.from({ length: 5 }).map((_, idx) => {
const val = idx + 1
@@ -115,26 +129,28 @@ export const RatingModal: React.FC<RatingModalProps> = ({ taskId, open, onClose,
})}
</div>
<div className="text-xs text-muted-foreground mt-1">
- {rating ? `${rating} / 5` : t('rating.noRating' as any) || '未评分'}
+ {rating ? `${rating} / 5` : t('rating.noRating') || '未评分'}
</div>
</div>
<div>
<label className="block text-sm font-medium text-foreground mb-1">
- {t('rating.commentLabel' as any) || '评价(可选)'}
+ {t('rating.commentLabel') || '评价(可选)'}
</label>
<Textarea
value={comment}
onChange={(e) => setComment(e.target.value)}
className="min-h-[100px] resize-vertical"
- placeholder={t('rating.commentPlaceholder' as any) || '填写评价...'}
+ placeholder={t('rating.commentPlaceholder') || '填写评价...'}
/>
{rating !== null && rating < 3 && (
<div className="text-xs text-destructive mt-1">
- {t('rating.commentRequiredIfLow' as any) || '低于 3 分需要填写理由'}
+ {t('rating.commentRequiredIfLow') || '低于 3 分需要填写理由'}
</div>
)}
- </div>
+ </div>
+ </>
+ )}
</div>
</Modal>
)
diff --git a/project/web/src/components/Chat/TaskCard/index.tsx b/project/web/src/components/Chat/TaskCard/index.tsx
index bccd5374..28792052 100644
--- a/project/web/src/components/Chat/TaskCard/index.tsx
+++ b/project/web/src/components/Chat/TaskCard/index.tsx
@@ -7,7 +7,6 @@
import type React from 'react'
import { useState } from 'react'
-import { useRouter } from 'next/navigation'
import { Loader2, MessageSquare, MoreHorizontal, Trash2, AlertCircle, CheckCircle2, Star } from 'lucide-react'
import { cn, formatRelativeTime } from '@/lib/utils'
import { Button } from '@/components/ui/button'
@@ -102,7 +101,7 @@ export function TaskCard({
showProminentRating,
onRateClick,
}: ITaskCardProps) {
- const router = useRouter()
+
const lng = useGetClientLng()
const { t } = useTransClient('chat')
const [isDeleting, setIsDeleting] = useState(false)
@@ -111,11 +110,7 @@ export function TaskCard({
const statusConfig = getStatusConfig(status, t as (key: string) => string)
- /** 跳转到对话详情页 */
- const handleClick = () => {
- if (isDeleting) return
- router.push(`/${lng}/chat/${id}`)
- }
+
/** 处理删除 */
const handleDelete = async (e: React.MouseEvent) => {
@@ -132,9 +127,8 @@ export function TaskCard({
return (
<div
- onClick={handleClick}
className={cn(
- 'group relative flex flex-col p-4 rounded-xl border border-border bg-card cursor-pointer transition-all',
+ 'group relative flex flex-col p-4 rounded-xl border border-border bg-card transition-all',
'hover:border-border hover:shadow-md',
isDeleting && 'opacity-60 cursor-wait',
className,
@@ -194,7 +188,7 @@ export function TaskCard({
<DropdownMenu>
<DropdownMenuTrigger asChild>
<button
- onClick={(e) => e.stopPropagation()}
+ onClick={(e) => { e.preventDefault(); e.stopPropagation(); }}
disabled={isDeleting}
className={cn(
'absolute top-2 right-2 w-7 h-7 rounded-md flex items-center justify-center',
@@ -211,6 +205,23 @@ export function TaskCard({
</button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
+ <DropdownMenuItem
+ onClick={(e) => {
+ e.stopPropagation()
+ // 在新窗口中打开任务详情页
+ try {
+ window.open(`/${lng}/chat/${id}`, '_blank', 'noopener')
+ } catch (err) {
+ // fallback: 使用 location.assign
+ // eslint-disable-next-line no-console
+ console.error('Open new window failed', err)
+ }
+ }}
+ >
+ <MessageSquare className="w-4 h-4 mr-2" />
+ 打开
+ </DropdownMenuItem>
+ <DropdownMenuSeparator />
<DropdownMenuItem
onClick={(e) => {
e.stopPropagation()
@@ -220,8 +231,8 @@ export function TaskCard({
<Star className="w-4 h-4 mr-2 text-amber-400" />
{t('task.rate' as any) || 'Rate'}
</DropdownMenuItem>
- <DropdownMenuSeparator />
- <DropdownMenuItem
+
+ <DropdownMenuItem
onClick={(e) => { e.stopPropagation(); handleDelete(e); }}
className="text-destructive focus:text-destructive focus:bg-destructive/10"
>
diff --git a/project/web/src/components/Chat/TaskHistoryList.tsx b/project/web/src/components/Chat/TaskHistoryList.tsx
new file mode 100644
index 00000000..3f365e3c
--- /dev/null
+++ b/project/web/src/components/Chat/TaskHistoryList.tsx
@@ -0,0 +1,68 @@
+/**
+ * TaskHistoryList - 可复用的任务卡片列表组件
+ * 用于在不同页面展示任务网格,支持 loading skeleton、删除、评分回调和可选链接包裹
+ */
+ 'use client'
+
+import React from "react"
+import { TaskCard, TaskCardSkeleton } from "@/components/Chat"
+import { type TaskListItem } from "@/api/agent"
+import { cn } from "@/lib/utils"
+
+export interface ITaskHistoryListProps {
+ tasks: TaskListItem[]
+ isLoading?: boolean
+ skeletonCount?: number
+ onDelete?: (id: string) => void | Promise<void>
+ onRateClick?: (taskId: string) => void
+ className?: string
+ /** 可选:为每条记录生成链接的前缀(例如 '/en/chat'),若传入则会用 <a> 包裹 TaskCard */
+ linkBasePath?: string
+}
+
+export const TaskHistoryList = ({
+ tasks,
+ isLoading = false,
+ skeletonCount = 4,
+ onDelete,
+ onRateClick,
+ className,
+ linkBasePath,
+}: ITaskHistoryListProps) => {
+ return (
+ <div className={cn("grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4", className)}>
+ {isLoading
+ ? Array.from({ length: skeletonCount }).map((_, index) => (
+ <TaskCardSkeleton key={index} />
+ ))
+ : tasks.map((task) => {
+ const card = (
+ <TaskCard
+ id={String(task.id)}
+ title={task.title ?? ''}
+ status={task.status}
+ createdAt={task.createdAt}
+ updatedAt={task.updatedAt}
+ onDelete={onDelete}
+ onRateClick={onRateClick}
+ />
+ )
+
+ if (linkBasePath) {
+ const href = (`${linkBasePath}/${task.id}`) as string
+ return (
+ <a key={task.id} href={href} className="block">
+ {card}
+ </a>
+ )
+ }
+
+ return <React.Fragment key={task.id}>{card}</React.Fragment>
+ })}
+ </div>
+ )
+}
+
+export default TaskHistoryList
+
+
diff --git a/project/web/src/components/Home/HomeChat/index.tsx b/project/web/src/components/Home/HomeChat/index.tsx
index 4ba0768c..fb2db93d 100644
--- a/project/web/src/components/Home/HomeChat/index.tsx
+++ b/project/web/src/components/Home/HomeChat/index.tsx
@@ -50,7 +50,7 @@ export function HomeChat({
const token = useUserStore(state => state.token)
// 获取默认提示文本
- const defaultPrompt = t('input.placeholder' as any) || 'Help me create a cat dancing video and post it directly on YouTube'
+ const defaultPrompt = t('input.placeholder') || 'Help me create a cat dancing video and post it directly on YouTube'
// 状态 - 默认显示提示文本
const [inputValue, setInputValue] = useState(defaultPrompt)
@@ -106,7 +106,7 @@ export function HomeChat({
handleMediaRemove,
clearMedias,
} = useMediaUpload({
- onError: () => toast.error(t('media.uploadFailed' as any)),
+ onError: () => toast.error(t('media.uploadFailed')),
})
// 全局 Store
@@ -119,7 +119,7 @@ export function HomeChat({
setActionContext({
router,
lng: lng as string,
- t: tHome as any,
+ t: tHome,
})
}, [router, lng, tHome, setActionContext])
@@ -164,7 +164,7 @@ export function HomeChat({
{/* 标题区域 */}
<div className="text-center mb-6 px-4">
<h1 className="text-2xl sm:text-3xl md:text-4xl text-foreground font-semibold leading-relaxed">
- {tHome('agentGenerator.subtitle' as any) || t('home.subtitle' as any)}
+ {tHome('agentGenerator.subtitle') || t('home.subtitle')}
</h1>
</div>
@@ -199,7 +199,7 @@ export function HomeChat({
onClick={handleAddChannelClick}
>
<span className="text-sm text-muted-foreground whitespace-nowrap">
- {t('home.connectTools' as any)}
+ {t('home.connectTools')}
</span>
<div className="flex items-center gap-1.5 flex-wrap">
{AccountPlatInfoArr.map(([key, value]) => (
@@ -220,13 +220,13 @@ export function HomeChat({
<div className="flex flex-wrap items-center justify-center gap-2 mt-4">
<span className="inline-flex items-center gap-1 px-3 py-1.5 rounded-full bg-muted text-foreground text-xs font-medium">
<Sparkles className="w-3 h-3" />
- {t('home.aiCreation' as any)}
+ {t('home.aiCreation')}
</span>
<span className="inline-flex items-center gap-1 px-3 py-1.5 rounded-full bg-muted text-muted-foreground text-xs">
- {t('home.supportUpload' as any)}
+ {t('home.supportUpload')}
</span>
<span className="inline-flex items-center gap-1 px-3 py-1.5 rounded-full bg-muted text-muted-foreground text-xs">
- {t('home.enterToSend' as any)}
+ {t('home.enterToSend')}
</span>
</div>
diff --git a/project/web/src/components/Home/TaskPreview/index.tsx b/project/web/src/components/Home/TaskPreview/index.tsx
index 25ed0333..bd7de7fb 100644
--- a/project/web/src/components/Home/TaskPreview/index.tsx
+++ b/project/web/src/components/Home/TaskPreview/index.tsx
@@ -3,125 +3,128 @@
* 功能:显示最近的任务卡片列表,支持"浏览全部"跳转
*/
-'use client'
+"use client";
-import { useCallback, useEffect, useState } from 'react'
-import { useRouter, useParams } from 'next/navigation'
-import { ArrowRight, History } from 'lucide-react'
-import { TaskCard, TaskCardSkeleton } from '@/components/Chat'
-import { agentApi, type TaskListItem } from '@/api/agent'
-import { useTransClient } from '@/app/i18n/client'
-import { toast } from '@/lib/toast'
-import { cn } from '@/lib/utils'
+import { useCallback, useEffect, useState } from "react";
+import { useRouter, useParams } from "next/navigation";
+import { ArrowRight, History } from "lucide-react";
+import { TaskCard, TaskCardSkeleton } from "@/components/Chat";
+import TaskHistoryList from "@/components/Chat/TaskHistoryList";
+import RatingModal from "@/components/Chat/Rating";
+import { toast } from "@/lib/toast";
+import { agentApi, type TaskListItem } from "@/api/agent";
+import { useTransClient } from "@/app/i18n/client";
+import { cn } from "@/lib/utils";
export interface ITaskPreviewProps {
/** 显示数量 */
- limit?: number
+ limit?: number;
/** 自定义类名 */
- className?: string
+ className?: string;
}
/**
* TaskPreview - 任务预览组件
*/
export function TaskPreview({ limit = 4, className }: ITaskPreviewProps) {
- const { t } = useTransClient('chat')
- const router = useRouter()
- const { lng } = useParams()
+ const { t } = useTransClient("chat");
+ const router = useRouter();
+ const { lng } = useParams();
- const [tasks, setTasks] = useState<TaskListItem[]>([])
- const [isLoading, setIsLoading] = useState(true)
+ const [tasks, setTasks] = useState<TaskListItem[]>([]);
+ const [isLoading, setIsLoading] = useState(true);
+ const [ratingModalFor, setRatingModalFor] = useState<string | null>(null)
/** 加载任务列表(始终保证尽量填满 limit 条) */
const loadTasks = useCallback(async () => {
- setIsLoading(true)
+ setIsLoading(true);
try {
- const result = await agentApi.getTaskList(1, limit)
+ const result = await agentApi.getTaskList(1, limit);
if (result && result.code === 0 && result.data) {
- setTasks(result.data.list || [])
+ setTasks(result.data.list || []);
}
} catch (error) {
- console.error('Load task list failed:', error)
+ console.error("Load task list failed:", error);
} finally {
- setIsLoading(false)
+ setIsLoading(false);
}
- }, [limit])
+ }, [limit]);
useEffect(() => {
- void loadTasks()
- }, [loadTasks])
+ void loadTasks();
+ }, [loadTasks]);
/** 处理删除任务 */
const handleDelete = async (id: string) => {
try {
- const result = await agentApi.deleteTask(id)
+ const result = await agentApi.deleteTask(id);
if (result && result.code === 0) {
// 先本地移除,提升交互速度
- setTasks((prev) => prev.filter((task) => task.id !== id))
+ setTasks((prev) => prev.filter((task) => task.id !== id));
// 再重新拉取列表,确保数量重新补足到 limit(如果后端还有数据)
- void loadTasks()
- toast.success(t('task.deleteSuccess' as any))
+ void loadTasks();
+ toast.success(t("task.deleteSuccess"));
} else {
- const msg = (result as any)?.msg as string | undefined
- toast.error(msg || t('task.deleteFailed' as any))
+ const msg = (result)?.message as string | undefined;
+ toast.error(msg || t("task.deleteFailed"));
}
} catch (error) {
- toast.error(t('task.deleteFailed' as any))
+ toast.error(t("task.deleteFailed"));
}
- }
+ };
/** 跳转到任务记录页 */
const handleViewAll = () => {
- router.push(`/${lng}/tasks-history`)
- }
+ router.push(`/${lng}/tasks-history`);
+ };
// 如果没有任务且非加载中,不显示该区域
if (!isLoading && tasks.length === 0) {
- return null
+ return null;
}
return (
<section className={className}>
<div className="w-full max-w-5xl mx-auto">
- {/* 标题栏 */}
- <div className="flex items-center justify-between mb-4">
- <div className="flex items-center gap-2">
- <History className="w-5 h-5 text-muted-foreground" />
- <h3 className="text-base font-medium text-foreground">
- {t('home.recentTasks' as any)}
- </h3>
+ {/* 标题栏 */}
+ <div className="flex items-center justify-between mb-4">
+ <div className="flex items-center gap-2">
+ <History className="w-5 h-5 text-muted-foreground" />
+ <h3 className="text-base font-medium text-foreground">
+ {t("home.recentTasks")}
+ </h3>
+ </div>
+ <button
+ onClick={handleViewAll}
+ className="flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground transition-colors cursor-pointer"
+ >
+ {t("home.viewAll")}
+ <ArrowRight className="w-4 h-4" />
+ </button>
</div>
- <button
- onClick={handleViewAll}
- className="flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground transition-colors cursor-pointer"
- >
- {t('home.viewAll' as any)}
- <ArrowRight className="w-4 h-4" />
- </button>
- </div>
- {/* 任务卡片列表 */}
- <div className="grid grid-cols-2 md:grid-cols-4 gap-4">
- {isLoading
- ? Array.from({ length: limit }).map((_, index) => (
- <TaskCardSkeleton key={index} />
- ))
- : tasks.map((task) => (
- <TaskCard
- key={task.id}
- id={task.id}
- title={task.title || t('task.newChat' as any)}
- status={task.status}
- createdAt={task.createdAt}
- updatedAt={task.updatedAt}
- onDelete={handleDelete}
- />
- ))}
- </div>
+ {/* 任务卡片列表 */}
+ <TaskHistoryList
+ tasks={tasks}
+ isLoading={isLoading}
+ skeletonCount={limit}
+ onDelete={handleDelete}
+ onRateClick={(taskId) => setRatingModalFor(taskId)}
+ className="grid-cols-2 md:grid-cols-4"
+ />
+ <RatingModal
+ taskId={ratingModalFor ?? ''}
+ open={!!ratingModalFor}
+ onClose={() => setRatingModalFor(null)}
+ onSaved={(data) => {
+ setTasks((prev) => prev.map((t) => (t.id === ratingModalFor ? { ...t, rating: data.rating ?? t.rating, ratingComment: data.comment ?? t.ratingComment } : t)))
+ setRatingModalFor(null)
+ toast.success(t('rating.saveSuccess') || 'Saved')
+ }}
+ />
</div>
</section>
- )
+ );
}
-export default TaskPreview
-
+export default TaskPreview;
diff --git a/project/web/src/components/README.md b/project/web/src/components/README.md
index 298deabe..5a0600fb 100644
--- a/project/web/src/components/README.md
+++ b/project/web/src/components/README.md
@@ -24,6 +24,7 @@
| `ScrollButtonContainer/` | 滚动按钮容器 |
| `SignInCalendar/` | 签到日历组件 |
| `WalletAccountSelect/` | 钱包账户选择器 |
+| `ChannelManager/` | 频道管理弹窗组件 |
---
@@ -106,6 +107,76 @@ import DownloadAppModal from '@/components/common/DownloadAppModal'
import { LanguageSwitcher } from '@/components/common'
```
+### MediaPreview
+
+媒体预览组件,用于在列表或弹窗中展示图片/视频/文件预览,支持放大、轮播和下载。
+
+```tsx
+import MediaPreview from '@/components/common/MediaPreview'
+
+<MediaPreview
+ medias={[{ url: string, type: 'image' | 'video' | 'file' }]}
+ visible={boolean}
+ initialIndex={0} // 可选,初始展示索引
+ onClose={() => void}
+/>
+```
+
+常用 Props:
+
+| 属性 | 说明 | 类型 | 默认值 |
+|------|------|------|--------|
+| `medias` | 媒体数组,包含 url 与 type | `Array<{url:string,type:string}>` | - |
+| `visible` | 是否可见 | `boolean` | - |
+| `initialIndex` | 初始展示索引 | `number` | `0` |
+| `onClose` | 关闭回调 | `() => void` | - |
+
+### GlobalLoginModal
+
+全局登录弹窗,用于在未登录时从任意页面触发的登录入口(通常由顶部或浮层触发)。
+
+```tsx
+import GlobalLoginModal from '@/components/common/GlobalLoginModal'
+
+<GlobalLoginModal
+ open={boolean}
+ onClose={() => void}
+ onSuccess={(user) => void} // 可选,登录成功回调
+/>
+```
+
+常用 Props:
+
+| 属性 | 说明 | 类型 | 默认值 |
+|------|------|------|--------|
+| `open` | 是否显示弹窗 | `boolean` | - |
+| `onClose` | 关闭回调 | `() => void` | - |
+| `onSuccess` | 登录成功回调 | `(user:any) => void` | - |
+
+### LoginModal
+
+局部登录弹窗/组件,通常用于表单页或需要内嵌登录控件的场景,与 `GlobalLoginModal` 对应但更偏向页面内使用。
+
+```tsx
+import LoginModal from '@/components/common/LoginModal'
+
+<LoginModal
+ visible={boolean}
+ onClose={() => void}
+ onLogin={(credentials) => void}
+/>
+```
+
+常用 Props:
+
+| 属性 | 说明 | 类型 | 默认值 |
+|------|------|------|--------|
+| `visible` | 是否显示 | `boolean` | - |
+| `onClose` | 关闭回调 | `() => void` | - |
+| `onLogin` | 提交登录回调 | `(credentials:any) => void` | - |
+
+注意:`common/` 目录下的组件是应用内公用组件,新增或修改组件时请务必在本文件中补充对应文档条目,包含:用途说明、引入示例、常用 Props、重要行为(如异步操作/失败处理)、以及是否有额外依赖(如样式、图片资源等)。
+
---
## modals/ - 弹窗组件集合
@@ -468,6 +539,57 @@ import SettingsModal from '@/components/SettingsModal'
- 🌐 通用设置:网站语言切换
- 🎨 使用 shadcn/ui + Tailwind CSS 实现
+### ChannelManager - 频道管理弹窗
+
+频道和空间的统一管理弹窗,支持搜索筛选、创建空间、删除空间等功能。
+
+```tsx
+import ChannelManager from '@/components/ChannelManager'
+
+// 非受控模式(推荐)- 通过 store 控制
+<ChannelManager />
+
+// 受控模式
+<ChannelManager
+ open={isOpen}
+ onOpenChange={setIsOpen}
+ fetchChannels={customFetchChannels}
+ fetchSpaces={customFetchSpaces}
+/>
+```
+
+**Props:**
+
+| 属性 | 说明 | 类型 | 默认值 |
+|------|------|------|--------|
+| `open` | 受控模式下的打开状态 | `boolean` | - |
+| `onOpenChange` | 受控模式下的状态改变回调 | `(open: boolean) => void` | - |
+| `fetchChannels` | 自定义获取频道数据的函数 | `() => Promise<void>` | - |
+| `fetchSpaces` | 自定义获取空间数据的函数 | `() => Promise<void>` | - |
+
+**特性:**
+- 📱 响应式设计,支持深色/浅色主题
+- 🔍 支持频道和空间的搜索筛选
+- ➕ 内置创建空间功能
+- 🗑️ 支持删除空间(非默认空间)
+- 📂 标签页布局(频道/空间)
+- 🎨 使用 shadcn/ui + Tailwind CSS v4
+- 🌐 完整的国际化支持
+- ♿ 无障碍访问支持
+
+**Store API:**
+
+```tsx
+import { useChannelManagerStore } from '@/components/ChannelManager'
+
+// 打开弹窗
+const { setOpen } = useChannelManagerStore()
+setOpen(true)
+
+// 监听状态
+const { open, activeTab, filterText } = useChannelManagerStore()
+```
+
---
## 新增组件规范
diff --git a/project/web/src/components/common/MediaPreview.tsx b/project/web/src/components/common/MediaPreview.tsx
index 895d52ff..42d750d9 100644
--- a/project/web/src/components/common/MediaPreview.tsx
+++ b/project/web/src/components/common/MediaPreview.tsx
@@ -21,16 +21,29 @@ export interface MediaPreviewProps {
export const MediaPreview = ({ open, items, initialIndex = 0, onClose }: MediaPreviewProps) => {
const [index, setIndex] = useState(initialIndex)
+ const [videoAspectRatio, setVideoAspectRatio] = useState<number | null>(null)
useEffect(() => {
if (open) {
setIndex(Math.min(Math.max(initialIndex, 0), Math.max(items.length - 1, 0)))
+ setVideoAspectRatio(null) // 重置宽高比
}
}, [open, initialIndex, items.length])
const hasMultiple = items.length > 1
const current = items[index]
+ // 处理视频加载,获取宽高比
+ const handleVideoLoad = (e: React.SyntheticEvent<HTMLVideoElement>) => {
+ const video = e.currentTarget
+ if (video.videoWidth && video.videoHeight) {
+ setVideoAspectRatio(video.videoWidth / video.videoHeight)
+ }
+ }
+
+ // 根据宽高比决定是否为横屏视频
+ const isWideVideo = videoAspectRatio && videoAspectRatio > 1.6 // 宽高比大于16:10认为是横屏
+
const handlePrev = () => {
if (!hasMultiple) return
setIndex((prev) => (prev - 1 + items.length) % items.length)
@@ -43,9 +56,9 @@ export const MediaPreview = ({ open, items, initialIndex = 0, onClose }: MediaPr
return (
<Dialog open={open} onOpenChange={(o) => !o && onClose()}>
- <DialogContent
+ <DialogContent
className={cn(
- 'border-none bg-transparent shadow-none p-0 max-w-[90vw] max-h-[90vh]',
+ 'border-none bg-transparent shadow-none p-0 w-screen h-screen',
// 使用默认 overlay 做半透明背景,这里只负责居中内容
'[&>button]:hidden flex items-center justify-center',
)}
@@ -58,7 +71,7 @@ export const MediaPreview = ({ open, items, initialIndex = 0, onClose }: MediaPr
<div className="relative w-full flex items-center justify-center">
{/* 内容卡片 */}
- <div className="relative max-h-[80vh] max-w-[90vw] overflow-hidden rounded-xl bg-background shadow-2xl">
+ <div className="relative max-h-[85vh] w-[min(95vw,1200px)] overflow-hidden rounded-xl bg-background shadow-2xl">
{/* 顶部关闭按钮 */}
<button
type="button"
@@ -79,12 +92,18 @@ export const MediaPreview = ({ open, items, initialIndex = 0, onClose }: MediaPr
animate={{ opacity: 1, scale: 1 }}
exit={{ opacity: 0, scale: 0.97 }}
transition={{ duration: 0.18 }}
- className="max-h-[80vh] max-w-[90vw]"
+ className="max-h-[80vh] w-full flex items-center justify-center"
>
{current.type === 'video' ? (
<video
src={current.src}
- className="max-h-[80vh] max-w-[90vw] bg-black object-contain"
+ onLoadedMetadata={handleVideoLoad}
+ className={cn(
+ "bg-black object-contain",
+ isWideVideo
+ ? "max-h-[70vh] w-[min(95vw,1200px)]" // 横屏视频:限制高度,使用最大宽度约束
+ : "max-h-[75vh] w-[min(85vw,900px)]" // 竖屏/方屏视频:正常限制
+ )}
controls
autoPlay
/>
@@ -92,7 +111,7 @@ export const MediaPreview = ({ open, items, initialIndex = 0, onClose }: MediaPr
<img
src={current.src}
alt={current.title || 'preview'}
- className="max-h-[80vh] max-w-[90vw] object-contain"
+ className="max-h-[80vh] w-[min(90vw,900px)] object-contain"
/>
)}
</motion.div>
diff --git a/project/web/src/components/ui/NotificationCenter.tsx b/project/web/src/components/ui/NotificationCenter.tsx
new file mode 100644
index 00000000..82b3b76d
--- /dev/null
+++ b/project/web/src/components/ui/NotificationCenter.tsx
@@ -0,0 +1,174 @@
+ 'use client'
+
+import React, { useEffect, useRef, useState } from 'react'
+
+type NotificationDetail = {
+ key?: string
+ id?: string
+ _uid?: string
+ content?: React.ReactNode
+ duration?: number
+}
+
+type NotificationItem = {
+ uid: string // internal unique id
+ key?: string
+ content: React.ReactNode
+ duration: number
+ expiresAt: number
+ visible: boolean
+}
+
+function genUid() {
+ return `${Date.now()}-${Math.floor(Math.random() * 100000)}`
+}
+
+export const NotificationCenter: React.FC = () => {
+ const [items, setItems] = useState<NotificationItem[]>([])
+ const timeoutsRef = useRef<Record<string, number>>({})
+ const remainingRef = useRef<Record<string, number>>({})
+ const pinnedRef = useRef<Record<string, boolean>>({})
+
+ useEffect(() => {
+ function onAdd(e: Event) {
+ const detail = (e as CustomEvent)?.detail as NotificationDetail | undefined
+ if (!detail) return
+ const uid = detail._uid || genUid()
+ const key = detail.key || detail.id
+ const duration = (typeof detail.duration === 'number') ? detail.duration * 1000 : 3000
+ const expiresAt = Date.now() + duration
+ const item: NotificationItem = { uid, key, content: detail.content || '', duration, expiresAt, visible: false }
+ // add to top
+ setItems(prev => [item, ...prev])
+ // trigger enter animation
+ setTimeout(() => {
+ setItems(prev => prev.map(it => it.uid === uid ? { ...it, visible: true } : it))
+ }, 10)
+
+ // auto remove after duration (unless pinned)
+ const timeoutId = window.setTimeout(() => {
+ if (pinnedRef.current[uid]) {
+ // do not auto-remove if pinned
+ delete timeoutsRef.current[uid]
+ return
+ }
+ // start exit animation
+ setItems(prev => prev.map(it => it.uid === uid ? { ...it, visible: false } : it))
+ // remove after animation
+ const removeId = window.setTimeout(() => {
+ setItems(prev => prev.filter(it => it.uid !== uid))
+ delete timeoutsRef.current[uid]
+ delete remainingRef.current[uid]
+ }, 200)
+ timeoutsRef.current[uid] = removeId
+ }, duration)
+ timeoutsRef.current[uid] = timeoutId
+ remainingRef.current[uid] = duration
+ }
+
+ function onRemove(e: Event) {
+ const detail = (e as CustomEvent)?.detail as NotificationDetail | undefined
+ if (!detail) return
+ const uid = detail._uid
+ const key = detail.key || detail.id
+ if (uid) {
+ // clear pending timeout if any
+ if (timeoutsRef.current[uid]) {
+ clearTimeout(timeoutsRef.current[uid])
+ delete timeoutsRef.current[uid]
+ }
+ setItems(prev => prev.map(it => it.uid === uid ? { ...it, visible: false } : it))
+ setTimeout(() => setItems(prev => prev.filter(it => it.uid !== uid)), 200)
+ return
+ }
+ if (key) {
+ // remove only first matched key (avoid closing all with same key)
+ let removed = false
+ let removedUid: string | null = null
+ setItems(prev => prev.map(it => {
+ if (!removed && it.key === key) {
+ removed = true
+ removedUid = it.uid
+ return { ...it, visible: false }
+ }
+ return it
+ }))
+ setTimeout(() => {
+ if (removedUid) {
+ if (timeoutsRef.current[removedUid]) {
+ clearTimeout(timeoutsRef.current[removedUid])
+ delete timeoutsRef.current[removedUid]
+ }
+ }
+ setItems(prev => prev.filter(it => it.uid !== removedUid))
+ }, 200)
+ }
+ }
+
+ window.addEventListener('aito:notification', onAdd as EventListener)
+ window.addEventListener('aito:notification-remove', onRemove as EventListener)
+ return () => {
+ window.removeEventListener('aito:notification', onAdd as EventListener)
+ window.removeEventListener('aito:notification-remove', onRemove as EventListener)
+ }
+ }, [])
+
+ return (
+ <div className="fixed top-4 right-4 z-50 flex flex-col items-end gap-3">
+ {items.map(item => (
+ <div
+ key={item.uid}
+ className={[
+ 'w-80 bg-white/95 text-zinc-900 dark:bg-zinc-900/95 dark:text-white border border-zinc-200 dark:border-zinc-800 shadow-lg p-3',
+ 'transform transition-all duration-200 ease-out',
+ item.visible ? 'opacity-100 translate-y-0' : 'opacity-0 -translate-y-2',
+ 'rounded-sm',
+ ].join(' ')}
+ role="status"
+ >
+ <div
+ className="flex items-start justify-between gap-3"
+ onMouseEnter={() => {
+ const uid = item.uid
+ // mark pinned so it will not auto-remove
+ pinnedRef.current[uid] = true
+ if (timeoutsRef.current[uid]) {
+ clearTimeout(timeoutsRef.current[uid])
+ delete timeoutsRef.current[uid]
+ }
+ }}
+ onMouseLeave={() => {
+ // Do nothing: once hovered, notification stays until manually closed
+ }}
+ >
+ <div className="flex-1 text-sm wrap-break-word">
+ {item.content}
+ </div>
+ <button
+ aria-label="Close notification"
+ onClick={() => {
+ // clear any existing timeout for this uid
+ if (timeoutsRef.current[item.uid]) {
+ clearTimeout(timeoutsRef.current[item.uid])
+ delete timeoutsRef.current[item.uid]
+ }
+ setItems(prev => prev.map(it => it.uid === item.uid ? { ...it, visible: false } : it))
+ setTimeout(() => {
+ setItems(prev => prev.filter(it => it.uid !== item.uid))
+ delete remainingRef.current[item.uid]
+ }, 200)
+ }}
+ className="ml-3 text-sm opacity-70 hover:opacity-100"
+ >
+ ✕
+ </button>
+ </div>
+ </div>
+ ))}
+ </div>
+ )
+}
+
+export default NotificationCenter
+
+
diff --git a/project/web/src/constant.ts b/project/web/src/constant.ts
index 14fa78b8..886ff4f6 100644
--- a/project/web/src/constant.ts
+++ b/project/web/src/constant.ts
@@ -10,3 +10,6 @@ export const ProxyUrls = [
// OSS URL
export const OSS_URL = process.env.NEXT_PUBLIC_OSS_URL!
+
+// 联系方式
+export const CONTACT = "[email protected]";
\ No newline at end of file
diff --git a/project/web/src/lib/notification.ts b/project/web/src/lib/notification.ts
new file mode 100644
index 00000000..eb6f872b
--- /dev/null
+++ b/project/web/src/lib/notification.ts
@@ -0,0 +1,82 @@
+type NotificationOptions = {
+ key?: string
+ id?: string
+ duration?: number
+ content?: React.ReactNode
+}
+
+function emit(payload: { key?: string; id?: string; content?: React.ReactNode; duration?: number; _uid?: string }) {
+ if (typeof window === 'undefined') {
+ // server-side fallback: no-op
+ return
+ }
+ try {
+ window.dispatchEvent(new CustomEvent('aito:notification', { detail: payload }))
+ }
+ catch (e) {
+ // ignore
+ }
+}
+
+function removeEmit(payload: { key?: string; id?: string; _uid?: string }) {
+ if (typeof window === 'undefined') return
+ try {
+ window.dispatchEvent(new CustomEvent('aito:notification-remove', { detail: payload }))
+ }
+ catch (e) {}
+}
+
+export const notification = {
+ success(content: React.ReactNode | NotificationOptions, options?: NotificationOptions) {
+ const payload = typeof content === 'object' && content !== null && 'content' in content
+ ? { key: (content as NotificationOptions).key, id: (content as NotificationOptions).id, content: (content as NotificationOptions).content, duration: (content as NotificationOptions).duration }
+ : { key: options?.key, id: options?.id, content: content as React.ReactNode, duration: options?.duration }
+ const uid = `${Date.now()}-${Math.floor(Math.random() * 100000)}`
+ emit({ ...payload, _uid: uid })
+ return uid
+ },
+
+ error(content: React.ReactNode | NotificationOptions, options?: NotificationOptions) {
+ const payload = typeof content === 'object' && content !== null && 'content' in content
+ ? { key: (content as NotificationOptions).key, id: (content as NotificationOptions).id, content: (content as NotificationOptions).content, duration: (content as NotificationOptions).duration }
+ : { key: options?.key, id: options?.id, content: content as React.ReactNode, duration: options?.duration }
+ const uid = `${Date.now()}-${Math.floor(Math.random() * 100000)}`
+ emit({ ...payload, _uid: uid })
+ return uid
+ },
+
+ warning(content: React.ReactNode | NotificationOptions, options?: NotificationOptions) {
+ const payload = typeof content === 'object' && content !== null && 'content' in content
+ ? { key: (content as NotificationOptions).key, id: (content as NotificationOptions).id, content: (content as NotificationOptions).content, duration: (content as NotificationOptions).duration }
+ : { key: options?.key, id: options?.id, content: content as React.ReactNode, duration: options?.duration }
+ const uid = `${Date.now()}-${Math.floor(Math.random() * 100000)}`
+ emit({ ...payload, _uid: uid })
+ return uid
+ },
+
+ info(content: React.ReactNode | NotificationOptions, options?: NotificationOptions) {
+ const payload = typeof content === 'object' && content !== null && 'content' in content
+ ? { key: (content as NotificationOptions).key, id: (content as NotificationOptions).id, content: (content as NotificationOptions).content, duration: (content as NotificationOptions).duration }
+ : { key: options?.key, id: options?.id, content: content as React.ReactNode, duration: options?.duration }
+ const uid = `${Date.now()}-${Math.floor(Math.random() * 100000)}`
+ emit({ ...payload, _uid: uid })
+ return uid
+ },
+
+ open(options: { key?: string, type?: 'success' | 'error' | 'warning' | 'info' | 'loading', content: React.ReactNode, duration?: number }) {
+ const uid = `${Date.now()}-${Math.floor(Math.random() * 100000)}`
+ const payload = { key: options.key, id: options.key, content: options.content, duration: options.duration, _uid: uid }
+ emit(payload)
+ return uid
+ },
+
+ destroy(key?: string) {
+ if (!key) return
+ // try remove by uid first
+ removeEmit({ _uid: key, key })
+ },
+}
+
+export default notification
+
+
diff --git a/project/web/src/utils/request.ts b/project/web/src/utils/request.ts
index 080f44a9..8cf48b36 100644
--- a/project/web/src/utils/request.ts
+++ b/project/web/src/utils/request.ts
@@ -1,7 +1,9 @@
import type { RequestParams } from '@/utils/FetchService/types'
-import { toast } from '@/lib/toast'
import { useUserStore } from '@/store/user'
import FetchService from '@/utils/FetchService/FetchService'
+import { directTrans } from '@/app/i18n/client'
+import { CONTACT } from '@/constant'
+import { notification } from '@/lib/notification'
interface ResponseType<T> {
code: string | number
@@ -47,15 +49,11 @@ export async function request<T>(params: RequestParamsWithSilent) {
const lang = useUserStore.getState().lang || 'zh-CN'
const isZh = (lang || '').toLowerCase().startsWith('zh')
- const i18nText = {
- networkBusy: isZh
- ? '网络繁忙,请稍后重试!'
- : 'Network busy, please try again later!',
- networkError: isZh
- ? '网络异常,请稍后重试!'
- : 'Network error, please try again later!',
- contact: isZh ? '如需帮助请联系客服:' : 'Need help? Contact support:',
- }
+ // 使用项目的静态翻译方法(只使用国际化字段,不再使用硬编码回退)
+ const networkBusy = directTrans('common', 'networkBusy')
+ const networkError = directTrans('common', 'networkError')
+ const contactLabel = directTrans('common', 'contact')
+ const contactText = `${contactLabel} ${CONTACT}`
// 未登录拦截
if (data.code === 401 && !useUserStore.getState().token) {
@@ -77,10 +75,10 @@ export async function request<T>(params: RequestParamsWithSilent) {
if (data.code !== 0) {
if (!params.silent && typeof window !== 'undefined') {
- toast.warning({
- content: `${data.message || i18nText.networkBusy} ${i18nText.contact} https://t.me/harryyyy2025`,
+ notification.warning({
+ content: `${data.message || networkBusy} ${contactText}`,
key: 'apiErrorMessage',
- duration: 6,
+ duration: 3,
})
}
// 如果是 silent 模式,返回完整响应以便调用方处理
@@ -93,12 +91,13 @@ export async function request<T>(params: RequestParamsWithSilent) {
return data
}
catch (e) {
- console.warn(e)
if (!params.silent && typeof window !== 'undefined') {
- toast.error({
- content: `${(useUserStore.getState().lang || 'zh-CN').toLowerCase().startsWith('zh') ? '网络异常,请稍后重试!' : 'Network error, please try again later!'} ${(useUserStore.getState().lang || 'zh-CN').toLowerCase().startsWith('zh') ? '如需帮助请联系客服:' : 'Need help? Contact support:'} https://t.me/harryyyy2025`,
+ const errText = directTrans('common', 'networkError')
+ const contactLabelNow = directTrans('common', 'contact')
+ notification.error({
+ content: `${errText} ${contactLabelNow} ${CONTACT}`,
key: 'apiErrorMessage',
- duration: 6,
+ duration: 3,
})
}
return null