chore: extract hardcoded URL placeholders into shared constants#169
Conversation
|
Hey, thanks for opening this PR! The CI runs are failing due to a transient GitHub Actions git fetch error, the runners couldn't check out the branch, so none of the tests or build steps actually ran. No issues with your code. I'll be re-running the jobs periodically until they go through cleanly. |
There was a problem hiding this comment.
Looks like DEFAULT_OLLAMA_URL, DEFAULT_SEARXNG_URL, and DEFAULT_READER_URL are already declared in src-tauri/src/config/defaults.rs. The settings tabs already receive the resolved config as a prop via ConfigContext, so the placeholder values can come from there directly. Could we drop src/config/constants.ts and use that existing source of truth instead?
There was a problem hiding this comment.
We could, for example it would just look like placeholder={config.inference.ollama_url} in src/settings/tabs/ModelTab.tsx. I figured there might be a reason to have the placeholders strings configured in a different place than the actual resolved url values coming from tauri but otherwise there isn't a point in having src/config/constants.ts. Lmk and I can fix for using defaults.rs instead if preferred
There was a problem hiding this comment.
I would prefer to place it in src-tauri/src/config/defaults.rs to avoid duplicated code and maintain a single source of truth for the configs. This makes maintenance easier and helps keep things consistent.
|
Also kindly update the PR title to match conventional git commit guidelines as we use the Google release-please workflow to automate releases based on the commit message. This fits as a chore: commit. |
6304ad6 to
42cbed2
Compare
42cbed2 to
67b2b38
Compare
Description
Fixes #138
Changes
Checklist
bun run test:all:coveragepasses with 100% coveragebun run validate-buildpasses with zero warnings and zero errorsfeat:,fix:, etc.) so the changelog is generated automatically