Skip to content

fix(server): title prompt names the session and uses the user's language - #285

Open
inverteum wants to merge 1 commit into
GoDiao:mainfrom
inverteum:fix/277-session-title-prompt
Open

inverteum wants to merge 1 commit into
GoDiao:mainfrom
inverteum:fix/277-session-title-prompt

Conversation

@inverteum

Copy link
Copy Markdown

What

Adds two instructions to the server session-title system prompt in src/server/services/titleService.ts (T-SYS-09 / #277):

  1. This is a title-generation task, not a conversation — never answer or fulfill the user's message.
  2. Write the title in the user's primary language.

Also adds a regression test that captures the upstream system field and asserts those phrases are present, and a CHANGELOG entry under ## [Unreleased] → Fixed.

Why

Without those lines, a model may answer the first user message instead of naming the session (long answers are discarded and the placeholder title stays), or produce an English title for a non-English conversation.

How it was tested

  • Confirmed the new test fails on unmodified main prompt text and passes with this change.
  • bun run prepare:ripgrep
  • bun test ./src/server/__tests__/title-service.test.ts: 16 pass, 0 fail
  • bun test --randomize --seed=1 ./src/server/__tests__/title-service.test.ts: 16 pass, 0 fail
  • cd desktop && bun run lint: pass
  • cd desktop && bun run test -- --run: 3119 pass, 4 skipped, 0 fail
  • Full bun test: 2889 pass, 2 skip, 21 fail. All 21 failures are 5s timeouts in SessionService / Sessions API / ArtifactService worktree and artifact tests. None are in title-service. A sample of one of those timed-out tests (should move repository metadata into the CLI worktree transcript) passes when run alone (101 ms). These look like full-suite resource contention in this Linux environment, not regressions from this prompt-text change.
  • Optional third-party model before/after sample: skipped (would need provider credentials and is optional in the issue).

Scope

Does not change #279, #274, or other #270 sub-issues.

Closes #277

Tell the session-title model this is naming, not conversation: never answer
or fulfill the message, and write the title in the user's primary language.

Closes GoDiao#277

This branch has not been deployed

No deployments
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.

Harness: session title prompt should not answer the message and should use the user's language

1 participant