The open source AI video agent: turns any coding agent into a video agent, with an editor to change anything it makes.
Desktop: DeepSeek Harness's models are named model first, so the chosen one shows its name (#239)
riverisbuildingb7ceeaab780b
diff --git a/.changeset/model-name-first.md b/.changeset/model-name-first.mdnew file mode 100644index 0000000..dbc7b9d--- /dev/null+++ b/.changeset/model-name-first.md@@ -0,0 +1,5 @@+---+"@openfilm/desktop": patch+---++DeepSeek Harness: each model in the menu is its name, then where it runs ("DeepSeek-V4-Pro · DeepSeek Account"), and the chosen one shows as its name ("DeepSeek-V4-Pro"), not "DeepSeek Account".diff --git a/apps/desktop/src/agents.mjs b/apps/desktop/src/agents.mjsindex 5dc2f5d..fa39328 100644--- a/apps/desktop/src/agents.mjs+++ b/apps/desktop/src/agents.mjs@@ -969,7 +969,8 @@ export function legacyOptions(session) {* Config options with each choice once: an agent may list the same value twice (GitHub Copilot's model list has* "Auto" twice), which the menu would show twice, both ticked. The first of each is kept; anything else as it was.* Choices in groups (DeepSeek Harness groups its models by where they run: its API, the person's DeepSeek account)- * are listed one after another, each named with its group's name.+ * are listed one after another, each named by itself, then its group's name ("DeepSeek-V4-Pro · DeepSeek Account"):+ * the menu's button shows the part before the dot, the model.*/export function distinctOptions(configOptions) {if (!Array.isArray(configOptions)) return configOptions;@@ -977,7 +978,7 @@ export function distinctOptions(configOptions) {if (!Array.isArray(o?.options)) return o;const seen = new Set();const choices = o.options.flatMap((c) => (Array.isArray(c?.options) && !('value' in c)- ? c.options.map((g) => (g && typeof c.name === 'string' && c.name ? { ...g, name: `${c.name} · ${g.name}` } : g))+ ? c.options.map((g) => (g && typeof c.name === 'string' && c.name ? { ...g, name: `${g.name} · ${c.name}` } : g)): [c]));return { ...o, options: choices.filter((c) => !c || !('value' in c) || (!seen.has(c.value) && seen.add(c.value))) };});diff --git a/apps/desktop/src/agents.test.mjs b/apps/desktop/src/agents.test.mjsindex 01df0f5..60f3782 100644--- a/apps/desktop/src/agents.test.mjs+++ b/apps/desktop/src/agents.test.mjs@@ -35,7 +35,7 @@ test('a choice an agent lists twice shows once in the menu', () => {assert.equal(distinctOptions(null), null);});-test("choices an agent lists in groups show one after another, each with its group's name", () => {+test("choices an agent lists in groups show one after another, each named by itself, then its group's name: the model first", () => {/* DeepSeek Harness 0.2.0 groups its models by where they run */const [model, effort] = distinctOptions([{ id: 'model', currentValue: '["deepseek-official","deepseek-v4-flash"]', options: [@@ -45,8 +45,8 @@ test("choices an agent lists in groups show one after another, each with its gro{ id: 'reasoning_effort', currentValue: 'high', options: [{ value: 'high', name: 'High' }] },]);assert.deepEqual(model.options, [- { value: '["deepseek-official","deepseek-v4-flash"]', name: 'DeepSeek · deepseek-v4-flash' },- { value: '["deepseek-account","deepseek-flash"]', name: 'DeepSeek Account · DeepSeek-V41-Flash', description: 'Fast' },+ { value: '["deepseek-official","deepseek-v4-flash"]', name: 'deepseek-v4-flash · DeepSeek' },+ { value: '["deepseek-account","deepseek-flash"]', name: 'DeepSeek-V41-Flash · DeepSeek Account', description: 'Fast' },]);assert.deepEqual(effort.options, [{ value: 'high', name: 'High' }]);});