fix: recognise app-seeded default prompts so remote swap actually fires#35
Merged
Conversation
The first pass only swapped APP_CONFIG.defaultSystemPrompt, but the app SEEDS settings.systemPrompt (appStore) and the built-in project (projectStore) with their own 'running locally on the user's device' prompts. Since a set prompt wins over the default, that seeded text was used verbatim - so on a remote endpoint the model still answered 'yes, I run locally, nothing is sent to a cloud server' (verified on big-pickle). Centralise both seed strings as DEFAULT_SETTINGS_SYSTEM_PROMPT / DEFAULT_PROJECT_SYSTEM_PROMPT in constants (single source; the stores import them), and have resolveBaseSystemPrompt treat a prompt equal to any app default as not-user-authored: on a remote endpoint it swaps in the honest remote variant, on a local model it keeps the seed text, and a prompt the user actually typed still always wins. Matches by exact (trimmed) text, so existing persisted seed values get the fix with no migration.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Forward-ports the one commit that was on
integration/simbut not yet onmain: the follow-up to the "don't claim to be local/private on a remote endpoint" fix.The first pass only swapped
APP_CONFIG.defaultSystemPrompt, but the app SEEDSsettings.systemPrompt(appStore) and the built-in project (projectStore) with their own "running locally on the user's device" prompts. Since a set prompt wins over the default, that seeded text was used verbatim - so on a remote endpoint the model still answered "yes, I run locally, nothing is sent to a cloud server" (verified on big-pickle).How
DEFAULT_SETTINGS_SYSTEM_PROMPT/DEFAULT_PROJECT_SYSTEM_PROMPTin constants (single source; the stores import them).resolveBaseSystemPromptnow treats a prompt equal to any app default as not-user-authored: on a remote endpoint it swaps in the honest remote variant, on a local model it keeps the seed text, and a prompt the user actually typed still always wins.Testing
npx tsc --noEmit- cleanuseChatGenerationActionssuite - 109 passing, including the new seed-recognition cases (settings + project seed swapped on remote, kept on local, whitespace-tolerant match).Context
mainhad diverged fromintegration/sim: the fork'smainalready absorbed the rest ofintegration/simvia the forward-port PR (#26) plus later squash-merges, leaving this single commit (da809c21) as the only real delta. This PR lands it cleanly on top of currentmainrather than merging the stale integration branch back (which would have reverted merged features).