mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-18 21:33:44 +00:00
fix(plugin): preserve question state compatibility
This commit is contained in:
parent
5f277c4323
commit
bfa959847f
3 changed files with 5 additions and 4 deletions
|
|
@ -29,7 +29,6 @@ import { Npm } from "../npm"
|
|||
import { PluginV2 } from "../plugin"
|
||||
import { PluginRuntime } from "../plugin/runtime"
|
||||
import { PermissionV2 } from "../permission"
|
||||
import { QuestionV2 } from "../question"
|
||||
import { Reference } from "../reference"
|
||||
import { Ripgrep } from "../ripgrep"
|
||||
import { SessionInstructions } from "../session/instructions"
|
||||
|
|
@ -82,7 +81,6 @@ export type Requirements =
|
|||
| Npm.Service
|
||||
| PermissionV2.Service
|
||||
| PluginRuntime.Service
|
||||
| QuestionV2.Service
|
||||
| ReadToolFileSystem.Service
|
||||
| Reference.Service
|
||||
| Ripgrep.Service
|
||||
|
|
@ -125,7 +123,6 @@ const layer = Layer.effectDiscard(
|
|||
Context.make(FileMutation.Service, yield* FileMutation.Service),
|
||||
Context.make(Image.Service, yield* Image.Service),
|
||||
Context.make(PermissionV2.Service, yield* PermissionV2.Service),
|
||||
Context.make(QuestionV2.Service, yield* QuestionV2.Service),
|
||||
Context.make(ReadToolFileSystem.Service, yield* ReadToolFileSystem.Service),
|
||||
Context.make(SessionInstructions.Service, yield* SessionInstructions.Service),
|
||||
Context.make(SessionTodo.Service, yield* SessionTodo.Service),
|
||||
|
|
@ -199,7 +196,6 @@ export const node = makeLocationNode({
|
|||
Global.node,
|
||||
httpClient,
|
||||
PermissionV2.node,
|
||||
QuestionV2.node,
|
||||
ReadToolFileSystem.node,
|
||||
SessionInstructions.node,
|
||||
SessionTodo.node,
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import type {
|
|||
Part,
|
||||
Provider,
|
||||
PermissionRequest,
|
||||
QuestionRequest,
|
||||
Session,
|
||||
SessionStatus,
|
||||
TextPart,
|
||||
|
|
@ -390,6 +391,7 @@ export type TuiState = {
|
|||
messages: (sessionID: string) => ReadonlyArray<Message>
|
||||
status: (sessionID: string) => SessionStatus | undefined
|
||||
permission: (sessionID: string) => ReadonlyArray<PermissionRequest>
|
||||
question: (sessionID: string) => ReadonlyArray<QuestionRequest>
|
||||
}
|
||||
part: (messageID: string) => ReadonlyArray<Part>
|
||||
lsp: () => ReadonlyArray<TuiSidebarLspItem>
|
||||
|
|
|
|||
|
|
@ -196,6 +196,9 @@ function stateApi(sync: ReturnType<typeof useSync>, data: ReturnType<typeof useD
|
|||
tool: request.source?.type === "tool" ? { messageID: request.source.messageID, callID: request.source.callID } : undefined,
|
||||
}))
|
||||
},
|
||||
question(sessionID) {
|
||||
return sync.data.question[sessionID] ?? []
|
||||
},
|
||||
},
|
||||
part(messageID) {
|
||||
return sync.data.part[messageID] ?? []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue