Skip to content

added professional tone - #906

Open
AniketR10 wants to merge 1 commit into
Nano-Collective:mainfrom
AniketR10:feat/professional-tone
Open

added professional tone#906
AniketR10 wants to merge 1 commit into
Nano-Collective:mainfrom
AniketR10:feat/professional-tone

Conversation

@AniketR10

@AniketR10 AniketR10 commented Aug 19, 2026

Copy link
Copy Markdown

Description

  • before enabling Professional Tone
Pasted image (48)
  • after enabling Professional Tone
Pasted image (47)

Adds a professionalTone preference that switches Nanocoder to a strictly
functional, "boring" output style. Closes #896.

When enabled:

  • Progress text drops its random adjective — the end-of-turn note reads
    Completed in 12s. instead of Worked for a plucky 12s.
  • System prompt gains a ## TONE section instructing the model to stay
    terse: no preamble ("Sure!", "Let me..."), no narration of what it is about
    to do, no celebratory wrap-ups, no emoji, facts only.

Toggle lives at /settingsBehaviorProfessional Tone, and
persists to nanocoder-preferences.json as "professionalTone": true.

Two notes for reviewers:

  1. The completion note was the only whimsical progress string in the codebase —
    every spinner label (Loading..., Executing tool:, Cancelling...) is
    already plain, so the issue's "simplify the progress spinner text" had
    nothing else to act on.
  2. The prompt section applies on the next prompt rebuild (mode switch, model
    switch, or restart), not mid-session, because useChatHandler caches the
    base prompt for KV-cache stability. This matches how reasoningExpanded and
    alternateScreen already behave when changed from the settings panel, and
    is documented in docs/configuration/preferences.md.

Files

  • source/types/config.tsprofessionalTone?: boolean on UserPreferences
  • source/config/preferences.tsgetProfessionalTone / updateProfessionalTone
  • source/utils/completion-note.tsbuildCompletionNote, wired into conversation-loop.tsx
  • source/app/prompts/sections/professional-tone.md — the TONE section
  • source/utils/prompt-builder.ts — gates the section on the preference
  • source/app/components/settings-tabs.tsx — Behavior-tab toggle
  • docs/configuration/preferences.md — documented

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Changeset

  • Added a changeset (pnpm changeset) describing this change for the changelog

Testing

Automated Tests

  • New features include passing tests in .spec.ts/tsx files
  • All existing tests pass (pnpm test:all completes successfully)
  • Tests cover both success and error scenarios

8 new tests across preferences.spec.ts (persistence, default-when-unset,
preserving unrelated keys), completion-note.spec.ts (both phrasings, minute
formatting), prompt-builder.spec.ts (section present/absent, ordering before
the system-info block), and settings-tabs.spec.tsx (row renders on the
Behavior tab).

test:all does not complete on this branch — but it does not complete on a
clean main either. I ran the full AVA suite both ways and diffed the failure
lists:

test:format, test:types, test:lint and test:knip all pass.

Manual Testing

  • Tested with Ollama
  • Tested with OpenRouter
  • Tested with OpenAI-compatible API
  • Tested MCP integration (if applicable)

Manually verified with Google Gemini (gemini-2.5-flash): toggled the
setting in /settings → Behavior, confirmed "professionalTone": true
persisted to the preferences file, and confirmed the completion note switches
phrasing. Also verified the prompt wiring directly:

node -e "import('./dist/utils/prompt-builder.js').then(m=>console.log(m.buildSystemPrompt('normal',undefined,['read_file']).includes('## TONE')))"

which prints true with the preference on and false with it off.

Checklist

  • If this was for an open issue, I was assigned to it
  • Code follows project style guidelines
  • Self-review completed
  • Documentation updated (if needed)
  • No breaking changes (or clearly documented)
  • Appropriate logging added using structured logging — n/a, no new failure paths

Copilot AI lite review requested due to automatic review settings August 19, 2026 19:55

Copilot AI left a comment

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@AniketR10

Copy link
Copy Markdown
Author

@akramcodez plz review

@AniketR10
AniketR10 requested a lite review from Copilot August 20, 2026 11:34

Copilot AI left a comment

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

[Feature] Configurable "Boring" Tone & Output

2 participants