Fix abort detection to use message stopReason instead of global isStreaming
When abort happens during tool call streaming, the tool result should show as aborted. Previously used global isStreaming state which would flip when new messages streamed in, causing spinner to reappear incorrectly. Changes: - Use message.stopReason === "aborted" to detect aborted tool calls - Create synthetic error result for aborted tool calls in ToolMessage component - Fix Ollama provider key test to return true (can't know which model to test) - Add newline before HTML execution logs in artifacts update
This commit is contained in:
@@ -45,7 +45,8 @@ export class ProviderKeyInput extends LitElement {
|
||||
private async testApiKey(provider: string, apiKey: string): Promise<boolean> {
|
||||
try {
|
||||
const modelId = TEST_MODELS[provider];
|
||||
if (!modelId) return false;
|
||||
// Returning true here for Ollama and friends. Can' know which model to use for testing
|
||||
if (!modelId) return true;
|
||||
|
||||
let model = getModel(provider as any, modelId);
|
||||
if (!model) return false;
|
||||
|
||||
Reference in New Issue
Block a user