mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-16 21:15:57 +03:00
docs(plugin): align session methods with API (#52607)
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
Unverified
parent
8a3185b66c
commit
ab5d49666a
@@ -860,8 +860,10 @@ type SessionDomain = Pick<
|
||||
| "compact"
|
||||
| "synthetic"
|
||||
| "interrupt"
|
||||
| "rename"
|
||||
| "update"
|
||||
| "move"
|
||||
| "wait"
|
||||
| "context"
|
||||
>
|
||||
```
|
||||
|
||||
|
||||
@@ -769,7 +769,7 @@ const synthetic = await ctx.session.synthetic({ sessionID, text: "Deployment com
|
||||
Rename, interrupt, or wait for a session.
|
||||
|
||||
```ts
|
||||
await ctx.session.rename({ sessionID, title: "Review" })
|
||||
await ctx.session.update({ sessionID, title: "Review" })
|
||||
await ctx.session.interrupt({ sessionID, continue: false })
|
||||
await ctx.session.wait({ sessionID })
|
||||
```
|
||||
@@ -800,13 +800,14 @@ interface SessionContext {
|
||||
context(input: SessionContextInput, requestOptions?: RequestOptions): Promise<readonly SessionMessageInfo[]>
|
||||
switchAgent(input: SessionSwitchAgentInput, requestOptions?: RequestOptions): Promise<void>
|
||||
switchModel(input: SessionSwitchModelInput, requestOptions?: RequestOptions): Promise<void>
|
||||
update(input: SessionUpdateInput, requestOptions?: RequestOptions): Promise<void>
|
||||
move(input: SessionMoveInput, requestOptions?: RequestOptions): Promise<void>
|
||||
prompt(input: SessionPromptInput, requestOptions?: RequestOptions): Promise<SessionInboxUser>
|
||||
generate(input: SessionGenerateInput, requestOptions?: RequestOptions): Promise<{ text: string }>
|
||||
command(input: SessionCommandInput, requestOptions?: RequestOptions): Promise<SessionInboxUser>
|
||||
compact(input: SessionCompactInput, requestOptions?: RequestOptions): Promise<SessionInboxCompaction>
|
||||
synthetic(input: SessionSyntheticInput, requestOptions?: RequestOptions): Promise<SessionInboxSynthetic>
|
||||
interrupt(input: SessionInterruptInput, requestOptions?: RequestOptions): Promise<void>
|
||||
rename(input: SessionRenameInput, requestOptions?: RequestOptions): Promise<void>
|
||||
wait(input: SessionWaitInput, requestOptions?: RequestOptions): Promise<void>
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user