paseo-follow-up 2.6.0-rc.0 → 2.6.1
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/CHANGELOG.md +34 -10
- package/client/display.tsx +32 -2
- package/client/home.tsx +3 -3
- package/client/linked.tsx +2 -1
- package/client/open-steps.ts +6 -2
- package/client/rich-text.tsx +41 -15
- package/client/settings.tsx +4 -3
- package/client/shown-cards.tsx +10 -5
- package/client/sidebar-view.tsx +2 -2
- package/index.server.ts +31 -11
- package/package.json +1 -1
- package/server/agent-hook.mjs +18 -5
- package/server/agent-hooks.ts +19 -0
- package/server/daemon.ts +30 -7
- package/server/hook-source.ts +34 -8
- package/server/mcp-source.ts +79 -21
- package/server/mcp.d.mts +2 -2
- package/server/mcp.mjs +37 -19
- package/server/message-queue.ts +5 -0
- package/server/native-tools.ts +11 -5
- package/server/report-issue-adapter.ts +14 -5
- package/server/turn-end.ts +17 -0
- package/server/turn-events.ts +2 -2
- package/server/update-watchdog-source.ts +49 -2
- package/server/update-watchdog.mjs +8 -2
- package/shared/agent-text.d.mts +7 -2
- package/shared/agent-text.mjs +17 -4
- package/shared/contracts.ts +2 -2
- package/shared/daemon-url.d.mts +4 -1
- package/shared/daemon-url.mjs +27 -0
- package/shared/display.ts +14 -4
- package/shared/status.ts +14 -4
package/CHANGELOG.md
CHANGED
|
@@ -2,22 +2,41 @@
|
|
|
2
2
|
|
|
3
3
|
What changed in each version of Follow-up, newest first. Follow-up shows "What's new" after an update that brings new release notes: the curated part of each stable release since you last looked (betas install quietly; Settings → General can turn it off), and every version's notes from Home's version line.
|
|
4
4
|
|
|
5
|
-
## 2.6.
|
|
5
|
+
## 2.6.1 (2026-12-05)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
One fix for 2.6.0.
|
|
8
8
|
|
|
9
|
-
- **
|
|
9
|
+
- **No more "Stop hook error occurred" under your agents' messages.** Follow-up's turn-end reminders now reach the agent quietly, never cut into your next message, and never pause the workspace as if you had stopped the agent.
|
|
10
|
+
|
|
11
|
+
<details><summary>Full changelog since 2.6.0</summary>
|
|
12
|
+
|
|
13
|
+
### Fixes
|
|
14
|
+
|
|
15
|
+
- Follow-up's turn-end reminders no longer show "Stop hook error occurred" in the chat, cut into your next message, or pause the workspace as if you stopped the agent.
|
|
16
|
+
|
|
17
|
+
</details>
|
|
18
|
+
|
|
19
|
+
## 2.6.0 (2026-12-01)
|
|
20
|
+
|
|
21
|
+
A new workspace view, a redesigned sidebar, agents that show you their work, and lots of fixes.
|
|
22
|
+
|
|
23
|
+
- **Clicking a workspace in the sidebar opens its new workspace view**, with all you need to run it: PRs and checks, what needs you, each agent's chat with a reply box, your questions, tasks and activity.
|
|
24
|
+
|
|
25
|
+

|
|
26
|
+
|
|
27
|
+
- **The sidebar got a redesign.** It looks like Paseo's own list, with your pins on top and status counts you tap to filter.
|
|
10
28
|
|
|
11
29
|

|
|
12
30
|
|
|
13
|
-
- **
|
|
14
|
-
- **Agents can show you things.** Screenshots, before and after shots, benchmarks, tables or a report show up as cards in the workspace view, next to the question they're about.
|
|
31
|
+
- **Agents can show you things.** Screenshots, benchmarks, tables or a report show up as cards in the workspace view, by the question they're about.
|
|
15
32
|
|
|
16
33
|

