mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 20:03:05 +00:00
Add immediate flag to hook commands for non-queued execution
Commands with immediate: true run right away even during streaming. Used for UI-only commands like /snake that don't interact with LLM.
This commit is contained in:
parent
165fb58b39
commit
818196d2c3
3 changed files with 21 additions and 1 deletions
|
|
@ -233,6 +233,7 @@ class SnakeComponent {
|
|||
export default function (pi: HookAPI) {
|
||||
pi.registerCommand("snake", {
|
||||
description: "Play Snake!",
|
||||
immediate: true, // Run immediately, even during streaming
|
||||
handler: async (ctx) => {
|
||||
if (!ctx.hasUI) {
|
||||
ctx.ui.notify("Snake requires interactive mode", "error");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue