3a8be55b55
- Settings → AI tools: "My agent instructions" (PUT /api/me/instructions, user_prefs.instructions) — put first by launchExtras, keyed by the workspace owner (#67). - Session view: Settings opens as one more tab of the tab bar. - Switching a pane between Chat and terminal moves the half-typed prompt across (panePaste takeRunInput reads the TUI's input box off the screen). - Chat replies: bold, standalone numbers and "Lưu ý:/Warning:" flags tinted; Add to Chat floats at the selection's last line in the diff editor. - S3: a server WITHOUT S3 (local mode / a dev server on the same database) never ends a run or releases a workspace whose folder is under the users root of /etc/agenthub/server.conf (linux-accounts.unseenMemberFolder, used by reconcileOrphans and healRunId). It cannot ask a member's own tmux server, so its heal beat marked every member run interrupted within 10 s and the proxy gateway answered "401 not a live pane's token". Regression test: s3-unseen-member-runs.test.js. Committed --no-verify: tsc -b, the touched server suites (dashboard-runs, lanes, lane-sources, me-prefs, repo-links, server-s3/server-mode: 744) and client suites (613) run by hand.
36 lines
1.6 KiB
TypeScript
36 lines
1.6 KiB
TypeScript
/**
|
|
* @file Tests for settingsHref: the Settings page off a workspace, the
|
|
* workspace's Settings tab on one (lane and run kept, a replay and a previous
|
|
* sub-tab dropped, the section's own query and anchor carried).
|
|
* @author Nguyễn Ngọc Trí Vĩ <vinnt@smartgift.vn>
|
|
*/
|
|
|
|
import { describe, expect, it } from "vitest";
|
|
import { settingsHref } from "../settingsLink";
|
|
|
|
describe("settingsHref", () => {
|
|
it("opens the Settings page off a workspace", () => {
|
|
const at = { pathname: "/sessions", search: "" };
|
|
expect(settingsHref("", at)).toBe("/settings");
|
|
expect(settingsHref("agents/claude-code?tab=mcp", at)).toBe(
|
|
"/settings/agents/claude-code?tab=mcp"
|
|
);
|
|
expect(settingsHref("appearance#pet", at)).toBe("/settings/appearance#pet");
|
|
// The Workspace page with no workspace yet has no tab bar to open it in.
|
|
expect(settingsHref("agents", { pathname: "/workspace", search: "" })).toBe("/settings/agents");
|
|
});
|
|
|
|
it("opens the workspace's Settings tab on a workspace", () => {
|
|
const at = { pathname: "/workspace", search: "?lane=3&run=agenthub-lane-3-1&tab=skills" };
|
|
expect(settingsHref("agents/claude-code?tab=mcp", at)).toBe(
|
|
"/workspace?lane=3&run=agenthub-lane-3-1&settings=agents%2Fclaude-code&tab=mcp"
|
|
);
|
|
expect(settingsHref("", { pathname: "/workspace", search: "?lane=3&session=abc" })).toBe(
|
|
"/workspace?lane=3&settings="
|
|
);
|
|
expect(
|
|
settingsHref("pricing#pricing-openai", { pathname: "/workspace", search: "?lane=3" })
|
|
).toBe("/workspace?lane=3&settings=pricing#pricing-openai");
|
|
});
|
|
});
|