Skip to content

Commit 83147fe

Browse files
Apply prettier to files the main merge left unformatted
Amp-Thread-ID: https://ampcode.com/threads/T-01a02c68-0d8d-777b-b717-81fb9a282023 Co-authored-by: Amp <amp@ampcode.com>
1 parent 6cc442b commit 83147fe

3 files changed

Lines changed: 16 additions & 8 deletions

File tree

src/subagent/fleet-report.test.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,11 @@ describe("fleetDigest", () => {
141141

142142
describe("forced-stop reasons", () => {
143143
test("a lane finished by a forced stop announces the reason, not a bare done", () => {
144-
const seeded = observeFleet(createFleetWatch(), [lane({ id: "api" }), lane({ id: "docs" })], T0)
145-
.watch;
144+
const seeded = observeFleet(
145+
createFleetWatch(),
146+
[lane({ id: "api" }), lane({ id: "docs" })],
147+
T0,
148+
).watch;
146149
const { updates } = observeFleet(
147150
seeded,
148151
[
@@ -159,8 +162,11 @@ describe("forced-stop reasons", () => {
159162
});
160163

161164
test("a cancelled lane carries its recorded reason", () => {
162-
const seeded = observeFleet(createFleetWatch(), [lane({ id: "api" }), lane({ id: "docs" })], T0)
163-
.watch;
165+
const seeded = observeFleet(
166+
createFleetWatch(),
167+
[lane({ id: "api" }), lane({ id: "docs" })],
168+
T0,
169+
).watch;
164170
const { updates } = observeFleet(
165171
seeded,
166172
[

src/subagent/index.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ describe("sub-agent stop helpers", () => {
773773
test("forcedStopReport carries a machine-readable Stopped line the parent sees verbatim", () => {
774774
const repetition = forcedStopReport(
775775
"repetition",
776-
'Looped window (repeated 1363x): Groaning. ',
776+
"Looped window (repeated 1363x): Groaning. ",
777777
'window "Groaning. " × 1363',
778778
);
779779
expect(repetition.startsWith('Stopped: repetition — window "Groaning. " × 1363\n')).toBe(true);
@@ -795,7 +795,10 @@ describe("sub-agent stop helpers", () => {
795795

796796
// A nested forced-stop quoted in Findings must not leak its Stopped line
797797
// as the outer report's reason.
798-
const nested = forcedStopReport("never-acted", forcedStopReport("cancelled", "inner", "inner reason"));
798+
const nested = forcedStopReport(
799+
"never-acted",
800+
forcedStopReport("cancelled", "inner", "inner reason"),
801+
);
799802
expect(stopReasonFromReport(nested)).toBe("never-acted");
800803
// A clean report has no Stopped line.
801804
expect(stopReasonFromReport("## Summary\nDone.\n\n## Findings\nx")).toBe(null);

src/subagent/session-store.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,7 @@ export function createSubAgentSessionStore(
282282
session.lastActivityAt = now();
283283
clearToolCalls(session);
284284
session.error = reason;
285-
session.stopReason =
286-
reason === DEFAULT_CANCEL_REASON ? "cancelled" : `cancelled — ${reason}`;
285+
session.stopReason = reason === DEFAULT_CANCEL_REASON ? "cancelled" : `cancelled — ${reason}`;
287286
pushEntry(session, {
288287
kind: "report",
289288
content: capText(`Cancelled: ${reason}`, maxEntryChars),

0 commit comments

Comments
 (0)