Some checks failed
ci / Validate workspace (push) Successful in 12m32s
landing-page-ci / Validate landing page (push) Successful in 9m41s
landing-page-deploy / Deploy landing page (push) Failing after 5m23s
github-metrics / Generate repository metrics SVG (push) Failing after 2m3s
refresh-contributors-wall / Refresh contributors wall cache bust (push) Failing after 11s
This repository contains the open-design daemon CLI source code, built and packaged at https://helix-mind.ai/cli/open-design/latest.tgz for use by the HelixMind /design slash command. Licenses: Apache-2.0 (root) + MIT (skills/*)
43 lines
1.8 KiB
TypeScript
43 lines
1.8 KiB
TypeScript
import { describe, expect, it } from 'vitest';
|
|
import { apiProtocolLabel, apiProtocolModelLabel } from '../../src/utils/apiProtocol';
|
|
import {
|
|
agentDisplayName,
|
|
agentModelDisplayName,
|
|
exactAgentDisplayName,
|
|
} from '../../src/utils/agentLabels';
|
|
|
|
describe('api protocol labels', () => {
|
|
it('labels the selected API protocol instead of assuming Anthropic', () => {
|
|
expect(apiProtocolLabel('openai')).toBe('OpenAI API');
|
|
expect(apiProtocolLabel('google')).toBe('Google Gemini');
|
|
expect(apiProtocolLabel(undefined)).toBe('Anthropic API');
|
|
});
|
|
|
|
it('includes the selected model when labeling API assistant messages', () => {
|
|
expect(apiProtocolModelLabel('openai', 'google/gemma-4-e4b')).toBe(
|
|
'OpenAI API · google/gemma-4-e4b',
|
|
);
|
|
expect(apiProtocolModelLabel('azure', ' ')).toBe('Azure OpenAI');
|
|
});
|
|
|
|
it('includes explicit local CLI models when labeling agent messages', () => {
|
|
expect(agentModelDisplayName('claude', 'Claude Code', 'claude-sonnet-4-6')).toBe(
|
|
'Claude · claude-sonnet-4-6',
|
|
);
|
|
expect(agentModelDisplayName('claude', 'Claude Code', 'default')).toBe('Claude');
|
|
});
|
|
|
|
it('normalizes Qoder local CLI ids, aliases, and executable paths', () => {
|
|
expect(agentDisplayName('qoder')).toBe('Qoder');
|
|
expect(exactAgentDisplayName('qodercli')).toBe('Qoder');
|
|
expect(exactAgentDisplayName('Qoder CLI')).toBe('Qoder');
|
|
expect(agentDisplayName('/opt/homebrew/bin/qodercli')).toBe('Qoder');
|
|
expect(agentDisplayName('C:\\Tools\\qodercli.cmd')).toBe('Qoder');
|
|
});
|
|
|
|
it('includes explicit Qoder models but hides the default model', () => {
|
|
expect(agentModelDisplayName('qoder', 'Qoder CLI', 'ultimate')).toBe('Qoder · ultimate');
|
|
expect(agentModelDisplayName('qoder', 'Qoder CLI', 'default')).toBe('Qoder');
|
|
});
|
|
});
|