mirror of
https://github.com/iflytek/skillhub.git
synced 2026-11-15 09:11:18 +00:00
Some checks failed
Deploy Docs / build (push) Has been cancelled
Security / Dependency Review (push) Has been cancelled
Security / CodeQL (java-kotlin) (push) Has been cancelled
Security / CodeQL (javascript-typescript) (push) Has been cancelled
Security / CodeQL (python) (push) Has been cancelled
Deploy Docs / Deploy (push) Has been cancelled
Add the native SkillHub plugin for DeepSeek Harness with a scoped skill center, conversation search/install tools, exact-version installation and protected lifecycle management. Prepare the independently versioned 0.1.0 npm candidate with an empty default Registry and documented compatibility limits. Keep formal specifications and executable regression tests; remove archived development screenshots and runtime reports from the final tree. Review fixes cover independent scopes, installed references, pre-staging recovery and idempotent discovery. Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
19 lines
1.1 KiB
TypeScript
19 lines
1.1 KiB
TypeScript
import { describe, expect, test } from 'bun:test';
|
|
import { installedNavigationFor, type InstalledNavigation } from '../src/client/installed-navigation.js';
|
|
|
|
describe('installed navigation context', () => {
|
|
test('retains the same context but discards filters and selection across session or source changes', () => {
|
|
const owner: { installedNavigation?: InstalledNavigation } = {};
|
|
const first = installedNavigationFor(owner, 'session-a', 'source-1');
|
|
first.scope = 'project'; first.keyword = 'document'; first.triggerKey = 'old-target'; first.listScroll = 640;
|
|
expect(installedNavigationFor(owner, 'session-a', 'source-1')).toBe(first);
|
|
const next = installedNavigationFor(owner, 'session-b', 'source-1');
|
|
expect(next).not.toBe(first);
|
|
expect(next.scope).toBe('all'); expect(next.keyword).toBe('');
|
|
expect(next.triggerKey).toBeNull(); expect(next.listScroll).toBe(0);
|
|
next.keyword = 'other';
|
|
const changed = installedNavigationFor(owner, 'session-b', 'source-2');
|
|
expect(changed.keyword).toBe(''); expect(changed.selected).toBeNull();
|
|
expect(installedNavigationFor(owner, 'session-a', 'source-1')).not.toBe(first);
|
|
});
|
|
});
|