The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.
TypeScript agentai-chatai-studioall-in-onecoding-agentdesktop-appfluximage-generationlinuxllmlocal-ailocal-llmopen-sourceprivacyself-hostedstable-diffusionuncensoreduncensored-aivideo-generationwindows
/**
* "Restart engine" while the model on this phone writes an answer.
*
* The restart cut the answer without a word (acceptance iPhone, second part,
* P3). The engine page asks first when a chat is between its send and its
* end. Pure, so the rule has a test: `pending` is what hooks/useChat keeps
* per conversation for a running plain chat send.
*/
export function answerIsRunning(pending: Record<string, unknown> | null | undefined): boolean {
return !!pending && Object.keys(pending).length > 0
}