sourcegraph / cody

AI that knows your entire codebase
https://cody.dev
Apache License 2.0
2.23k stars 213 forks source link

bug: autocomplete not working "Expected to receive exactly one message with the prompt" #4639

Open quentin-lior opened 1 week ago

quentin-lior commented 1 week ago

Version

1.22.4

Describe the bug

My Cody autocomplete is not working (the setting "Enables code autocompletions" is checked), but the chat feature is working fine. In the ouptut console, I noticed the following errors

getInlineCompletions:error: error parsing CodeCompletionResponse: Error: {"error":"Expected to receive exactly one message with the prompt"} Error: error parsing CodeCompletionResponse: Error: {"error":"Expected to receive exactly one message with the prompt"} at /Users/quentin/.vscode/extensions/sourcegraph.cody-ai-1.22.4/src/completions/client.ts:224:27 at processTicksAndRejections (node:internal/process/task_queues:95:5) at generatorWithTimeout (/Users/quentin/.vscode/extensions/sourcegraph.cody-ai-1.22.4/src/completions/utils.ts:84:37) at generatorWithErrorObserver (/Users/quentin/.vscode/extensions/sourcegraph.cody-ai-1.22.4/src/completions/utils.ts:51:29) at fetchAndProcessDynamicMultilineCompletions (/Users/quentin/.vscode/extensions/sourcegraph.cody-ai-1.22.4/src/completions/providers/fetch-and-process-completions.ts:92:62) at async Promise.all (index 0) at zipGenerators (/Users/quentin/.vscode/extensions/sourcegraph.cody-ai-1.22.4/src/completions/utils.ts:34:21) at generateCompletions (/Users/quentin/.vscode/extensions/sourcegraph.cody-ai-1.22.4/src/completions/request-manager.ts:118:34)

Expected behavior

Cody should propose autocomplete functionality when starting to write code in editor

Additional context

I am working on python files right now.

pedanticgeek commented 3 days ago

Same here. VSCode: 1.90.2 MacOS: 14.4.1 Cody: 1.24

Working with TypeScript