@@ -19,27 +19,13 @@ export class UserRequestStrategy extends BasePromptStrategy {
1919 return ! ! context . userInput && context . userInput . trim ( ) . length > 0
2020 }
2121
22- /**
23- * Include user input, document, selection, and diagnostics
24- * Exclude recent operations and open files as they're less relevant
25- */
26- getRelevantContext ( context : GhostSuggestionContext ) : Partial < GhostSuggestionContext > {
27- return {
28- document : context . document ,
29- userInput : context . userInput ,
30- range : context . range ,
31- diagnostics : context . diagnostics ,
32- // Explicitly exclude:
33- // - recentOperations (not needed for explicit requests)
34- // - openFiles (reduces token usage)
35- }
36- }
37-
3822 /**
3923 * System instructions specific to user requests
4024 */
41- protected getSpecificSystemInstructions ( ) : string {
42- return `Task: Execute User's Explicit Request
25+ getSystemInstructions ( ) : string {
26+ return (
27+ this . getBaseSystemInstructions ( ) +
28+ `Task: Execute User's Explicit Request
4329You are responding to a direct user instruction. Your primary goal is to fulfill their specific request accurately.
4430
4531Priority Order:
@@ -64,12 +50,13 @@ Common Request Patterns:
6450- "add comments" → add JSDoc or inline comments
6551- "extract function" → move selected code to a new function
6652- "fix" → resolve errors, warnings, or obvious issues`
53+ )
6754 }
6855
6956 /**
7057 * Build the user prompt with all relevant context
7158 */
72- protected buildUserPrompt ( context : Partial < GhostSuggestionContext > ) : string {
59+ getUserPrompt ( context : GhostSuggestionContext ) : string {
7360 let prompt = ""
7461
7562 // User request is the most important part
@@ -139,23 +126,6 @@ Common Request Patterns:
139126 return prompt
140127 }
141128
142- /**
143- * Override to provide more context for certain types of requests
144- */
145- override getUserPrompt ( context : GhostSuggestionContext ) : string {
146- // For certain requests, we might want to include more context
147- const request = context . userInput ?. toLowerCase ( ) || ""
148-
149- // If the request mentions other files or imports, include more context
150- if ( request . includes ( "import" ) || request . includes ( "from" ) ) {
151- // Could potentially include information about available modules
152- // For now, we'll use the standard approach
153- }
154-
155- // Use the standard prompt building
156- return super . getUserPrompt ( context )
157- }
158-
159129 /**
160130 * Gets the file path from the document
161131 */
0 commit comments