Skip to content

Refactor: move model config parsing from renderer to main process via…#425

Open
tusharmagar wants to merge 1 commit intodevfrom
refactor/models-config-ipc
Open

Refactor: move model config parsing from renderer to main process via…#425
tusharmagar wants to merge 1 commit intodevfrom
refactor/models-config-ipc

Conversation

@tusharmagar
Copy link
Copy Markdown
Collaborator

addresses code smells

… IPC

The renderer was reading config/models.json via workspace:readFile and
manually parsing the provider/model structure. This moves that logic into
a dedicated models:getConfiguredModels IPC handler backed by a new
getAllConfiguredModels() method on the model config repo, matching the
existing models:saveConfig pattern.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
rowboat Ready Ready Preview, Comment Mar 16, 2026 6:10am

Request Review

}

async getAllConfiguredModels(): Promise<z.infer<typeof ConfiguredModelsResult>> {
const raw = await fs.readFile(this.configPath, "utf8");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why not call this.getConfig() which already does the internals of reading?

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.

2 participants