feat: v1.2 answer overhaul — single format + natural answers, coding solver, pronunciation#20
Merged
Merged
Conversation
Collapse the two overlapping answer-control axes into one. Delete AnswerStyle (default/star/technical/conversational — muddy + underused) and promote length into a single AnswerFormat = key_points | explanation | detailed: - key_points: terse glanceable bullets (cap 220 tok). - explanation (NEW): a natural, flowing first-person explanation (cap 340 tok). - detailed: thorough, with one concrete example (cap 800 tok). answer.ts merges STYLE_INSTRUCTION + LENGTH_INSTRUCTION into FORMAT_INSTRUCTION, adds a naturalness / anti-AI directive (contractions, varied sentence length, banned corporate/AI tells + hedging, first-person — no fake "um"/"uh"), and keeps the citation + fabrication-guard rules. The single `format` field is threaded through AnswerPrefs, sessionManager, session.ipc, preload, mockManager, the store, and the pages; the Cue Card's two controls collapse into one 3-way Format toggle. Removed Profile.answerStyle — the answer_style DB column is kept (default 'concise') but unused, so NO migration. Fixes an e2e regression (session.start old positional args) caught by the adversarial review; typecheck couldn't see it (inside page.evaluate). Verified: typecheck · 104 unit · build green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…v1.2 #2) Upgrade the coding solver (screenshot/clipboard mode). CODING_RULES becomes codingRules(language): - Writes the solution in a chosen language (default javascript), with REQUIRED clear inline comments. - Explanation-first delivery: a natural Approach paragraph, then the code. - Keeps the OPTIMALITY mandate + explicit time/space complexity. - Stays résumé/JD-free (a coding problem is unrelated to the profile). solveFromOcr(text, language) / solveFromImages(dataUrls, language) build the system prompt per-call; codingMode threads a persisted `codingLanguage` setting (default javascript) into every solve. New AppSettings.codingLanguage + SETTINGS_KEYS.codingLanguage (in APP_SETTING_KEYS), persisted via settings.set; a 12-language dropdown in the Cue Card coding controls (mirrors the model/effort pickers). Adversarial review: no findings. Verified: typecheck · 104 unit · build green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Pronunciation is ON by default (still toggleable). The answer stays clean — no inline respellings; instead, for genuinely hard words the model appends a [[PRONUNCIATION]] section (one pipe line per word: word | pos | singular | respelling), which the Cue Card renders as a structured "🗣 How to say it" panel below the answer. +160 max_output_tokens headroom when on so the guide can't eat the answer. goLive defaults pronunciation=true (live-state + broadcast). Parsing extracted to overlay/pronunciation.ts (splitPronunciation) and hardened per adversarial review (5 confirmed parser-robustness findings, all model-output variance): - respelling taken as the LAST field → 2/3/4-field lines all parse (a dropped optional singular no longer drops the word); - marker match case/space-insensitive + strips trailing partial prefixes ([[, [[P, [[PR, [[PRO) so nothing flickers into the body while streaming; - —/–/-/n/a/none singular placeholders normalize to empty. Locked with pronunciation.test.ts (+8). Verified: typecheck · 113 unit · build green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
No description provided.