File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
packages/opencode/src/session Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -92,11 +92,11 @@ export namespace LLM {
9292 system . push (
9393 [
9494 // use agent prompt otherwise provider prompt
95- ...( input . agent . prompt ? [ input . agent . prompt ] : SystemPrompt . provider ( input . model ) ) ,
95+ ...( input . agent . prompt ? [ input . agent . prompt ] : ( input . user . system && input . agent . name !== "title" ? [ input . user . system ] : SystemPrompt . provider ( input . model ) ) ) ,
9696 // any custom prompt passed into this call
9797 ...input . system ,
9898 // any custom prompt from last user message
99- ...( input . user . system ? [ input . user . system ] : [ ] ) ,
99+ ...( ( input . agent . prompt && input . user . system ) ? [ input . user . system ] : [ ] ) ,
100100 ]
101101 . filter ( ( x ) => x )
102102 . join ( "\n" ) ,
@@ -120,10 +120,10 @@ export namespace LLM {
120120 const base = input . small
121121 ? ProviderTransform . smallOptions ( input . model )
122122 : ProviderTransform . options ( {
123- model : input . model ,
124- sessionID : input . sessionID ,
125- providerOptions : provider . options ,
126- } )
123+ model : input . model ,
124+ sessionID : input . sessionID ,
125+ providerOptions : provider . options ,
126+ } )
127127 const options : Record < string , any > = pipe (
128128 base ,
129129 mergeDeep ( input . model . options ) ,
You can’t perform that action at this time.
0 commit comments