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 @@ -103,11 +103,11 @@ export namespace LLM {
103103 system . push (
104104 [
105105 // use agent prompt otherwise provider prompt
106- ...( input . agent . prompt ? [ input . agent . prompt ] : SystemPrompt . provider ( input . model ) ) ,
106+ ...( input . agent . prompt ? [ input . agent . prompt ] : ( input . user . system ? [ input . user . system ] : SystemPrompt . provider ( input . model ) ) ) ,
107107 // any custom prompt passed into this call
108108 ...input . system ,
109109 // any custom prompt from last user message
110- ...( input . user . system ? [ input . user . system ] : [ ] ) ,
110+ ...( ( input . agent . prompt && input . user . system ) ? [ input . user . system ] : [ ] ) ,
111111 ]
112112 . filter ( ( x ) => x )
113113 . join ( "\n" ) ,
@@ -131,10 +131,10 @@ export namespace LLM {
131131 const base = input . small
132132 ? ProviderTransform . smallOptions ( input . model )
133133 : ProviderTransform . options ( {
134- model : input . model ,
135- sessionID : input . sessionID ,
136- providerOptions : provider . options ,
137- } )
134+ model : input . model ,
135+ sessionID : input . sessionID ,
136+ providerOptions : provider . options ,
137+ } )
138138 const options : Record < string , any > = pipe (
139139 base ,
140140 mergeDeep ( input . model . options ) ,
You can’t perform that action at this time.
0 commit comments