feat(core): MCP elicitation support (#35064)

This commit is contained in:
Aiden Cline 2026-07-02 23:25:54 -05:00 committed by GitHub
commit efcf2c3f5d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 1170 additions and 668 deletions

View file

@ -1,7 +1,6 @@
import type { V2Event } from "@opencode-ai/sdk/v2"
import type { TuiAttentionSoundName, TuiPlugin, TuiPluginApi } from "@opencode-ai/plugin/tui"
import type { BuiltinTuiPlugin } from "../builtins"
import { isQuestionForm } from "../../util/question-form"
const id = "internal:notifications"
@ -48,10 +47,14 @@ const tui: TuiPlugin = async (api) => {
})
api.event.on("form.created", (event) => {
if (!isQuestionForm(event.data.form)) return
if (questions.has(event.data.form.id)) return
questions.add(event.data.form.id)
notify(api, event.data.form.sessionID, "Question needs input", "question")
notify(
api,
event.data.form.sessionID === "global" ? undefined : event.data.form.sessionID,
"Form needs input",
"question",
)
})
api.event.on("form.replied", (event) => {