- Bottom-right FAB (56px, prism ring) with active-run count, pulse and latest status summary; turns into "collapse" beside the open drawer; hidden on the Agent page and while the mini dock shows; lifts above bottom floating bars - Ctrl/Cmd+J toggles the drawer, Esc closes; input is focused on open - Emphasized Agent entry at the top of the sidebar (expanded and collapsed) with active-run count; header button kept only below xl - Drawer first screen offers 3 page-aware quick goals that fill the input - Respects reduced motion; AgentShortcutsHelp exported for the settings page Co-Authored-By: Claude Opus 5.5 <[email protected]>
14 lines
590 B
TypeScript
14 lines
590 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { quickGoalsFor } from "./quick-goals.ts";
|
|
|
|
describe("抽屉快捷目标", () => {
|
|
it("按页面给 3 个相关目标", () => {
|
|
expect(quickGoalsFor("/console/library/abc")[0]).toBe("检查这部作品缺什么版本");
|
|
expect(quickGoalsFor("/console/sites/hdsky")[0]).toBe("从这个站找 ");
|
|
expect(quickGoalsFor("/console/tasks/t1")[0]).toBe("看看为什么没进展");
|
|
for (const p of ["/console", "/console/library", "/console/files", "/nope"]) {
|
|
expect(quickGoalsFor(p)).toHaveLength(3);
|
|
}
|
|
});
|
|
});
|