I'm building a plugin that registers a custom route with
api.route.register(). When the user navigates to that route,
Ctrl+C, Ctrl+D, and leader+q all do nothing. The only way out is
killing the process from another terminal.
This happens because exitOnCtrlC is set to false in app.tsx, and
the three existing keyboard handlers that compensate for it
(dialog handler, session handler, selection handler) all have
guards that skip plugin routes. There's no fallback handler for
route.data.type === "plugin".
Minimal repro:
export default {
name: "repro",
setup(api) {
api.route.register("repro", () =>
Trapped.)
api.command.register("repro", {
description: "Go to repro route",
run: () => api.route.navigate("repro"),
})
},
}
Navigate to the route, press Ctrl+C. Nothing happens.
This is related to #2999 and #6644 but scoped narrowly to plugin
routes only. Not proposing any changes to the broader Ctrl+C
behavior.
OpenCode version: 1.3.3
OS: Ubuntu 24.04.4 LTS (WSL2 — Linux
5.15.167.4-microsoft-standard-WSL2)
Terminal: WSL2 default terminal
I'm building a plugin that registers a custom route with
api.route.register(). When the user navigates to that route,
Ctrl+C, Ctrl+D, and leader+q all do nothing. The only way out is
killing the process from another terminal.
This happens because exitOnCtrlC is set to false in app.tsx, and
the three existing keyboard handlers that compensate for it
(dialog handler, session handler, selection handler) all have
guards that skip plugin routes. There's no fallback handler for
route.data.type === "plugin".
Minimal repro:
export default {
name: "repro",
setup(api) {
api.route.register("repro", () =>
Trapped.)
api.command.register("repro", {
description: "Go to repro route",
run: () => api.route.navigate("repro"),
})
},
}
Navigate to the route, press Ctrl+C. Nothing happens.
This is related to #2999 and #6644 but scoped narrowly to plugin
routes only. Not proposing any changes to the broader Ctrl+C
behavior.
OpenCode version: 1.3.3
OS: Ubuntu 24.04.4 LTS (WSL2 — Linux
5.15.167.4-microsoft-standard-WSL2)
Terminal: WSL2 default terminal