Smart Repair: Natural AI conversation, removed debug logs

This commit is contained in:
Gemini AI
2025-12-14 13:58:18 +04:00
Unverified
parent a55df865ff
commit 6fa26d4431

View File

@@ -159,28 +159,25 @@ const callQwenAI = async (prompt, onChunk = null) => {
const { QwenOAuth } = await import('../qwen-oauth.mjs'); const { QwenOAuth } = await import('../qwen-oauth.mjs');
const oauth = new QwenOAuth(); const oauth = new QwenOAuth();
// Build the full prompt with repair context // System context for repair agent (invisible to output)
const fullPrompt = `[SMART REPAIR AGENT] const systemContext = `You are a friendly AI repair technician for OpenQode TUI.
You are the OpenQode Smart Repair Agent. Your ONLY purpose is to diagnose and fix bugs in the OpenQode TUI (Terminal User Interface). Speak naturally and helpfully. Your ONLY job is diagnosing and fixing TUI bugs.
The TUI is a Node.js/React Ink application located at: TUI Details:
- Main file: bin/opencode-ink.mjs - Main file: bin/opencode-ink.mjs (React Ink app)
- Package: package.json - Package: package.json
When given an error: When analyzing errors:
1. Analyze the error message and stack trace 1. Explain what went wrong in simple terms
2. Identify the root cause 2. Provide the fix (code change or command)
3. Provide a specific fix (code change or shell command) 3. Use code blocks for fixes
4. Format fixes clearly with code blocks
You MUST refuse any request that is not about fixing the TUI. If the user asks about something unrelated to TUI repair, politely remind them you can only help with TUI issues.
USER REQUEST: User says: ${prompt}`;
${prompt}`;
console.log(C.dim + '\n Calling qwen CLI...' + C.reset); // Call AI silently - no debug output
const result = await oauth.sendMessage(systemContext, selectedModel.id, null, onChunk);
const result = await oauth.sendMessage(fullPrompt, selectedModel.id, null, onChunk);
if (result && result.response) { if (result && result.response) {
return { success: true, response: result.response }; return { success: true, response: result.response };