chore: resolve lint warnings across v2 code
Hoist inline Schema compiles to module scope, drop unused imports/vars, stabilize react-markdown component identities via a module-scope factory, remove useless spreads, and use data-derived keys for release-note bullets. No behavior changes. Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
1 parent
94b7d5f7e1
commit
bb23ddfa90
17 files changed
+449
-377
No files matched your search
@@ -31,6 +31,27 @@ const StubServicesLive = Layer.mergeAll(
|
||||
Layer.mock(VcsStatusBroadcaster)({}),
|
||||
);
|
||||
|
||||
const ToolsListPayload = Schema.fromJsonString(
|
||||
Schema.Struct({
|
||||
result: Schema.Struct({
|
||||
tools: Schema.Array(
|
||||
Schema.Struct({
|
||||
name: Schema.String,
|
||||
inputSchema: Schema.Struct({ type: Schema.optional(Schema.String) }),
|
||||
annotations: Schema.optional(
|
||||
Schema.Struct({
|
||||
readOnlyHint: Schema.optional(Schema.Boolean),
|
||||
destructiveHint: Schema.optional(Schema.Boolean),
|
||||
openWorldHint: Schema.optional(Schema.Boolean),
|
||||
}),
|
||||
),
|
||||
}),
|
||||
),
|
||||
}),
|
||||
}),
|
||||
);
|
||||
const decodeToolsListPayload = Schema.decodeUnknownEffect(ToolsListPayload);
|
||||
|
||||
it.effect("production mcp layer lists worktree tools over http", () =>
|
||||
Effect.scoped(
|
||||
Effect.gen(function* () {
|
||||
@@ -84,28 +105,7 @@ it.effect("production mcp layer lists worktree tools over http", () =>
|
||||
),
|
||||
});
|
||||
const bodyText = yield* listResponse.text;
|
||||
const ToolsListPayload = Schema.fromJsonString(
|
||||
Schema.Struct({
|
||||
result: Schema.Struct({
|
||||
tools: Schema.Array(
|
||||
Schema.Struct({
|
||||
name: Schema.String,
|
||||
inputSchema: Schema.Struct({ type: Schema.optional(Schema.String) }),
|
||||
annotations: Schema.optional(
|
||||
Schema.Struct({
|
||||
readOnlyHint: Schema.optional(Schema.Boolean),
|
||||
destructiveHint: Schema.optional(Schema.Boolean),
|
||||
openWorldHint: Schema.optional(Schema.Boolean),
|
||||
}),
|
||||
),
|
||||
}),
|
||||
),
|
||||
}),
|
||||
}),
|
||||
);
|
||||
const payload = yield* Schema.decodeUnknownEffect(ToolsListPayload)(
|
||||
bodyText.match(/\{.*\}/s)![0],
|
||||
);
|
||||
const payload = yield* decodeToolsListPayload(bodyText.match(/\{.*\}/s)![0]);
|
||||
const tools = payload.result.tools;
|
||||
const toolNames = tools.map((tool) => tool.name);
|
||||
expect(toolNames).toContain("t3_worktree_handoff");
|
||||
|
||||
Reference in new issue
Block a user