chore: v2.8.23 — workspace groups, inner repos in Changes (opt-in), sub-agent tokens counted
Workspace groups: named, foldable, ordered sidebar sections kept per account (agenthub.workspace.groups); a workspace joins one from its menu, a drop on the header, a drag under a row, or Alt+Up/Down past a group's edge; headers drag to reorder; a folded header shows its most urgent state; New workspace in this group; fold/unfold all. Inner repos: GET /api/lanes/:id/repos + ?repo= on git/fs routes; the Changes panel shows a parent folder's repos only when Settings -> Git -> Changes panel turns it on (agenthub.changes.innerRepos, off by default). Cost: the hook writer adds a session's sub-agent transcripts to its tokens and hours (server/lib/subagent-usage.js) — a sub-agent on the session's own model was never counted live (~8% of a week here); an imported session is re-raised on every pass, so a claude -p run first seen with an empty transcript no longer stays at $0 (~10%). A one-time raise-only catch-up (user_version 5) re-reads ~/.claude/projects. Also: omp install script may redirect to its exact install.redirect URL (#85, repo-links test exempts it), native paste in the terminal.
This commit is contained in:
+7
-2
@@ -6,7 +6,7 @@
|
||||
* the setup wizard shows once per account. Local mode is one account,
|
||||
* `local`; server mode keys a row `u<id>` by the login cookie — the request
|
||||
* never names an account. Only the keys in `PREF_KEYS` are kept, each a
|
||||
* string of at most 8 KB, and a PUT merges into the row (`null` removes a
|
||||
* string of at most 8 KB (the sidebar's workspace groups 64 KB), and a PUT merges into the row (`null` removes a
|
||||
* key). Writes are same-origin and touch only the caller's own row.
|
||||
* `/instructions` is the account's own agent instructions (issue #67, at most
|
||||
* 16 000 characters, blank clears), put before the workspace's in every pane
|
||||
@@ -68,8 +68,13 @@ const PREF_KEYS = [
|
||||
"agenthub.chatUi",
|
||||
"agenthub.workspace.allTabs",
|
||||
"agenthub.markdown.view",
|
||||
"agenthub.workspace.groups",
|
||||
"agenthub.changes.innerRepos",
|
||||
];
|
||||
const MAX_VALUE = 8 * 1024;
|
||||
// The sidebar's workspace groups (lane id → group, JSON) outgrow 8 KB long
|
||||
// before any other key would.
|
||||
const MAX_FOR = { "agenthub.workspace.groups": 64 * 1024 };
|
||||
|
||||
/** `u<id>` for a server-mode account, `local` in local mode, null when nobody is signed in. */
|
||||
function userKey(req) {
|
||||
@@ -122,7 +127,7 @@ router.put("/prefs", sameOriginGuard, (req, res) => {
|
||||
return res.status(400).json({ error: { code: "EBADPREFS", message: `unknown key ${k}` } });
|
||||
}
|
||||
if (v === null) delete prefs[k];
|
||||
else if (typeof v === "string" && v.length <= MAX_VALUE) prefs[k] = v;
|
||||
else if (typeof v === "string" && v.length <= (MAX_FOR[k] ?? MAX_VALUE)) prefs[k] = v;
|
||||
else
|
||||
return res
|
||||
.status(400)
|
||||
|
||||
Reference in New Issue
Block a user