Skip to content

Commit 199b195

Browse files
authored
trigger CI
1 parent d7a73b3 commit 199b195

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

nodejs/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Create a new conversation session.
8686

8787
**Config:**
8888

89-
- `sessionId?: string` - Custom session ID
89+
- `sessionId?: string` - Custom session ID.
9090
- `model?: string` - Model to use ("gpt-5", "claude-sonnet-4.5", etc.). **Required when using custom provider.**
9191
- `reasoningEffort?: "low" | "medium" | "high" | "xhigh"` - Reasoning effort level for models that support it. Use `listModels()` to check which models support this option.
9292
- `tools?: Tool[]` - Custom tools exposed to the CLI
@@ -512,12 +512,12 @@ const session = await client.createSession({
512512
// request.question - The question to ask
513513
// request.choices - Optional array of choices for multiple choice
514514
// request.allowFreeform - Whether freeform input is allowed (default: true)
515-
515+
516516
console.log(`Agent asks: ${request.question}`);
517517
if (request.choices) {
518518
console.log(`Choices: ${request.choices.join(", ")}`);
519519
}
520-
520+
521521
// Return the user's response
522522
return {
523523
answer: "User's answer here",
@@ -545,7 +545,7 @@ const session = await client.createSession({
545545
additionalContext: "Extra context for the model",
546546
};
547547
},
548-
548+
549549
// Called after each tool execution
550550
onPostToolUse: async (input, invocation) => {
551551
console.log(`Tool ${input.toolName} completed`);
@@ -554,28 +554,28 @@ const session = await client.createSession({
554554
additionalContext: "Post-execution notes",
555555
};
556556
},
557-
557+
558558
// Called when user submits a prompt
559559
onUserPromptSubmitted: async (input, invocation) => {
560560
console.log(`User prompt: ${input.prompt}`);
561561
return {
562562
modifiedPrompt: input.prompt, // Optionally modify the prompt
563563
};
564564
},
565-
565+
566566
// Called when session starts
567567
onSessionStart: async (input, invocation) => {
568568
console.log(`Session started from: ${input.source}`); // "startup", "resume", "new"
569569
return {
570570
additionalContext: "Session initialization context",
571571
};
572572
},
573-
573+
574574
// Called when session ends
575575
onSessionEnd: async (input, invocation) => {
576576
console.log(`Session ended: ${input.reason}`);
577577
},
578-
578+
579579
// Called when an error occurs
580580
onErrorOccurred: async (input, invocation) => {
581581
console.error(`Error in ${input.errorContext}: ${input.error}`);

0 commit comments

Comments
 (0)