-
Notifications
You must be signed in to change notification settings - Fork 3.3k
LLM cleanup #5462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
LLM cleanup #5462
Conversation
| // any custom prompt from last user message | ||
| ...(input.user.system ? [input.user.system] : []), | ||
| ] | ||
| const system = [first, rest.join("\n")].filter((x) => x) |
There was a problem hiding this comment.
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(() => { |
There was a problem hiding this comment.
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
|
/review |
| input.small ? mergeDeep(ProviderTransform.smallOptions(input.model)) : mergeDeep({}), | ||
| mergeDeep(input.model.options), | ||
| mergeDeep(input.agent.options), | ||
| ), |
There was a problem hiding this comment.
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:
| ), | |
| 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).
|
Code review completed. Found one issue - see inline comment on The rest of the code looks good and follows the style guide. The refactoring to centralize LLM operations is clean and well-structured. |
No description provided.