Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 31855af

Browse files
Update one-line deploy playground URL
1 parent b96ebb7 commit 31855af

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed
Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
1-
import {playground} from "@convostack/playground";
1+
import {playground,PlaygroundAgentProxy} from "@convostack/playground";
22
import {AgentEcho} from "@convostack/agent-echo";
3+
import {IAgentCallbacks, IAgentContext, IAgentResponse} from "@convostack/agent";
34

4-
playground(new AgentEcho())
5+
const agent = new AgentEcho();
6+
// One-liner for hosted version
7+
playground(agent)
8+
9+
// playground({
10+
// reply(context: IAgentContext, callbacks?: IAgentCallbacks): Promise<IAgentResponse> {
11+
// // Your logic
12+
// }
13+
// })
14+
// const pap = new PlaygroundAgentProxy(agent);
15+
// pap.setProxyUrl('ws://localhost:8088/agent')
16+
// pap.connect()

‎packages/convostack-playground/src/index.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export class PlaygroundAgentProxy {
6161
agentId = dataStr.replace('AGENT_ID:', '')
6262
this.operation.reset()
6363
// TODO Improve formatting
64-
console.log(`[ConvoStack] 🚀 Interact with your Agent live now: https://playground.convostack.ai/dev?agent=${encodeURIComponent(agentId)}`);
64+
console.log(`[ConvoStack] 🚀 Interact with your Agent live now: https://playground.convostack.ai/dev?agent=pxy::${encodeURIComponent(agentId)}`);
6565
} else {
6666
const message: IProxyMessage = JSON.parse(dataStr);
6767
// Delegate request handling to the agent

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /