Skip to content

Commit 4a96033

Browse files
fix: address PR review feedback
- Fix defineTool signature in TS scenario and docs (name, config) - Remove unused System.Text.Json import from C# scenario Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 6e17a80 commit 4a96033

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

docs/features/custom-agents.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -775,8 +775,7 @@ This is useful when:
775775
import { CopilotClient, defineTool, approveAll } from "@github/copilot-sdk";
776776
import { z } from "zod";
777777

778-
const heavyContextTool = defineTool({
779-
name: "analyze-codebase",
778+
const heavyContextTool = defineTool("analyze-codebase", {
780779
description: "Performs deep analysis of the codebase, generating extensive context",
781780
parameters: z.object({ query: z.string() }),
782781
handler: async ({ query }) => {

test/scenarios/tools/custom-agents/csharp/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using System.Text.Json;
21
using GitHub.Copilot.SDK;
32
using Microsoft.Extensions.AI;
43

test/scenarios/tools/custom-agents/typescript/src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { CopilotClient, defineTool } from "@github/copilot-sdk";
22
import { z } from "zod";
33

4-
const analyzeCodebase = defineTool({
5-
name: "analyze-codebase",
4+
const analyzeCodebase = defineTool("analyze-codebase", {
65
description: "Performs deep analysis of the codebase, generating extensive context",
76
parameters: z.object({ query: z.string().describe("The analysis query") }),
87
handler: async ({ query }) => {

0 commit comments

Comments
 (0)