Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ claudedocs/**/*.htm
# Markdown left to the author — Prettier bloats tables and rewraps prose.
*.md
**/*.md
# Diagnostic artifacts from chrome-auth-test infrastructure (PR #39+).
.venv-chrome-auth
playwright/.auth
*.d.ts
9 changes: 8 additions & 1 deletion src/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,14 @@ app.post('/internal/form/compose-rule-submit', async (c) => {

let llmModel = 'gpt-5.4-mini';
try {
llmModel = ((await settings.get('openaiModel')) as string) || 'gpt-5.4-mini';
// Same SELECTION-array unwrap as callOpenAI (PR #39). The submit handler
// stores `llmModel` into the draft bundle as metadata; without this
// unwrap, the draft.llmModel field would hold `["gpt-5.4-mini"]` instead
// of `"gpt-5.4-mini"`, breaking later parses of the bundle.
const rawModel = await settings.get('openaiModel');
let unwrapped: unknown = rawModel;
if (Array.isArray(rawModel) && rawModel.length > 0) unwrapped = rawModel[0];
if (typeof unwrapped === 'string' && unwrapped.trim()) llmModel = unwrapped.trim();
} catch (err) {
console.warn('[vibe-mod] submit: settings.get(openaiModel) threw — using default:', describeErr(err));
}
Expand Down