@townco/gui-template 0.1.0 → 0.1.4
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.
- package/package.json +4 -6
- package/src/ChatView.tsx +1 -1
- package/postcss.config.js +0 -5
- package/vite.config.ts +0 -94
package/package.json
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@townco/gui-template",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
7
7
|
"src",
|
|
8
8
|
"index.html",
|
|
9
|
-
"
|
|
10
|
-
"postcss.config.js",
|
|
9
|
+
"public",
|
|
11
10
|
"README.md"
|
|
12
11
|
],
|
|
13
12
|
"repository": {
|
|
14
13
|
"type": "git",
|
|
15
14
|
"url": "git+https://github.com/federicoweber/agent_hub.git"
|
|
16
15
|
},
|
|
17
|
-
"author": "Federico Weber",
|
|
18
16
|
"scripts": {
|
|
19
17
|
"dev": "vite",
|
|
20
18
|
"build": "vite build",
|
|
@@ -22,14 +20,14 @@
|
|
|
22
20
|
"check": "tsc --noEmit"
|
|
23
21
|
},
|
|
24
22
|
"dependencies": {
|
|
25
|
-
"@townco/ui": "
|
|
23
|
+
"@townco/ui": "0.1.7",
|
|
26
24
|
"lucide-react": "^0.552.0",
|
|
27
25
|
"react": "^19.2.0",
|
|
28
26
|
"react-dom": "^19.2.0"
|
|
29
27
|
},
|
|
30
28
|
"devDependencies": {
|
|
31
29
|
"@tailwindcss/postcss": "^4.1.17",
|
|
32
|
-
"@townco/tsconfig": "
|
|
30
|
+
"@townco/tsconfig": "0.1.4",
|
|
33
31
|
"@types/react": "^19.2.2",
|
|
34
32
|
"@types/react-dom": "^19.2.2",
|
|
35
33
|
"@vitejs/plugin-react": "^5.1.0",
|
package/src/ChatView.tsx
CHANGED
|
@@ -24,7 +24,7 @@ export interface ChatViewProps {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
export function ChatView({ client }: ChatViewProps) {
|
|
27
|
-
// Use shared hooks from @
|
|
27
|
+
// Use shared hooks from @town/ui/core
|
|
28
28
|
const { connectionStatus, connect } = useChatSession(client);
|
|
29
29
|
const { messages } = useChatMessages(client);
|
|
30
30
|
const error = useChatStore((state) => state.error);
|
package/postcss.config.js
DELETED
package/vite.config.ts
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import react from "@vitejs/plugin-react";
|
|
3
|
-
import { defineConfig } from "vite";
|
|
4
|
-
|
|
5
|
-
// Create a stub module for stdio transport to prevent Node.js dependencies
|
|
6
|
-
const stdioStubPlugin = () => ({
|
|
7
|
-
name: "stdio-stub",
|
|
8
|
-
resolveId(id: string) {
|
|
9
|
-
// Intercept stdio transport imports and replace with stub
|
|
10
|
-
if (
|
|
11
|
-
id.includes("sdk/transports/stdio") ||
|
|
12
|
-
id.includes("transports/stdio.js")
|
|
13
|
-
) {
|
|
14
|
-
return id;
|
|
15
|
-
}
|
|
16
|
-
return null;
|
|
17
|
-
},
|
|
18
|
-
load(id: string) {
|
|
19
|
-
if (
|
|
20
|
-
id.includes("sdk/transports/stdio") ||
|
|
21
|
-
id.includes("transports/stdio.js")
|
|
22
|
-
) {
|
|
23
|
-
// Return a stub implementation that throws an error if used
|
|
24
|
-
return `
|
|
25
|
-
export class StdioTransport {
|
|
26
|
-
constructor() {
|
|
27
|
-
throw new Error("StdioTransport is not available in the browser. Use HttpTransport or WebSocketTransport instead.");
|
|
28
|
-
}
|
|
29
|
-
async connect() { throw new Error("StdioTransport not available in browser"); }
|
|
30
|
-
async disconnect() {}
|
|
31
|
-
async send() { throw new Error("StdioTransport not available in browser"); }
|
|
32
|
-
async *receive() { throw new Error("StdioTransport not available in browser"); }
|
|
33
|
-
isConnected() { return false; }
|
|
34
|
-
onSessionUpdate() { return () => {}; }
|
|
35
|
-
onError() { return () => {}; }
|
|
36
|
-
}
|
|
37
|
-
export const StdioTransportOptions = {};
|
|
38
|
-
`;
|
|
39
|
-
}
|
|
40
|
-
return null;
|
|
41
|
-
},
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
// https://vitejs.dev/config/
|
|
45
|
-
export default defineConfig({
|
|
46
|
-
plugins: [react(), stdioStubPlugin()],
|
|
47
|
-
resolve: {
|
|
48
|
-
alias: {
|
|
49
|
-
"@": path.resolve(__dirname, "./src"),
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
optimizeDeps: {
|
|
53
|
-
exclude: [],
|
|
54
|
-
},
|
|
55
|
-
build: {
|
|
56
|
-
rollupOptions: {
|
|
57
|
-
output: {
|
|
58
|
-
manualChunks: (id) => {
|
|
59
|
-
// Split React and ReactDOM into their own chunk
|
|
60
|
-
if (
|
|
61
|
-
id.includes("node_modules/react") ||
|
|
62
|
-
id.includes("node_modules/react-dom")
|
|
63
|
-
) {
|
|
64
|
-
return "react";
|
|
65
|
-
}
|
|
66
|
-
// Split Radix UI components into their own chunk
|
|
67
|
-
if (id.includes("node_modules/@radix-ui")) {
|
|
68
|
-
return "radix";
|
|
69
|
-
}
|
|
70
|
-
// Split markdown rendering into its own chunk
|
|
71
|
-
if (
|
|
72
|
-
id.includes("node_modules/react-markdown") ||
|
|
73
|
-
id.includes("node_modules/remark-gfm")
|
|
74
|
-
) {
|
|
75
|
-
return "markdown";
|
|
76
|
-
}
|
|
77
|
-
// Split lucide icons into their own chunk
|
|
78
|
-
if (id.includes("node_modules/lucide-react")) {
|
|
79
|
-
return "icons";
|
|
80
|
-
}
|
|
81
|
-
// Split ACP SDK into its own chunk
|
|
82
|
-
if (id.includes("node_modules/@agentclientprotocol")) {
|
|
83
|
-
return "acp-sdk";
|
|
84
|
-
}
|
|
85
|
-
// Split other node_modules into a vendor chunk
|
|
86
|
-
if (id.includes("node_modules")) {
|
|
87
|
-
return "vendor";
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
chunkSizeWarningLimit: 600, // Slightly increase limit to avoid false positives
|
|
93
|
-
},
|
|
94
|
-
});
|