Просмотр исходного кода

docs: align unified identity translation

Tianyi Cui 2 месяцев назад
Родитель
Сommit
10fd0b4504

+ 2 - 2
docs/cookbook/extension-cookbook.i18n.yaml

@@ -2,5 +2,5 @@
 # side as of the last confirmed-consistent state. Both languages carry equal authority;
 # after editing either side, bring the other along and re-record with:
 #   pnpm run verify-translation-pairing --write
-extension-cookbook.md: 40ee22b352c884d7f295c87726c54ab8e166c844
-extension-cookbook.zh.md: 4e5bc68c973649574bcb2404bea00096eb9ca41f
+extension-cookbook.md: 0b95866515efa1b28a95ed48de0fe20d76a62b82
+extension-cookbook.zh.md: 038bf093ce2d289fb59be165a154cbe4df831d9e

+ 2 - 2
docs/cookbook/extension-cookbook.zh.md

@@ -40,7 +40,7 @@ UI 插件从 `session/event` 事件流渲染(助手 token 流以 `assistant/ch
 
 ```ts
 import type { Context } from 'cordis'
-import { AgentId } from '@deepseek-ai/dsh-agent'
+import { SessionId } from '@deepseek-ai/dsh-session'
 
 declare function render(text: string): void
 declare function onUserInput(handler: (text: string) => void): void
@@ -54,7 +54,7 @@ export function apply(ctx: Context) {
       render(event.data.chunk.text)
     }
   })
-  onUserInput(text => ctx.agents.get(AgentId('main'))?.send([{ type: 'text', text }]))
+  onUserInput(text => ctx.agents.get(SessionId('client-session'))?.send([{ type: 'text', text }]))
 }
 ```