The thinking row and the header menu both carry Stop while a bot has work open for the user anywhere: every pending or processing job of that bot in their conversations is failed as stopped, its task closed, a Stopped step recorded and one closing message posted per session, so the thread stops waiting and the bot goes idle. The handler running the job is aborted from this process through a registry, so a job stuck waiting on a model stops at once instead of on its next heartbeat, and a late face change after the abort is dropped. The release stage is now said in the app too: Settings > General reports "Cobble v0.1.5 (alpha)" next to development, and the README and RELEASING.md say what alpha means for installs.
22 lines
646 B
TypeScript
22 lines
646 B
TypeScript
import React from "react";
|
|
import type { StopBot } from "../(hooks)/use-stop-bot";
|
|
|
|
export type StopBotState = StopBot & {
|
|
/**
|
|
* The bot has something open for the signed-in user right now (a reply
|
|
* it owes, a task it's on, a wait for a model or a computer), so
|
|
* stopping it has something to pull the plug on.
|
|
*/
|
|
can_stop: boolean;
|
|
};
|
|
|
|
/**
|
|
* The conversation's stop control, shared by the thinking row under the
|
|
* thread and the header's menu, so both pull the same plug.
|
|
*/
|
|
export const StopBotContext = React.createContext<StopBotState>({
|
|
stop: async () => {},
|
|
stopping: false,
|
|
can_stop: false,
|
|
});
|