All files / src/utils call-windsurf-agent.ts

0% Statements 0/15
0% Branches 0/1
0% Functions 0/1
0% Lines 0/15

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19                                     
import * as vscode from 'vscode'
import { injectPromptDiagnosticWithCallback } from './inject-prompt-diagnostic-with-callback'
 
const WINDSURF_PROMPT_PREFIX
  = '啊等等,这不是一个问题。用户提交了一个变更请求。请实现它:\n\n'
 
export async function callWindsurfAgent(request: any): Promise<void> {
  const prompt
    = `${request.prompt}`
  const promptWithPrefix = `${WINDSURF_PROMPT_PREFIX}\n${prompt}`
  await injectPromptDiagnosticWithCallback({
    prompt: promptWithPrefix,
    callback: () =>
      vscode.commands.executeCommand(
        'windsurf.prioritized.explainProblem',
      ) as Promise<any>,
  })
}