@townco/ui 0.1.117 → 0.1.119
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -31,6 +31,27 @@ export class AcpClient {
|
|
|
31
31
|
*/
|
|
32
32
|
async connect() {
|
|
33
33
|
await this.transport.connect();
|
|
34
|
+
// Sync session state from transport after connecting
|
|
35
|
+
// HTTP transport creates a session during connect(), so we need to track it
|
|
36
|
+
const transportSessionId = "currentSessionId" in this.transport
|
|
37
|
+
? this.transport.currentSessionId
|
|
38
|
+
: undefined;
|
|
39
|
+
if (transportSessionId) {
|
|
40
|
+
const now = new Date().toISOString();
|
|
41
|
+
const agentName = this.transport.getAgentInfo?.()?.name;
|
|
42
|
+
const session = {
|
|
43
|
+
id: transportSessionId,
|
|
44
|
+
status: "connected",
|
|
45
|
+
config: { agentPath: "" },
|
|
46
|
+
messages: [],
|
|
47
|
+
metadata: {
|
|
48
|
+
startedAt: now,
|
|
49
|
+
agentName,
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
this.sessions.set(transportSessionId, session);
|
|
53
|
+
this.currentSessionId = transportSessionId;
|
|
54
|
+
}
|
|
34
55
|
}
|
|
35
56
|
/**
|
|
36
57
|
* Disconnect from the agent
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@townco/ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.119",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@radix-ui/react-slot": "^1.2.4",
|
|
50
50
|
"@radix-ui/react-tabs": "^1.1.13",
|
|
51
51
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
52
|
-
"@townco/core": "0.0.
|
|
52
|
+
"@townco/core": "0.0.97",
|
|
53
53
|
"@types/mdast": "^4.0.4",
|
|
54
54
|
"@uiw/react-json-view": "^2.0.0-alpha.39",
|
|
55
55
|
"class-variance-authority": "^0.7.1",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"zustand": "^5.0.8"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@townco/tsconfig": "0.1.
|
|
70
|
+
"@townco/tsconfig": "0.1.116",
|
|
71
71
|
"@types/node": "^24.10.0",
|
|
72
72
|
"@types/react": "^19.2.2",
|
|
73
73
|
"@types/unist": "^3.0.3",
|