File tree Expand file tree Collapse file tree 2 files changed +2
-14
lines changed
Expand file tree Collapse file tree 2 files changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -85,11 +85,7 @@ export function createSystemPromptHandler(
8585 return
8686 }
8787
88- output . system . push (
89- renderSystemPrompt ( {
90- manual : state . manualMode ,
91- } ) ,
92- )
88+ output . system . push ( renderSystemPrompt ( state . manualMode ) )
9389 }
9490}
9591
Original file line number Diff line number Diff line change @@ -3,11 +3,7 @@ import { SYSTEM as SYSTEM_PROMPT } from "./_codegen/system.generated"
33import { NUDGE } from "./_codegen/nudge.generated"
44import { COMPRESS as COMPRESS_TOOL_SPEC } from "./_codegen/compress.generated"
55
6- export interface ToolFlags {
7- manual : boolean
8- }
9-
10- function renderSystemPromptInternal ( manual : boolean ) : string {
6+ export function renderSystemPrompt ( manual ?: boolean ) : string {
117 let result = SYSTEM_PROMPT
128 result = result . replace ( / \/ \/ .* ?\/ \/ / g, "" )
139
@@ -30,10 +26,6 @@ function extractInstruction(content: string, name: string): string {
3026 return match ? match [ 0 ] : content
3127}
3228
33- export function renderSystemPrompt ( flags ?: ToolFlags ) : string {
34- return renderSystemPromptInternal ( flags ?. manual ?? false )
35- }
36-
3729export function renderNudge ( mode : NudgeMode = "frequency" ) : string {
3830 if ( mode === "context-limit" ) {
3931 return extractInstruction ( NUDGE , "context_buildup_warning" )
You can’t perform that action at this time.
0 commit comments