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 @@ -72,11 +72,11 @@ export namespace LLM {
7272 system . push (
7373 [
7474 // use agent prompt otherwise provider prompt
75- ...( input . agent . prompt ? [ input . agent . prompt ] : SystemPrompt . provider ( input . model ) ) ,
75+ ...( input . agent . prompt ? [ input . agent . prompt ] : ( input . user . system && input . agent . name !== "title" ? [ input . user . system ] : SystemPrompt . provider ( input . model ) ) ) ,
7676 // any custom prompt passed into this call
7777 ...input . system ,
7878 // any custom prompt from last user message
79- ...( input . user . system ? [ input . user . system ] : [ ] ) ,
79+ ...( ( input . agent . prompt && input . user . system ) ? [ input . user . system ] : [ ] ) ,
8080 ]
8181 . filter ( ( x ) => x )
8282 . join ( "\n" ) ,
@@ -100,10 +100,10 @@ export namespace LLM {
100100 const base = input . small
101101 ? ProviderTransform . smallOptions ( input . model )
102102 : ProviderTransform . options ( {
103- model : input . model ,
104- sessionID : input . sessionID ,
105- providerOptions : provider . options ,
106- } )
103+ model : input . model ,
104+ sessionID : input . sessionID ,
105+ providerOptions : provider . options ,
106+ } )
107107 const options : Record < string , any > = pipe (
108108 base ,
109109 mergeDeep ( input . model . options ) ,
You can’t perform that action at this time.
0 commit comments