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 { PluginV2 } from "../plugin"
|
||||||
import { PluginRuntime } from "../plugin/runtime"
|
import { PluginRuntime } from "../plugin/runtime"
|
||||||
import { PermissionV2 } from "../permission"
|
import { PermissionV2 } from "../permission"
|
||||||
import { QuestionV2 } from "../question"
|
|
||||||
import { Reference } from "../reference"
|
import { Reference } from "../reference"
|
||||||
import { Ripgrep } from "../ripgrep"
|
import { Ripgrep } from "../ripgrep"
|
||||||
import { SessionInstructions } from "../session/instructions"
|
import { SessionInstructions } from "../session/instructions"
|
||||||
|
|
@ -82,7 +81,6 @@ export type Requirements =
|
||||||
| Npm.Service
|
| Npm.Service
|
||||||
| PermissionV2.Service
|
| PermissionV2.Service
|
||||||
| PluginRuntime.Service
|
| PluginRuntime.Service
|
||||||
| QuestionV2.Service
|
|
||||||
| ReadToolFileSystem.Service
|
| ReadToolFileSystem.Service
|
||||||
| Reference.Service
|
| Reference.Service
|
||||||
| Ripgrep.Service
|
| Ripgrep.Service
|
||||||
|
|
@ -125,7 +123,6 @@ const layer = Layer.effectDiscard(
|
||||||
Context.make(FileMutation.Service, yield* FileMutation.Service),
|
Context.make(FileMutation.Service, yield* FileMutation.Service),
|
||||||
Context.make(Image.Service, yield* Image.Service),
|
Context.make(Image.Service, yield* Image.Service),
|
||||||
Context.make(PermissionV2.Service, yield* PermissionV2.Service),
|
Context.make(PermissionV2.Service, yield* PermissionV2.Service),
|
||||||
Context.make(QuestionV2.Service, yield* QuestionV2.Service),
|
|
||||||
Context.make(ReadToolFileSystem.Service, yield* ReadToolFileSystem.Service),
|
Context.make(ReadToolFileSystem.Service, yield* ReadToolFileSystem.Service),
|
||||||
Context.make(SessionInstructions.Service, yield* SessionInstructions.Service),
|
Context.make(SessionInstructions.Service, yield* SessionInstructions.Service),
|
||||||
Context.make(SessionTodo.Service, yield* SessionTodo.Service),
|
Context.make(SessionTodo.Service, yield* SessionTodo.Service),
|
||||||
|
|
@ -199,7 +196,6 @@ export const node = makeLocationNode({
|
||||||
Global.node,
|
Global.node,
|
||||||
httpClient,
|
httpClient,
|
||||||
PermissionV2.node,
|
PermissionV2.node,
|
||||||
QuestionV2.node,
|
|
||||||
ReadToolFileSystem.node,
|
ReadToolFileSystem.node,
|
||||||
SessionInstructions.node,
|
SessionInstructions.node,
|
||||||
SessionTodo.node,
|
SessionTodo.node,
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import type {
|
||||||
Part,
|
Part,
|
||||||
Provider,
|
Provider,
|
||||||
PermissionRequest,
|
PermissionRequest,
|
||||||
|
QuestionRequest,
|
||||||
Session,
|
Session,
|
||||||
SessionStatus,
|
SessionStatus,
|
||||||
TextPart,
|
TextPart,
|
||||||
|
|
@ -390,6 +391,7 @@ export type TuiState = {
|
||||||
messages: (sessionID: string) => ReadonlyArray<Message>
|
messages: (sessionID: string) => ReadonlyArray<Message>
|
||||||
status: (sessionID: string) => SessionStatus | undefined
|
status: (sessionID: string) => SessionStatus | undefined
|
||||||
permission: (sessionID: string) => ReadonlyArray<PermissionRequest>
|
permission: (sessionID: string) => ReadonlyArray<PermissionRequest>
|
||||||
|
question: (sessionID: string) => ReadonlyArray<QuestionRequest>
|
||||||
}
|
}
|
||||||
part: (messageID: string) => ReadonlyArray<Part>
|
part: (messageID: string) => ReadonlyArray<Part>
|
||||||
lsp: () => ReadonlyArray<TuiSidebarLspItem>
|
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,
|
tool: request.source?.type === "tool" ? { messageID: request.source.messageID, callID: request.source.callID } : undefined,
|
||||||
}))
|
}))
|
||||||
},
|
},
|
||||||
|
question(sessionID) {
|
||||||
|
return sync.data.question[sessionID] ?? []
|
||||||
|
},
|
||||||
},
|
},
|
||||||
part(messageID) {
|
part(messageID) {
|
||||||
return sync.data.part[messageID] ?? []
|
return sync.data.part[messageID] ?? []
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue