Skip to content

Commit cc8fffe

Browse files
committed
add imports and url
1 parent 6eb4911 commit cc8fffe

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

typescript-sdk/create-integration.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,15 @@ if (hasServer) {
147147

148148
let agentsContent = fs.readFileSync(agentsPath, "utf8");
149149

150+
// Add import statement at the top
151+
const importStatement = `import { ${agentClassName} } from "@ag-ui/${integrationName}";\n`;
152+
agentsContent = importStatement + agentsContent;
153+
150154
const newAgentIntegration = ` {
151155
id: "${integrationName}",
152156
agents: async () => {
153157
return {
154-
agentic_chat: new ${agentClassName}(),
158+
agentic_chat: new ${agentClassName}({ url: "http://localhost:8000" }),
155159
}
156160
},
157161
},\n`;

0 commit comments

Comments
 (0)