Refactor to support more sections in the future

This commit is contained in:
Matt Rubens
2025-01-14 07:55:16 -05:00
parent 75e308b033
commit 092a121a37
12 changed files with 116 additions and 95 deletions

View File

@@ -3,7 +3,6 @@ import '@testing-library/jest-dom'
import PromptsView from '../PromptsView'
import { ExtensionStateContext } from '../../../context/ExtensionStateContext'
import { vscode } from '../../../utils/vscode'
import { defaultPrompts } from '../../../../../src/shared/modes'
// Mock vscode API
jest.mock('../../../utils/vscode', () => ({
@@ -97,7 +96,7 @@ describe('PromptsView', () => {
expect(vscode.postMessage).toHaveBeenCalledWith({
type: 'updatePrompt',
promptMode: 'code',
customPrompt: 'New prompt value'
customPrompt: { roleDefinition: 'New prompt value' }
})
})
@@ -110,7 +109,7 @@ describe('PromptsView', () => {
expect(vscode.postMessage).toHaveBeenCalledWith({
type: 'updatePrompt',
promptMode: 'code',
customPrompt: defaultPrompts.code
customPrompt: { roleDefinition: undefined }
})
})