File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed
Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,10 @@ function Chat() {
6969 { id : "thread---c" , label : "Thread C" } ,
7070 ] ;
7171
72+ useConfigureSuggestions ( {
73+ instructions : "Suggest follow-up tasks based on the current page content" ,
74+ } ) ;
75+
7276 useAgentContext ( { description : "The current Thread ID is:" , value : selectedThreadId } ) ;
7377
7478 //useConfigureSuggestions({
Original file line number Diff line number Diff line change 55 CopilotKitProvider ,
66 useFrontendTool ,
77 defineToolCallRenderer ,
8+ useConfigureSuggestions ,
89} from "@copilotkitnext/react" ;
910import type { ToolsMenuItem } from "@copilotkitnext/react" ;
1011import { z } from "zod" ;
@@ -69,6 +70,10 @@ function Chat() {
6970 } ,
7071 } ) ;
7172
73+ useConfigureSuggestions ( {
74+ instructions : "Suggest follow-up tasks based on the current page content" ,
75+ } ) ;
76+
7277 const toolsMenu = useMemo < ( ToolsMenuItem | "-" ) [ ] > (
7378 ( ) => [
7479 {
@@ -103,4 +108,3 @@ function Chat() {
103108
104109 return < CopilotChat inputProps = { { toolsMenu } } threadId = "xyz" /> ;
105110}
106-
Original file line number Diff line number Diff line change @@ -124,7 +124,9 @@ export class SuggestionEngine {
124124 ) : Promise < void > {
125125 let agent : AbstractAgent | undefined = undefined ;
126126 try {
127- const suggestionsProviderAgent = ( this . core as unknown as CopilotKitCoreFriendsAccess ) . getAgent ( config . providerAgentId ?? "default" ) ;
127+ const suggestionsProviderAgent = ( this . core as unknown as CopilotKitCoreFriendsAccess ) . getAgent (
128+ config . providerAgentId ?? "default" ,
129+ ) ;
128130 if ( ! suggestionsProviderAgent ) {
129131 throw new Error ( `Suggestions provider agent not found: ${ config . providerAgentId } ` ) ;
130132 }
@@ -135,7 +137,7 @@ export class SuggestionEngine {
135137
136138 const clonedAgent : AbstractAgent = suggestionsProviderAgent . clone ( ) ;
137139 agent = clonedAgent ;
138- agent . agentId = suggestionId ;
140+ // agent.agentId = suggestionId;
139141 agent . threadId = suggestionId ;
140142 agent . messages = JSON . parse ( JSON . stringify ( suggestionsConsumerAgent . messages ) ) ;
141143 agent . state = JSON . parse ( JSON . stringify ( suggestionsConsumerAgent . state ) ) ;
You can’t perform that action at this time.
0 commit comments