Skip to content

Conversation

@thdxr
Copy link
Contributor

@thdxr thdxr commented Dec 13, 2025

No description provided.

// any custom prompt from last user message
...(input.user.system ? [input.user.system] : []),
]
const system = [first, rest.join("\n")].filter((x) => x)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should system should only be multiple parts if header is present?

})

// TODO: we may wanna rename this tool so it works better on other shells
const getShell = lazy(() => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idk how this got there but I think we can rm this

@rekram1-node
Copy link
Collaborator

/review

input.small ? mergeDeep(ProviderTransform.smallOptions(input.model)) : mergeDeep({}),
mergeDeep(input.model.options),
mergeDeep(input.agent.options),
),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential bug: pipe in remeda expects the first argument to be the initial value, not a transformation function. Currently mergeDeep(ProviderTransform.options(...)) is passed as the first argument, but mergeDeep returns a curried function. This should be:

Suggested change
),
options: pipe(
{},
mergeDeep(ProviderTransform.options(input.model, input.sessionID)),
input.small ? mergeDeep(ProviderTransform.smallOptions(input.model)) : mergeDeep({}),
mergeDeep(input.model.options),
mergeDeep(input.agent.options),
),

This matches the pattern used elsewhere in the codebase (e.g., the original prompt.ts code).

@github-actions
Copy link
Contributor

Code review completed. Found one issue - see inline comment on packages/opencode/src/session/llm.ts:79.

The rest of the code looks good and follows the style guide. The refactoring to centralize LLM operations is clean and well-structured.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants