fix(tui): route question responses by session directory (#30578)
This commit is contained in:
@@ -1256,7 +1256,10 @@ export function Session() {
|
|||||||
<PermissionPrompt request={permissions()[0]} />
|
<PermissionPrompt request={permissions()[0]} />
|
||||||
</Show>
|
</Show>
|
||||||
<Show when={permissions().length === 0 && questions().length > 0}>
|
<Show when={permissions().length === 0 && questions().length > 0}>
|
||||||
<QuestionPrompt request={questions()[0]} />
|
<QuestionPrompt
|
||||||
|
request={questions()[0]}
|
||||||
|
directory={sync.session.get(questions()[0].sessionID)?.directory}
|
||||||
|
/>
|
||||||
</Show>
|
</Show>
|
||||||
<Show when={session()?.parentID}>
|
<Show when={session()?.parentID}>
|
||||||
<SubagentFooter />
|
<SubagentFooter />
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import { useBindings, useOpencodeModeStack } from "../../keymap"
|
|||||||
|
|
||||||
const QUESTION_MODE = "question"
|
const QUESTION_MODE = "question"
|
||||||
|
|
||||||
export function QuestionPrompt(props: { request: QuestionRequest }) {
|
export function QuestionPrompt(props: { request: QuestionRequest; directory?: string }) {
|
||||||
const sdk = useSDK()
|
const sdk = useSDK()
|
||||||
const { theme } = useTheme()
|
const { theme } = useTheme()
|
||||||
const renderer = useRenderer()
|
const renderer = useRenderer()
|
||||||
@@ -49,6 +49,7 @@ export function QuestionPrompt(props: { request: QuestionRequest }) {
|
|||||||
const answers = questions().map((_, i) => store.answers[i] ?? [])
|
const answers = questions().map((_, i) => store.answers[i] ?? [])
|
||||||
void sdk.client.question.reply({
|
void sdk.client.question.reply({
|
||||||
requestID: props.request.id,
|
requestID: props.request.id,
|
||||||
|
directory: props.directory,
|
||||||
answers,
|
answers,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -56,6 +57,7 @@ export function QuestionPrompt(props: { request: QuestionRequest }) {
|
|||||||
function reject() {
|
function reject() {
|
||||||
void sdk.client.question.reject({
|
void sdk.client.question.reject({
|
||||||
requestID: props.request.id,
|
requestID: props.request.id,
|
||||||
|
directory: props.directory,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,6 +73,7 @@ export function QuestionPrompt(props: { request: QuestionRequest }) {
|
|||||||
if (single()) {
|
if (single()) {
|
||||||
void sdk.client.question.reply({
|
void sdk.client.question.reply({
|
||||||
requestID: props.request.id,
|
requestID: props.request.id,
|
||||||
|
directory: props.directory,
|
||||||
answers: [[answer]],
|
answers: [[answer]],
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user