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:
@@ -29,14 +29,6 @@ export default function (pi: HookAPI) {
|
||||
return box;
|
||||
});
|
||||
|
||||
pi.registerCommand("no-stream", {
|
||||
description: "Send a message without streaming",
|
||||
handler: async (ctx) => {
|
||||
ctx.ui.notify("Sending message after streaming is done...");
|
||||
},
|
||||
allowDuringStreaming: true,
|
||||
})
|
||||
|
||||
// Register /test-msg command
|
||||
pi.registerCommand("test-msg", {
|
||||
description: "Send a test custom message",
|
||||
|
||||
Reference in New Issue
Block a user