Skip to content

Commit 76f16f2

Browse files
committed
fix: clear goose2 lint blockers
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
1 parent 6e958cd commit 76f16f2

5 files changed

Lines changed: 13 additions & 17 deletions

File tree

ui/goose2/src/features/chat/ui/ChatInputToolbar.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,7 @@ import {
2424
DropdownMenuItem,
2525
DropdownMenuTrigger,
2626
} from "@/shared/ui/dropdown-menu";
27-
import {
28-
Popover,
29-
PopoverContent,
30-
PopoverTrigger,
31-
} from "@/shared/ui/popover";
27+
import { Popover, PopoverContent, PopoverTrigger } from "@/shared/ui/popover";
3228
import { Tooltip, TooltipTrigger, TooltipContent } from "@/shared/ui/tooltip";
3329
import { AgentModelPicker } from "./AgentModelPicker";
3430
import type { ModelOption } from "../types";
@@ -161,7 +157,8 @@ export function ChatInputToolbar({
161157
const projectTitle = selectedProject?.workingDirs.length
162158
? selectedProject.workingDirs.join(", ")
163159
: undefined;
164-
const contextProgress = contextLimit > 0 ? Math.min(contextTokens / contextLimit, 1) : 0;
160+
const contextProgress =
161+
contextLimit > 0 ? Math.min(contextTokens / contextLimit, 1) : 0;
165162
const contextPercentDigits =
166163
contextProgress > 0 && contextProgress < 0.1 ? 1 : 0;
167164
const usedPercentLabel = formatNumber(contextProgress, {

ui/goose2/src/features/chat/ui/__tests__/ChatInput.test.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,7 @@ describe("ChatInput", () => {
226226
it("opens a context usage popover when token tracking is available", async () => {
227227
const user = userEvent.setup();
228228
render(
229-
<ChatInput
230-
onSend={vi.fn()}
231-
contextTokens={1536}
232-
contextLimit={8192}
233-
/>,
229+
<ChatInput onSend={vi.fn()} contextTokens={1536} contextLimit={8192} />,
234230
);
235231

236232
await user.click(screen.getByRole("button", { name: /context usage/i }));
@@ -241,7 +237,9 @@ describe("ChatInput", () => {
241237
});
242238

243239
it("hides the context usage control when the context limit is unavailable", () => {
244-
render(<ChatInput onSend={vi.fn()} contextTokens={1536} contextLimit={0} />);
240+
render(
241+
<ChatInput onSend={vi.fn()} contextTokens={1536} contextLimit={0} />,
242+
);
245243

246244
expect(
247245
screen.queryByRole("button", { name: /context usage/i }),

ui/goose2/src/shared/api/acpNotificationHandler.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ describe("acpNotificationHandler", () => {
4545

4646
registerSession("draft-session-1", "goose-session-1", "goose", "/tmp");
4747

48-
const runtime =
49-
useChatStore.getState().getSessionRuntime("draft-session-1");
48+
const runtime = useChatStore
49+
.getState()
50+
.getSessionRuntime("draft-session-1");
5051
expect(runtime.tokenState.accumulatedTotal).toBe(512);
5152
expect(runtime.tokenState.contextLimit).toBe(8192);
5253
});

ui/goose2/src/shared/api/acpNotificationHandler.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ export async function handleSessionNotification(
8888
return;
8989
}
9090

91-
const isReplay = useChatStore.getState().loadingSessionIds.has(localSessionId);
91+
const isReplay = useChatStore
92+
.getState()
93+
.loadingSessionIds.has(localSessionId);
9294

9395
if (isReplay) {
9496
handleReplay(localSessionId, update);
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
export class GooseClient {
22
closed = Promise.resolve();
33

4-
constructor(..._args: unknown[]) {}
5-
64
async initialize(..._args: unknown[]): Promise<void> {}
75
}

0 commit comments

Comments
 (0)