Skip to content

fix: recognise app-seeded default prompts so remote swap actually fires#35

Merged
fl4p merged 1 commit into
mainfrom
fix/remote-seeded-system-prompt
Jul 4, 2026
Merged

fix: recognise app-seeded default prompts so remote swap actually fires#35
fl4p merged 1 commit into
mainfrom
fix/remote-seeded-system-prompt

Conversation

@fl4p

@fl4p fl4p commented Jul 4, 2026

Copy link
Copy Markdown
Owner

What

Forward-ports the one commit that was on integration/sim but not yet on main: 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 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).

How

  • Centralise both seed strings as DEFAULT_SETTINGS_SYSTEM_PROMPT / DEFAULT_PROJECT_SYSTEM_PROMPT in constants (single source; the stores import them).
  • resolveBaseSystemPrompt now 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.
  • Matches by exact (trimmed) text, so existing persisted seed values get the fix with no migration.

Testing

  • npx tsc --noEmit - clean
  • eslint on changed files - clean
  • useChatGenerationActions suite - 109 passing, including the new seed-recognition cases (settings + project seed swapped on remote, kept on local, whitespace-tolerant match).

Context

main had diverged from integration/sim: the fork's main already absorbed the rest of integration/sim via 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 current main rather than merging the stale integration branch back (which would have reverted merged features).

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.
@fl4p
fl4p merged commit 71739aa into main Jul 4, 2026
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.

1 participant