Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: missing preamble in edit commands #2716

Merged
merged 2 commits into from
Jan 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion vscode/src/edit/prompt/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as vscode from 'vscode'

import { BotResponseMultiplexer } from '@sourcegraph/cody-shared/src/chat/bot-response-multiplexer'
import { getSimplePreamble } from '@sourcegraph/cody-shared/src/chat/preamble'
import { Transcript } from '@sourcegraph/cody-shared/src/chat/transcript'
import { Interaction } from '@sourcegraph/cody-shared/src/chat/transcript/interaction'
import { type CodebaseContext } from '@sourcegraph/cody-shared/src/codebase-context'
Expand Down Expand Up @@ -107,7 +108,8 @@ export const buildInteraction = async ({
[]
)
transcript.addInteraction(interaction)
const completePrompt = await transcript.getPromptForLastInteraction()
const preamble = getSimplePreamble()
const completePrompt = await transcript.getPromptForLastInteraction(preamble)

return {
messages: completePrompt.prompt,
Expand Down
Loading