mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-17 01:04:36 +00:00
Remove allowDuringStreaming flag - commands always run immediately
Hook commands now always execute immediately, even during streaming. If a command needs to interact with the LLM, it uses pi.sendMessage() which handles queueing automatically. This simplifies the API and eliminates the issue of queued slash commands being sent to the LLM instead of executing.
This commit is contained in:
parent
f8352bb7d7
commit
575c875475
5 changed files with 66 additions and 78 deletions
|
|
@ -309,7 +309,7 @@ const SNAKE_SAVE_TYPE = "snake-save";
|
|||
export default function (pi: HookAPI) {
|
||||
pi.registerCommand("snake", {
|
||||
description: "Play Snake!",
|
||||
allowDuringStreaming: true, // Run even during streaming, not queued
|
||||
|
||||
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