|
|
17
34
|
|
|
18
|
-
- **
|
|
19
|
-
- **
|
|
20
|
-
- **Works with any agent Paseo runs**,
|
|
35
|
+
- **Works with the Progress plugin.** Its runs show on the agent's line, and their questions and stuck tickets land in Needs you, answerable right there.
|
|
36
|
+
- **Ask an agent something** from the panel or Home, or with /ask in its chat; the answer stays in Your questions. Rest the pointer on an agent's line for its latest steps.
|
|
37
|
+
- **Works with any agent Paseo runs**, and repairs reach agents Paseo put to sleep.
|
|
38
|
+
|
|
39
|
+
Agent cards, questions you ask in chat and Follow-up beside the chat can each be turned off in Settings. More in the [full changelog](https://github.com/tomgrin10/paseo-follow-up/releases/tag/v2.6.0).
|
|
21
40
|
|
|
22
41
|
<details><summary>Full changelog since 2.5.1</summary>
|
|
23
42
|
|
|
@@ -27,7 +46,7 @@ Agents can show you their work right in Follow-up, Follow-up can be your sidebar
|
|
|
27
46
|
- Rest the pointer on an agent's line in the panel or on Home to see what it is doing right now: its current steps, its latest reply and any permission waiting on you. On a phone, tap the line.
|
|
28
47
|
- Double-click a workspace in Home to open its chat, including from search results.
|
|
29
48
|
- Answering is instant: send, copy or put an answer in chat and the question leaves Needs you, with every count. If the send fails, it comes back with your pick, words and images, the reason, and Retry.
|
|
30
|
-
- Progress
|
|
49
|
+
- Runs of the Progress plugin show in Follow-up: the agent line reads the Progress ticket and count, and Progress questions and stuck tickets appear in Needs you, answerable from there.
|
|
31
50
|
- Progress questions answer from Home, the panel, Catch up and the phone with Progress's own reply, and Copy gives that same reply.
|
|
32
51
|
- Follow-up's pill leaves Progress questions to Progress's own pill while Progress is on, and Activity shows when a Progress run started and finished.
|
|
33
52
|
- A one-time line on Home says Progress runs now show here, and Settings → Agents says which plugin's question setting applies to which questions.
|
|
@@ -40,7 +59,7 @@ Agents can show you their work right in Follow-up, Follow-up can be your sidebar
|
|
|
40
59
|
- Every running workspace says what each agent is working on and what it's doing now, on Home and at the top of the panel: "Capping the retry gap 2 of 4 · working 6m".
|
|
41
60
|
- A first install opens a welcome popup with what Follow-up does and a Set up button, and setup now runs inside it. Close it any time: Home shows Finish setup, which opens it again where you left off.
|
|
42
61
|
- One workspace view in Home's pane, the right side panel and a new main-area tab, laid out from its width (one to three columns). Each agent's Chat section and the reply box sit together, read without waking the agent.
|
|
43
|
-
- Opening a workspace from Follow-up's sidebar list opens its view or its main agent's chat (Settings → Inbox & display → Opening
|
|
62
|
+
- Opening a workspace from Follow-up's sidebar list opens its view or its main agent's chat (Settings → Inbox & display → Opening from the sidebar and Home); Cmd/Ctrl-click opens the other.
|
|
44
63
|
- Permissions appear in Needs you with Allow and Deny; amber now marks only what needs you, and section help sits behind a ? icon.
|
|
45
64
|
- Your questions: ask an agent from the panel or Home, or type /ask in its chat, and the answer stays with Done, Reply and Make a task for 30 days.
|
|
46
65
|
- An answer you haven't read shows in Needs you and Catch up. When the agent answers in its chat instead, Follow-up keeps its reply as the answer.
|
|
@@ -62,6 +81,7 @@ Agents can show you their work right in Follow-up, Follow-up can be your sidebar
|
|
|
62
81
|
- Typing in Home's search keeps up with you: each key shows at once, and only the results whose highlight changed are drawn again.
|
|
63
82
|
- A workspace's Follow-up view opens at once, even in a big workspace: it shows what Follow-up already knows right away and fills in the rest, like task notes, in place a moment later.
|
|
64
83
|
- Open chat from the workspace view's More menu (Home's pane and the side panel) and the tab's Open chat now dock Follow-up in the side panel beside the chat, like Home's Enter. Before, they opened the chat alone.
|
|
84
|
+
- Settings → Inbox & display → Show Follow-up beside the chat: turn it off to open just the chat.
|
|
65
85
|
|
|
66
86
|
### Questions and answers
|
|
67
87
|
|
|
@@ -83,6 +103,8 @@ Agents can show you their work right in Follow-up, Follow-up can be your sidebar
|
|
|
83
103
|
- More context matches: Add image is an icon inside its field, and its note about what happens while the agent answers sits behind a ? beside its title.
|
|
84
104
|
- The agent card in the workspace view has one header line: the agent and its state on the left, the chat's help, fold and open buttons on the right.
|
|
85
105
|
- An image you open from an agent's card now covers the whole window, above the other cards, with Previous and Next at the bottom. Before, in the two-column view it opened under the next column's cards, shifted and cropped.
|
|
106
|
+
- Agent cards and questions you ask in chat can be turned off in Settings → Agents → Questions. Off, agents aren't given the tool or told about it.
|
|
107
|
+
- A numbered or bulleted list in a question now puts each item's words right after its number, not halfway across the card.
|
|
86
108
|
|
|
87
109
|
### Repairs and PRs
|
|
88
110
|
|
|
@@ -170,6 +192,7 @@ Agents can show you their work right in Follow-up, Follow-up can be your sidebar
|
|
|
170
192
|
- Code in agent text draws in a monospace font on Linux, where it could fall back to a proportional one.
|
|
171
193
|
- What an agent shows you in the workspace view has a small ? beside its ⋯ menu. Hover or tap it to see which agent made it and that Remove in the ⋯ menu takes it away.
|
|
172
194
|
- Images you attach to a reply and New's dialog open the same way, at the top of the page.
|
|
195
|
+
- When Follow-up can't reach Paseo, its log and Report an issue's diagnostics now say why instead of "unreachable" or "unknown".
|
|
173
196
|
|
|
174
197
|
### Fixes
|
|
175
198
|
|
|
@@ -200,6 +223,7 @@ Agents can show you their work right in Follow-up, Follow-up can be your sidebar
|
|
|
200
223
|
- Busy workspaces load faster: the app no longer downloads a workspace's whole question and message history to draw it.
|
|
201
224
|
- Picking or closing a question in Needs you no longer redraws the whole workspace view on the desktop: only the card you touched changes.
|
|
202
225
|
- A card in the workspace view that can't be drawn now shows "This card couldn't be shown" with the reason, and the rest of the view keeps working, instead of the whole Follow-up tab failing on a phone.
|
|
226
|
+
- Follow-up now connects when Paseo listens on a socket path, so answers and repairs no longer stay queued as "Paseo unreachable".
|
|
203
227
|
|
|
204
228
|
</details>
|
|
205
229
|
|
package/client/display.tsx
CHANGED
|
@@ -5,7 +5,7 @@ import { displayFeed, inboxListRpc, trustBypassRpc } from "../shared/contracts";
|
|
|
5
5
|
import { openFeed } from "./feeds";
|
|
6
6
|
import { SettingsAction, SettingsCard, SettingsSection, SettingsSelect, SettingsSwitch } from "@getpaseo/plugin/client/ui";
|
|
7
7
|
import { isMac, searchShortcutOf, searchShortcutOptions, type SearchShortcut , isDesktopApp, newShortcutHint, newShortcutOptions, newShortcutPreset, type NewShortcut} from "../shared/search-key";
|
|
8
|
-
import { useEffect } from "react";
|
|
8
|
+
import { useEffect, useSyncExternalStore } from "react";
|
|
9
9
|
import { ActivityIndicator, Platform, View } from "react-native";
|
|
10
10
|
import { Text } from "./text";
|
|
11
11
|
import { sharedRead } from "./shared-read";
|
|
@@ -21,6 +21,13 @@ export function subscribeDisplay(listener: (values: Display) => void) { listener
|
|
|
21
21
|
let latest: Display | null = null;
|
|
22
22
|
listeners.add(values => { latest = values; });
|
|
23
23
|
export const displayValues = (): Display | null => latest;
|
|
24
|
+
/**
|
|
25
|
+
* Display enable_cards as this client last read it, live: false only once a read said off (unknown is on, invariant 7).
|
|
26
|
+
* Every place that draws an agent's card, or a link to one, asks this, so off draws none (docs/cards.md).
|
|
27
|
+
*/
|
|
28
|
+
export function useCardsOn(): boolean {
|
|
29
|
+
return useSyncExternalStore(subscribeDisplay, () => latest?.enable_cards !== false, () => true);
|
|
30
|
+
}
|
|
24
31
|
/**
|
|
25
32
|
* The Display document as it arrives (the feed's push or a read), for Home's order (client/home-view.ts): one
|
|
26
33
|
* follow.display-feed per client, the Display store's (invariant 142). A late follower gets the last document at once.
|
|
@@ -71,6 +78,27 @@ export function PermissionsSection({ theme }: Pick<PluginSurfaceProps, "theme">)
|
|
|
71
78
|
</SettingsSection>;
|
|
72
79
|
}
|
|
73
80
|
|
|
81
|
+
/**
|
|
82
|
+
* Settings → Agents → Questions, a card under the question mode: the switches that take a 2.6 feature from agents
|
|
83
|
+
* (shared/agent-text.mjs featuresOff). Off, agents aren't offered the tool or told about it, so it costs no tokens.
|
|
84
|
+
*/
|
|
85
|
+
export function AgentFeatureRows({ theme }: Pick<PluginSurfaceProps, "theme">) {
|
|
86
|
+
const settings = useSettings(displayPreferences);
|
|
87
|
+
if (settings.status === "loading") return null;
|
|
88
|
+
if (settings.status !== "ready") return <SettingsCard>
|
|
89
|
+
<SettingsAction label="Couldn't load Agent cards and Questions you ask in chat" hint={settings.error} actionLabel="Retry" onPress={() => void settings.reload()} />
|
|
90
|
+
{settings.status === "invalid" && <SettingsAction label="Replace invalid display settings with defaults" actionLabel="Reset" disabled={settings.saving} onPress={() => void settings.reset()} />}
|
|
91
|
+
</SettingsCard>;
|
|
92
|
+
const save = (patch: Partial<Display>) => void settings.save({ ...settings.values, ...patch }, settings.revision);
|
|
93
|
+
return <>
|
|
94
|
+
<SettingsCard>
|
|
95
|
+
<SettingsSwitch label="Agent cards" hint="Screenshots, benchmarks and reports agents show in the workspace view. Off: none are shown and agents can't add them." value={settings.values.enable_cards} disabled={settings.saving} onValueChange={(enable_cards) => save({ enable_cards })} />
|
|
96
|
+
<SettingsSwitch label="Questions you ask in chat" hint="They land in Your questions with the answer. Off: they stay in the chat. /ask still adds one." value={settings.values.enable_chat_questions} disabled={settings.saving} onValueChange={(enable_chat_questions) => save({ enable_chat_questions })} />
|
|
97
|
+
</SettingsCard>
|
|
98
|
+
{settings.saveError && <Text accessibilityRole="alert" style={{ color: theme.colors.statusDanger }}>{settings.saveError}</Text>}
|
|
99
|
+
</>;
|
|
100
|
+
}
|
|
101
|
+
|
|
74
102
|
/** A neutral "Beta" chip for section titles. */
|
|
75
103
|
export function BetaChip({ theme }: Pick<PluginSurfaceProps, "theme">) {
|
|
76
104
|
return <View style={{ paddingHorizontal: 6, paddingVertical: 1, borderRadius: 4, backgroundColor: theme.colors.surface2 }}>
|
|
@@ -112,12 +140,14 @@ export function DisplaySections({ theme }: Pick<PluginSurfaceProps, "theme">) {
|
|
|
112
140
|
</SettingsCard>
|
|
113
141
|
{settings.saveError && <Text accessibilityRole="alert" style={{ color: theme.colors.statusDanger }}>{settings.saveError}</Text>}
|
|
114
142
|
</SettingsSection>
|
|
115
|
-
<SettingsSection title="Opening
|
|
143
|
+
<SettingsSection title="Opening from the sidebar and Home" info="A workspace in Follow-up's sidebar list or Home's Open. Cmd or Ctrl-click opens the other one.">
|
|
116
144
|
<SettingsCard>
|
|
117
145
|
<SettingsSelect label="Open a workspace on" hint="Its workspace view: PRs, what the agents are doing and a reply box. Or its main agent's chat."
|
|
118
146
|
value={settings.values.open_workspace_on ?? DEFAULT_OPEN_WORKSPACE_ON} options={[{ value: "view", label: "Workspace view" }, { value: "chat", label: "Main agent's chat" }]} disabled={settings.saving}
|
|
119
147
|
onValueChange={(open_workspace_on: OpenWorkspaceOn) => save({ open_workspace_on })} />
|
|
148
|
+
<SettingsSwitch label="Show Follow-up beside the chat" hint="Opening a chat from Follow-up also opens its workspace view in the side panel. Off: just the chat." value={settings.values.enable_dock_beside_chat} disabled={settings.saving} onValueChange={(enable_dock_beside_chat) => save({ enable_dock_beside_chat })} />
|
|
120
149
|
</SettingsCard>
|
|
150
|
+
{settings.saveError && <Text accessibilityRole="alert" style={{ color: theme.colors.statusDanger }}>{settings.saveError}</Text>}
|
|
121
151
|
</SettingsSection>
|
|
122
152
|
{Platform.OS === "web" && <SettingsSection title="Keyboard" info="Follow-up's key never takes one Paseo uses, and inside a code editor the editor keeps it. Pick None to keep it free.">
|
|
123
153
|
<SettingsCard>
|
package/client/home.tsx
CHANGED
|
@@ -71,7 +71,7 @@ import { useMarkTimelineOnScreen } from "./on-screen";
|
|
|
71
71
|
import { WorkspaceView, useSessionFolds } from "./panel";
|
|
72
72
|
import { RecentSteps } from "./agent-card";
|
|
73
73
|
import { rowOpenSteps } from "../shared/display";
|
|
74
|
-
import { runOpenSteps } from "./open-steps";
|
|
74
|
+
import { dockBesideChat, runOpenSteps } from "./open-steps";
|
|
75
75
|
import { displayValues } from "./display";
|
|
76
76
|
import type { Workspace } from "../shared/model";
|
|
77
77
|
import type { SearchKey } from "./search-key";
|
|
@@ -261,7 +261,7 @@ function HomeBody(props: PluginScreenProps & { deps: HomeDeps; onboarding: Onboa
|
|
|
261
261
|
// The chat (Enter, Open on chat): its agent's chat with Follow-up docked in the side panel, never the tab beside it.
|
|
262
262
|
const openFull = useCallback((s: Workstream) => {
|
|
263
263
|
if (!navigation) return;
|
|
264
|
-
runOpenSteps(rowOpenSteps(s, "chat", false, compact), homeOpeners(navigation, deps));
|
|
264
|
+
runOpenSteps(rowOpenSteps(s, "chat", false, compact, dockBesideChat()), homeOpeners(navigation, deps));
|
|
265
265
|
}, [navigation, compact, deps]);
|
|
266
266
|
// The row menu's Answer: select the row (phones: open its screen) with that question's card open.
|
|
267
267
|
const [ask, setAsk] = useState<{ key: string; id: string; n: number } | null>(() => params.question && params.item ? { key: params.item, id: params.question, n: 1 } : null);
|
|
@@ -665,7 +665,7 @@ function DetailPane({ s, model, theme, compact, deps, openFull, signOffNext, ask
|
|
|
665
665
|
const folds = useSessionFolds(s.workspaceId ?? "");
|
|
666
666
|
// Open: the workspace view's tab or the agent's chat, as Display open_workspace_on says (Enter still opens the chat,
|
|
667
667
|
// invariant 57).
|
|
668
|
-
const openPlan = rowOpenSteps(s, displayValues()?.open_workspace_on, false, compact);
|
|
668
|
+
const openPlan = rowOpenSteps(s, displayValues()?.open_workspace_on, false, compact, dockBesideChat());
|
|
669
669
|
const opensView = openPlan.some(step => step.kind === "view");
|
|
670
670
|
const open = () => { if (navigation) runOpenSteps(openPlan, homeOpeners(navigation, deps)); };
|
|
671
671
|
// A workspace row is the workspace view (invariant 135), with Home's own moves in its head and, on a phone, its dock.
|
package/client/linked.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useEffect, useMemo, useRef, useState, type ReactNode } from "react";
|
|
2
2
|
import { useOpenLink } from "./open-link";
|
|
3
3
|
import { SpecCardChip } from "./shown-cards";
|
|
4
|
+
import { useCardsOn } from "./display";
|
|
4
5
|
import { Platform, View, type TextInput as NativeTextInput } from "react-native";
|
|
5
6
|
import { Pressable, Text } from "./text";
|
|
6
7
|
import { useRpc } from "@getpaseo/plugin/client";
|
|
@@ -110,7 +111,7 @@ export function ReferencesLine({ workspace: w, theme, compact }: { workspace: Wo
|
|
|
110
111
|
const sheets = useLinkedSheets(w, theme, compact);
|
|
111
112
|
const counts = query.data?.counts as LinkedView["counts"] | undefined;
|
|
112
113
|
// The agent keeps its spec as the card `spec` (docs/cards.md): the header's spec link goes to that card.
|
|
113
|
-
const specCard = !!w.shownCards?.some(s => s.id === "spec");
|
|
114
|
+
const specCard = useCardsOn() && !!w.shownCards?.some(s => s.id === "spec");
|
|
114
115
|
if (!referencesShown(w.spec?.url || (specCard ? "card" : null), counts)) return sheets.element;
|
|
115
116
|
const model = linkedChip(counts, compact ? CHIP_MAX.phone : CHIP_MAX.desktop);
|
|
116
117
|
return <>
|
package/client/open-steps.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { rowOpenSteps, type OpenStep } from "../shared/display";
|
|
2
|
+
import { displayValues } from "./display";
|
|
2
3
|
|
|
3
4
|
/** What each step of `rowOpenSteps` does on this surface. */
|
|
4
5
|
export type StepOpeners = { [K in OpenStep["kind"]]: (id: string) => void };
|
|
5
6
|
|
|
7
|
+
/** Display enable_dock_beside_chat as this client last read it (undefined until the first read: dock, invariant 7). */
|
|
8
|
+
export const dockBesideChat = (): boolean | undefined => displayValues()?.enable_dock_beside_chat;
|
|
9
|
+
|
|
6
10
|
/** Runs a row's open steps in order (invariant 135): every surface that opens a picked row goes through here. */
|
|
7
11
|
export function runOpenSteps(steps: readonly OpenStep[], open: StepOpeners): void {
|
|
8
12
|
for (const step of steps) open[step.kind](step.kind === "agent" ? step.agentId : step.workspaceId);
|
|
@@ -11,8 +15,8 @@ export function runOpenSteps(steps: readonly OpenStep[], open: StepOpeners): voi
|
|
|
11
15
|
/**
|
|
12
16
|
* Open chat, wherever it's offered (Home's Enter and Open full, a row menu's Open chat, the workspace view's More and its
|
|
13
17
|
* tab's Open chat): the agent's chat with the view docked in the side panel beside it (`rowOpenSteps` with the chat;
|
|
14
|
-
* none on a phone). 2.6.0-beta.12: the view's More opened the chat alone, so Home's pane menu never docked.
|
|
18
|
+
* none on a phone, nor with Display enable_dock_beside_chat off). 2.6.0-beta.12: the view's More opened the chat alone, so Home's pane menu never docked.
|
|
15
19
|
*/
|
|
16
20
|
export function openRowChat(row: { agentId: string | null; workspaceId: string | null }, compact: boolean, open: StepOpeners): void {
|
|
17
|
-
runOpenSteps(rowOpenSteps(row, "chat", false, compact), open);
|
|
21
|
+
runOpenSteps(rowOpenSteps(row, "chat", false, compact, dockBesideChat()), open);
|
|
18
22
|
}
|
package/client/rich-text.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createContext, useContext, type ReactNode } from "react";
|
|
2
2
|
import { useOpenLink } from "./open-link";
|
|
3
|
-
import { Platform, StyleSheet, View, type StyleProp, type TextStyle } from "react-native";
|
|
3
|
+
import { Platform, StyleSheet, View, type StyleProp, type TextStyle, type ViewStyle } from "react-native";
|
|
4
4
|
import { Text } from "./text";
|
|
5
5
|
import { linkify, type NumberedPr } from "../shared/links";
|
|
6
6
|
import { highlightRuns, type Range } from "../shared/search";
|
|
@@ -32,6 +32,22 @@ export function PrLinksProvider({ prs, children }: { prs: ReadonlyMap<number, Nu
|
|
|
32
32
|
// Web: a long URL has no spaces to wrap at, so let it break anywhere rather than push the sheet sideways.
|
|
33
33
|
const wrap: TextStyle = Platform.OS === "web" ? { overflowWrap: "anywhere", wordBreak: "break-word" } as unknown as TextStyle : {};
|
|
34
34
|
|
|
35
|
+
/** Style keys that only style words. Everything else in a caller's style (flex, padding, margins, width...) is layout. */
|
|
36
|
+
const TEXT_KEYS = new Set(["color", "fontFamily", "fontSize", "fontStyle", "fontWeight", "fontVariant", "letterSpacing", "lineHeight",
|
|
37
|
+
"textAlign", "textAlignVertical", "textDecorationLine", "textDecorationStyle", "textDecorationColor", "textShadowColor", "textShadowOffset",
|
|
38
|
+
"textShadowRadius", "textTransform", "writingDirection", "includeFontPadding", "userSelect", "whiteSpace", "wordBreak", "overflowWrap", "fontFeatureSettings"]);
|
|
39
|
+
/**
|
|
40
|
+
* A caller's style split into what styles the words (`text`, for every inner piece) and what lays out the whole
|
|
41
|
+
* RichText (`box`, for its outer element once): `rich-text-caller-style-is-the-outer-box`. A caller's `flex: 1` on
|
|
42
|
+
* every inner piece made a list's marker grow like its text, putting each item's words halfway across.
|
|
43
|
+
*/
|
|
44
|
+
export function splitStyle(style: StyleProp<TextStyle>): { text: TextStyle; box: ViewStyle } {
|
|
45
|
+
const text: Record<string, unknown> = {}; const box: Record<string, unknown> = {};
|
|
46
|
+
for (const [k, v] of Object.entries(StyleSheet.flatten(style) ?? {})) (TEXT_KEYS.has(k) ? text : box)[k] = v;
|
|
47
|
+
return { text: text as TextStyle, box: box as ViewStyle };
|
|
48
|
+
}
|
|
49
|
+
const textOf = (style: StyleProp<TextStyle>) => splitStyle(style).text;
|
|
50
|
+
|
|
35
51
|
/** One link: underlined, an anchor on web (Tab reaches it, Enter opens it), opened through Paseo's one link opener. */
|
|
36
52
|
function LinkRun({ url, label, linkColor, open, children }: { url: string; label?: string; linkColor?: string; open: (url: string) => void; children: ReactNode }) {
|
|
37
53
|
return <Text accessibilityRole="link" accessibilityLabel={label ?? `Open ${typeof children === "string" ? children : url}`} accessibilityHint="Opens in your browser"
|
|
@@ -79,14 +95,15 @@ export function RichText({ children, style, linkColor, numberOfLines, selectable
|
|
|
79
95
|
if (hasImage(children ?? "")) {
|
|
80
96
|
const parts = imageParts(children ?? "");
|
|
81
97
|
if (thumbs) {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
98
|
+
const { text: words, box } = splitStyle(style);
|
|
99
|
+
return <View style={[{ gap: 6, minWidth: 0, alignSelf: "stretch" }, box]}>{parts.map((part, i) => typeof part === "string"
|
|
100
|
+
? (part.trim() ? <RichText key={i} style={words} linkColor={linkColor} selectable={selectable} accessibilityRole={accessibilityRole}>{part.trim()}</RichText> : null)
|
|
101
|
+
: <TextImage key={i} alt={part.alt} src={part.src} colors={markdown} linkColor={linkColor} open={open} style={words} />)}</View>;
|
|
85
102
|
}
|
|
86
103
|
return <Text style={[style, wrap]} numberOfLines={numberOfLines} selectable={selectable} accessibilityRole={accessibilityRole} {...(tooltip && Platform.OS === "web" ? { title: tooltip } as object : {})}>
|
|
87
104
|
{parts.map((part, i) => typeof part === "string"
|
|
88
105
|
? (plain ? part : linkify(part, prs).map((r, j) => r.url ? <LinkRun key={`${i}.${j}`} url={r.url} label={r.label ?? `Open ${r.text}`} linkColor={linkColor} open={open}>{r.text}</LinkRun> : r.text))
|
|
89
|
-
: <ImageChip key={i} alt={part.alt} src={part.src} colors={markdown} linkColor={linkColor} open={plain ? undefined : open} style={style} />)}
|
|
106
|
+
: <ImageChip key={i} alt={part.alt} src={part.src} colors={markdown} linkColor={linkColor} open={plain ? undefined : open} style={textOf(style)} />)}
|
|
90
107
|
</Text>;
|
|
91
108
|
}
|
|
92
109
|
const runs = linkify(children ?? "", prs);
|
|
@@ -146,10 +163,11 @@ const lineOf = (c: Colors | undefined) => withAlpha(c?.border ?? NEUTRAL, c ? 0.
|
|
|
146
163
|
/** Spans inside one <Text>: styled runs, Markdown links, and bare URLs or PR refs linked by shared/links.ts (`plain`: no links, the words only). */
|
|
147
164
|
function Spans({ spans, colors: c, linkColor, prs, open, style, plain, mark }: { spans: MdSpan[]; mark?: (text: string, i: number) => ReactNode } & MdProps) {
|
|
148
165
|
// Inline code a step smaller than the words around it (a 17 px title, 13 px meta), never a fixed 12 beside them.
|
|
149
|
-
const
|
|
166
|
+
const words = textOf(style);
|
|
167
|
+
const around = words.fontSize;
|
|
150
168
|
const codeSize = typeof around === "number" ? Math.max(11, Math.round(around * 0.9)) : 12;
|
|
151
169
|
return <>{spans.map((s, i) => {
|
|
152
|
-
if (s.image) return <ImageChip key={i} alt={s.text} src={s.image} colors={c} linkColor={linkColor} open={plain ? undefined : open} style={
|
|
170
|
+
if (s.image) return <ImageChip key={i} alt={s.text} src={s.image} colors={c} linkColor={linkColor} open={plain ? undefined : open} style={words} />;
|
|
153
171
|
const look: TextStyle = {
|
|
154
172
|
// A one-line row's code keeps regular weight: semibold on a tint reads as a search hit there (hitStyle).
|
|
155
173
|
...(s.bold && !(plain && s.code) ? { fontWeight: "600" } : null),
|
|
@@ -157,11 +175,11 @@ function Spans({ spans, colors: c, linkColor, prs, open, style, plain, mark }: {
|
|
|
157
175
|
...(s.strike ? { textDecorationLine: "line-through" } : null),
|
|
158
176
|
...(s.code ? { fontFamily: monoFamily, fontSize: codeSize, backgroundColor: tintOf(c, 0.16), borderRadius: 3, ...(Platform.OS === "web" ? { paddingHorizontal: 3 } : null) } : null),
|
|
159
177
|
};
|
|
160
|
-
const
|
|
161
|
-
if (plain) return Object.keys(look).length || mark ? <Text key={i} style={look}>{
|
|
178
|
+
const shown = mark ? mark(s.text, i) : s.text;
|
|
179
|
+
if (plain) return Object.keys(look).length || mark ? <Text key={i} style={look}>{shown}</Text> : s.text;
|
|
162
180
|
if (s.url) return <Text key={i} style={look}><LinkRun url={s.url} linkColor={linkColor} open={open}>{s.text}</LinkRun></Text>;
|
|
163
181
|
const runs = s.code ? [{ text: s.text } as { text: string; url?: string; label?: string }] : linkify(s.text, prs);
|
|
164
|
-
if (!runs.some(r => r.url)) return Object.keys(look).length || mark ? <Text key={i} style={look}>{
|
|
182
|
+
if (!runs.some(r => r.url)) return Object.keys(look).length || mark ? <Text key={i} style={look}>{shown}</Text> : s.text;
|
|
165
183
|
return <Text key={i} style={look}>{runs.map((r, j) => r.url ? <LinkRun key={j} url={r.url} label={r.label ?? `Open ${r.text}`} linkColor={linkColor} open={open}>{r.text}</LinkRun> : r.text)}</Text>;
|
|
166
184
|
})}</>;
|
|
167
185
|
}
|
|
@@ -179,7 +197,7 @@ function SpanBlock({ spans, textStyle, numberOfLines, ...p }: { spans: MdSpan[];
|
|
|
179
197
|
}
|
|
180
198
|
return <View style={{ gap: 6, minWidth: 0, flex: 1, alignSelf: "stretch" }}>{groups.map((g, i) => Array.isArray(g)
|
|
181
199
|
? (g.some(s => s.text.trim()) ? <Text key={i} style={textStyle} numberOfLines={numberOfLines} selectable={p.selectable}><Spans spans={trimEnds(g)} {...p} /></Text> : null)
|
|
182
|
-
: <TextImage key={i} alt={g.text} src={g.image!} colors={p.colors} linkColor={p.linkColor} open={p.open} style={p.style} />)}</View>;
|
|
200
|
+
: <TextImage key={i} alt={g.text} src={g.image!} colors={p.colors} linkColor={p.linkColor} open={p.open} style={textOf(p.style)} />)}</View>;
|
|
183
201
|
}
|
|
184
202
|
/** A run's leading and trailing spaces and line breaks dropped (they sat against an image now on its own line). */
|
|
185
203
|
function trimEnds(spans: MdSpan[]): MdSpan[] {
|
|
@@ -227,7 +245,9 @@ function MarkdownText({ source, numberOfLines, ...p }: { source: string; numberO
|
|
|
227
245
|
if (blocks.length === 1 && blocks[0]!.kind === "paragraph" && !(p.thumbs && blocks[0]!.spans.some(s => s.image))) {
|
|
228
246
|
return <Text style={[p.style, wrap]} numberOfLines={numberOfLines} selectable={p.selectable}><Spans spans={blocks[0]!.spans} {...p} /></Text>;
|
|
229
247
|
}
|
|
230
|
-
|
|
248
|
+
// Several blocks: the caller's layout goes on this box once, and only its text style reaches the blocks inside.
|
|
249
|
+
const { text, box } = splitStyle(p.style);
|
|
250
|
+
return <View style={[{ gap: 6, minWidth: 0, alignSelf: "stretch" }, box]}>{renderBlocks(blocks, numberOfLines ?? Infinity, { ...p, style: text }).nodes}</View>;
|
|
231
251
|
}
|
|
232
252
|
|
|
233
253
|
const lines = (t: string) => t.split("\n").reduce((n, l) => n + Math.max(1, Math.ceil(l.length / CHARS_PER_LINE)), 0);
|
|
@@ -244,7 +264,8 @@ const spanLines = (spans: MdSpan[], thumbs?: boolean) => { const words = spans.f
|
|
|
244
264
|
*/
|
|
245
265
|
function renderBlocks(blocks: MdBlock[], budget: number, p: MdProps, muted = false): { nodes: ReactNode[]; used: number; cut: boolean } {
|
|
246
266
|
const c = p.colors;
|
|
247
|
-
|
|
267
|
+
// Text style only: a caller's layout (flex, padding, margins) is the outer box's, never each block's or marker's.
|
|
268
|
+
const base: StyleProp<TextStyle> = [textOf(p.style), wrap, muted ? (c ? { color: c.foregroundMuted } : { opacity: 0.75 }) : null];
|
|
248
269
|
const out: ReactNode[] = [];
|
|
249
270
|
const bounded = Number.isFinite(budget);
|
|
250
271
|
let left = budget;
|
|
@@ -263,13 +284,18 @@ function renderBlocks(blocks: MdBlock[], budget: number, p: MdProps, muted = fal
|
|
|
263
284
|
}
|
|
264
285
|
case "list": {
|
|
265
286
|
const rows: ReactNode[] = [];
|
|
287
|
+
// One number column for the whole list ("10." as wide as "9."), and a nested item's marker under its parent's
|
|
288
|
+
// words: indent by the top level's marker column plus the gap.
|
|
289
|
+
const numbered = (m: string) => /^\d/.test(m);
|
|
290
|
+
const numW = Math.max(18, 8 * Math.max(0, ...b.items.filter(x => numbered(x.marker)).map(x => x.marker.length)) + 2);
|
|
291
|
+
const step = (b.ordered ? numW : 10) + 6;
|
|
266
292
|
for (let j = 0; j < b.items.length; j++) {
|
|
267
293
|
if (left <= 0) { cut = true; break; }
|
|
268
294
|
const it = b.items[j]!;
|
|
269
295
|
const n = spanLines(it.spans, p.thumbs);
|
|
270
296
|
const block = SpanBlock({ spans: it.spans, textStyle: base, numberOfLines: bounded ? left : undefined, ...p });
|
|
271
|
-
rows.push(<View key={j} style={{ flexDirection: "row", gap: 6, paddingLeft: it.depth *
|
|
272
|
-
<Text style={[base, { flexShrink: 0, minWidth:
|
|
297
|
+
rows.push(<View key={j} style={{ flexDirection: "row", gap: 6, paddingLeft: it.depth * step, minWidth: 0 }}>
|
|
298
|
+
<Text style={[base, { flexShrink: 0, minWidth: numbered(it.marker) ? numW : 10, fontVariant: ["tabular-nums"] }, c ? { color: c.foregroundMuted } : { opacity: 0.75 }]}>{it.marker}</Text>
|
|
273
299
|
{block ?? <Text style={[base, { flex: 1, minWidth: 0 }]} numberOfLines={bounded ? left : undefined} selectable={p.selectable}><Spans spans={it.spans} {...p} /></Text>}
|
|
274
300
|
</View>);
|
|
275
301
|
if (n > left) cut = true;
|
package/client/settings.tsx
CHANGED
|
@@ -13,7 +13,7 @@ import { skipToken, useMutation, useQuery, useQueryClient } from "@tanstack/reac
|
|
|
13
13
|
import { followSettingsRpc, projectSettingsRpc, setFollowSettingsRpc, setProjectTrackingRpc } from "../shared/contracts";
|
|
14
14
|
import { DEFAULT_MAX_AUTO_SENDS, MAX_AUTO_SENDS_RANGE } from "../shared/send-decision";
|
|
15
15
|
import { Switch, bottomInset, errorText, space, text, type Theme } from "./kit";
|
|
16
|
-
import { DisplaySections, PermissionsSection } from "./display";
|
|
16
|
+
import { AgentFeatureRows, DisplaySections, PermissionsSection } from "./display";
|
|
17
17
|
import { ReviewerSettings, reviewerSettingsKey } from "./reviewers";
|
|
18
18
|
import { AgentSettings, OutsideRunsSettings, OwnerQuestionLine, WaitSettings, agentSettingsKey } from "./agents";
|
|
19
19
|
import { ShippingSettings } from "./shipping";
|
|
@@ -45,7 +45,7 @@ function QuestionSettings({ theme }: Pick<PluginSurfaceProps, "theme">) {
|
|
|
45
45
|
const c = theme.colors;
|
|
46
46
|
const settings = useSettings(questionPreferences);
|
|
47
47
|
const toast = useToast();
|
|
48
|
-
const info = "Agents ask decisions they can't make themselves in Follow-up, with lettered options and a recommendation. The mode tells the agent what to do until you answer, and applies to questions asked from now on. Big questions, ones that would reach outside this computer or that most of the work depends on, always wait.";
|
|
48
|
+
const info = "Agents ask decisions they can't make themselves in Follow-up, with lettered options and a recommendation. The mode tells the agent what to do until you answer, and applies to questions asked from now on. Big questions, ones that would reach outside this computer or that most of the work depends on, always wait. Below: what agents may add to Follow-up. Off, they aren't told about it.";
|
|
49
49
|
return <SettingsSection title="Questions" info={info}>
|
|
50
50
|
{settings.status === "loading" && <ActivityIndicator accessibilityLabel="Loading question settings" color={c.foregroundMuted} style={{ alignSelf: "flex-start", marginVertical: 8 }} />}
|
|
51
51
|
{(settings.status === "error" || settings.status === "invalid") && <SettingsCard>
|
|
@@ -59,6 +59,7 @@ function QuestionSettings({ theme }: Pick<PluginSurfaceProps, "theme">) {
|
|
|
59
59
|
<OwnerQuestionLine theme={theme} />
|
|
60
60
|
</SettingsCard>}
|
|
61
61
|
{settings.status === "ready" && settings.saveError && <Text accessibilityRole="alert" style={{ color: c.statusDanger }}>{settings.saveError}</Text>}
|
|
62
|
+
<AgentFeatureRows theme={theme} />
|
|
62
63
|
</SettingsSection>;
|
|
63
64
|
}
|
|
64
65
|
|
|
@@ -200,7 +201,7 @@ function WorkspacesFold({ theme, compact, all, autoDefault, busy, set }: { theme
|
|
|
200
201
|
</Disclosure>;
|
|
201
202
|
}
|
|
202
203
|
|
|
203
|
-
/** Agents: Questions, Wait for background jobs, then the four agent cards. The Overseer and AI priority switches lead their own cards. */
|
|
204
|
+
/** Agents: Questions (the mode, then Agent cards and chat questions), Wait for background jobs, then the four agent cards. The Overseer and AI priority switches lead their own cards. */
|
|
204
205
|
function AgentsCategory({ theme, compact }: { theme: Theme; compact: boolean }) {
|
|
205
206
|
return <>
|
|
206
207
|
<QuestionSettings theme={theme} />
|
package/client/shown-cards.tsx
CHANGED
|
@@ -22,6 +22,7 @@ import type { Workstream } from "../shared/home";
|
|
|
22
22
|
import { CARD_VIEW, cardHint, cardMode, foldedBudget, freshLabel, pointedCards, stableOrder, startsFolded } from "../shared/card-view";
|
|
23
23
|
import { BlockView, MiniThumb, firstImage, flushBlock, type BlockCtx } from "./card-blocks";
|
|
24
24
|
import { CardHere, canOpenLarge, goToCard, openCardLarge, registerCard, useCardAct, useCards, type ViewCard } from "./card-data";
|
|
25
|
+
import { useCardsOn } from "./display";
|
|
25
26
|
|
|
26
27
|
/**
|
|
27
28
|
* What agents show the developer in the workspace view (docs/cards.md, the design's "Where cards live"): each card is the
|
|
@@ -145,10 +146,12 @@ function CardLoading({ title, theme, compact }: { title: string; theme: Theme; c
|
|
|
145
146
|
* view opens, then stable: a card that updates keeps its place.
|
|
146
147
|
*/
|
|
147
148
|
export function useShownCards(w: Workspace, { theme, compact, now, openQuestion }: { theme: Theme; compact: boolean; now: number; openQuestion?: (id: string) => void }): { pointed: ReactNode; others: { id: string; node: ReactNode }[] } {
|
|
148
|
-
|
|
149
|
+
// Display enable_cards off: no card is drawn or read; the saved cards come back when it's on.
|
|
150
|
+
const on = useCardsOn();
|
|
151
|
+
const data = useCards(w.id, on ? w.shownCards : undefined);
|
|
149
152
|
const asked = useMemo(() => pointedCards(w.questions), [w.questions]);
|
|
150
153
|
const order = useRef<string[] | null>(null);
|
|
151
|
-
const listed = w.shownCards ?? [];
|
|
154
|
+
const listed = on ? w.shownCards ?? [] : [];
|
|
152
155
|
if (listed.length) order.current = stableOrder(order.current, listed);
|
|
153
156
|
const byId = new Map(data.cards.map(cd => [cd.id, cd]));
|
|
154
157
|
const node = (id: string, pointed: boolean) => {
|
|
@@ -156,7 +159,7 @@ export function useShownCards(w: Workspace, { theme, compact, now, openQuestion
|
|
|
156
159
|
if (!cd) return data.pending ? <CardLoading key={id} title={listed.find(s => s.id === id)?.title ?? ""} theme={theme} compact={compact} /> : null;
|
|
157
160
|
return <ShownCard key={id} card={cd} workspace={w} theme={theme} compact={compact} now={now} pointed={pointed} openQuestion={openQuestion} />;
|
|
158
161
|
};
|
|
159
|
-
const ids = order.current ?? [];
|
|
162
|
+
const ids = on ? order.current ?? [] : [];
|
|
160
163
|
const pointedIds = ids.filter(id => asked.has(id));
|
|
161
164
|
return {
|
|
162
165
|
pointed: pointedIds.length ? <>{pointedIds.map(id => node(id, true))}</> : null,
|
|
@@ -170,8 +173,10 @@ export function useShownCards(w: Workspace, { theme, compact, now, openQuestion
|
|
|
170
173
|
*/
|
|
171
174
|
export function CardLinkRow({ workspace: w, cardId, theme, compact, dense = false }: { workspace: Pick<Workspace, "id" | "shownCards">; cardId: string; theme: Theme; compact: boolean; dense?: boolean }) {
|
|
172
175
|
const c = theme.colors; const t = text(c, compact);
|
|
173
|
-
const
|
|
176
|
+
const on = useCardsOn();
|
|
177
|
+
const data = useCards(w.id, w.shownCards, !dense && on);
|
|
174
178
|
const listed = w.shownCards?.find(s => s.id === cardId);
|
|
179
|
+
if (!on) return null;
|
|
175
180
|
if (!listed) return <Text style={t.meta}>The card this pointed at was removed.</Text>;
|
|
176
181
|
const card = data.cards.find(x => x.id === cardId);
|
|
177
182
|
const thumb = card ? firstImage(card.blocks) : null;
|
|
@@ -235,7 +240,7 @@ export function CardScreen({ params, theme, layout, live, navigation }: PluginSc
|
|
|
235
240
|
/** The header's spec link when the agent keeps its spec as the card `spec`: it goes to that card. */
|
|
236
241
|
export function SpecCardChip({ workspace: w, theme, compact }: { workspace: Pick<Workspace, "id" | "shownCards">; theme: Theme; compact: boolean }) {
|
|
237
242
|
const c = theme.colors;
|
|
238
|
-
const spec = w.shownCards?.find(s => s.id === "spec");
|
|
243
|
+
const spec = useCardsOn() ? w.shownCards?.find(s => s.id === "spec") : undefined;
|
|
239
244
|
if (!spec) return null;
|
|
240
245
|
return <Pressable accessibilityRole="link" accessibilityLabel={`The spec: ${spec.title}`} onPress={() => goToCard(w.id, "spec", compact)} hitSlop={compact ? 0 : 6}
|
|
241
246
|
style={s => ({ flexDirection: "row", alignItems: "center", gap: 4, minHeight: compact ? 32 : 20, paddingHorizontal: 6, borderRadius: 999, maxWidth: 260, backgroundColor: s.pressed ? c.surface2 : c.surface1 })}>
|
package/client/sidebar-view.tsx
CHANGED
|
@@ -4,7 +4,7 @@ import { useCallback, useMemo, useState, useSyncExternalStore, type ComponentTyp
|
|
|
4
4
|
import { Platform, View } from "react-native";
|
|
5
5
|
import { displayValues } from "./display";
|
|
6
6
|
import { rowOpenSteps } from "../shared/display";
|
|
7
|
-
import { runOpenSteps } from "./open-steps";
|
|
7
|
+
import { dockBesideChat, runOpenSteps } from "./open-steps";
|
|
8
8
|
import { Text } from "./text";
|
|
9
9
|
import { UndoBar, useInbox, useSidebarViewMounted } from "./inbox";
|
|
10
10
|
import { HomeList, OVERSEER_KEY, type OverseerRowState } from "./home-list";
|
|
@@ -108,7 +108,7 @@ export function inboxSidebarView(sources: HomeSources, openOverseerHome: () => v
|
|
|
108
108
|
const agent = s?.agentId ? agentRef.get(s.agentId) : undefined;
|
|
109
109
|
const workspace = s?.workspaceId ? workspaceRef.get(s.workspaceId) : undefined;
|
|
110
110
|
if (!s) return;
|
|
111
|
-
const steps = rowOpenSteps({ agentId: agent ? s.agentId : null, workspaceId: s.workspaceId }, displayValues()?.open_workspace_on, modifiedPick(), touch);
|
|
111
|
+
const steps = rowOpenSteps({ agentId: agent ? s.agentId : null, workspaceId: s.workspaceId }, displayValues()?.open_workspace_on, modifiedPick(), touch, dockBesideChat());
|
|
112
112
|
if (steps.length) runOpenSteps(steps, { agent: () => agent && view.navigation.openAgent(agent), workspace: () => workspace && view.navigation.openWorkspace(workspace), view: openView, side: dockSide });
|
|
113
113
|
else if (workspace) view.navigation.openWorkspace(workspace);
|
|
114
114
|
}, [full, agentRef, workspaceRef, view.navigation, overseer, overseerAgent, touch]);
|