@saadnvd1/agent-os 0.3.649 → 0.3.654
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/Chat/ChatPanel.tsx +49 -52
- package/components/Chat/QuoteButton.tsx +24 -7
- package/components/Chat/composer/editor.test.ts +39 -2
- package/components/Chat/quote-selection.test.ts +184 -2
- package/components/Chat/quote-selection.ts +70 -0
- package/components/Chat/useChatCommands.ts +19 -3
- package/components/SessionList/OrchestratorPinRow.tsx +1 -0
- package/components/SessionList/SessionRow.tsx +1 -1
- package/components/SessionList/SessionShelves.tsx +9 -6
- package/components/SessionList/index.tsx +15 -16
- package/components/SessionList/useSessionSwitching.ts +55 -0
- package/hooks/useKeybindings.ts +27 -0
- package/lib/agents/brief.ts +3 -1
- package/lib/chat/background.ts +0 -22
- package/lib/keybindings/chord.ts +114 -0
- package/lib/keybindings/focus.ts +29 -0
- package/lib/keybindings/registry.ts +84 -0
- package/lib/orchestrator/shell-guard.ts +29 -2
- package/lib/orchestrator/write-guard.ts +61 -7
- package/lib/secret-paths.ts +12 -0
- package/lib/sidebar/visible-order.ts +56 -0
- package/lib/simulator/brief.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { MachineGroup } from "./machines";
|
|
2
|
+
import { doneLimit, type Shelves, type SidebarRow } from "./shelves";
|
|
3
|
+
|
|
4
|
+
export interface ShelfFolds {
|
|
5
|
+
doneCollapsed: boolean;
|
|
6
|
+
snoozedCollapsed: boolean;
|
|
7
|
+
donePages: number;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// The Snoozed and Done rows the sidebar draws: none while folded, Done cut
|
|
11
|
+
// to the pages shown. SessionShelves renders from this too, so the two agree.
|
|
12
|
+
export function shownShelves(shelves: Shelves, folds: ShelfFolds) {
|
|
13
|
+
return {
|
|
14
|
+
snoozed: folds.snoozedCollapsed ? [] : shelves.snoozed,
|
|
15
|
+
done: folds.doneCollapsed
|
|
16
|
+
? []
|
|
17
|
+
: shelves.done.slice(0, doneLimit(folds.donePages)),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const flatten = (rows: SidebarRow[]): string[] =>
|
|
22
|
+
rows.flatMap((r) => [r.session.id, ...flatten(r.workers)]);
|
|
23
|
+
|
|
24
|
+
// Session ids top to bottom, as the sidebar draws them: folded shelves are
|
|
25
|
+
// out, a conductor's workers follow it. The one order for switching sessions.
|
|
26
|
+
export function visibleSessionIds(
|
|
27
|
+
shelves: Shelves,
|
|
28
|
+
machines: MachineGroup[],
|
|
29
|
+
folds: ShelfFolds
|
|
30
|
+
): string[] {
|
|
31
|
+
const shown = shownShelves(shelves, folds);
|
|
32
|
+
return flatten([
|
|
33
|
+
...shelves.orchestrators,
|
|
34
|
+
...shelves.pinned,
|
|
35
|
+
...shelves.needsYou,
|
|
36
|
+
...shelves.working,
|
|
37
|
+
...shelves.inReview,
|
|
38
|
+
...shelves.ongoing,
|
|
39
|
+
...shown.snoozed,
|
|
40
|
+
...shown.done,
|
|
41
|
+
...machines.flatMap((g) => g.rows),
|
|
42
|
+
]);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// The neighbour of `activeId` one step up (-1) or down (1); null at either
|
|
46
|
+
// end (no wrap), and the first or last row when nothing is active yet.
|
|
47
|
+
export function neighbourSession(
|
|
48
|
+
ids: string[],
|
|
49
|
+
activeId: string | undefined,
|
|
50
|
+
step: 1 | -1
|
|
51
|
+
): string | null {
|
|
52
|
+
if (!ids.length) return null;
|
|
53
|
+
const at = activeId ? ids.indexOf(activeId) : -1;
|
|
54
|
+
if (at < 0) return step === 1 ? ids[0] : ids[ids.length - 1];
|
|
55
|
+
return ids[at + step] ?? null;
|
|
56
|
+
}
|
package/lib/simulator/brief.ts
CHANGED
|
@@ -12,7 +12,7 @@ export function simulatorBrief(
|
|
|
12
12
|
return "- The iOS simulator tools are not available on this machine; skip simulator checks and say so in the PR.";
|
|
13
13
|
return [
|
|
14
14
|
"- iOS simulator (optional; it never gates a PR or a build, and a failure is reported, not a blocker): `aos sim open` makes your own simulator and installs this worktree's build (run it with run_in_background, a cold build takes minutes; `aos sim status` shows where it is).",
|
|
15
|
-
' Drive and check state with `aos sim snapshot -i` (accessibility tree with @refs, text, cheap), `aos sim click @e3`, `aos sim fill @e5 "text"`, `aos sim logs --last 2m`. Refs are only valid from the latest snapshot.',
|
|
15
|
+
' Drive and check state with `aos sim snapshot -i` (accessibility tree with @refs, text, cheap), `aos sim click @e3`, `aos sim fill @e5 "text"`, `aos sim logs --last 2m`. Refs are only valid from the latest snapshot. Never click or type through Python (Quartz) or cliclick; `aos sim` is the only path and needs neither.',
|
|
16
16
|
" Every image you read stays in your context for every later turn, so screenshot only the final changed screens, and prefer `aos sim screenshot --region @e3` (one element from the latest snapshot) for a single row or banner. It prints two paths: read the `read:` one (reduced to 800px); attach the `full-size` file to the PR.",
|
|
17
17
|
" Screenshots are written outside the worktree: don't put them in commits or the PR body unless they belong there. `aos sim close` when you're done; it is closed for you when the task ends.",
|
|
18
18
|
].join("\n");
|