@townco/gui-template 0.1.96 → 0.1.97
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/dist/assets/{acp-sdk-BTOSZNMJ.js → acp-sdk-CSkQMG3m.js} +1 -1
- package/dist/assets/{framer-motion-Dtgr6wSb.js → framer-motion-DA39Af0y.js} +1 -1
- package/dist/assets/{icons-DBtAS929.js → icons-B8NAg8v6.js} +1 -1
- package/dist/assets/index-By3xLWY5.css +1 -0
- package/dist/assets/index-D8q-0GLx.js +12 -0
- package/dist/assets/{markdown-DXbIPfq0.js → markdown-DPvuyxRv.js} +1 -1
- package/dist/assets/{radix-CoZ5YW0n.js → radix-BrXAtP0q.js} +1 -1
- package/dist/assets/{react-xICsdZE5.js → react-CsyacleJ.js} +1 -1
- package/dist/assets/{vendor-DU4m1sDa.js → vendor-BwwHDEUJ.js} +268 -268
- package/dist/index.html +9 -9
- package/package.json +4 -4
- package/src/config.ts +6 -6
- package/src/main.tsx +6 -6
- package/dist/assets/index-CwfgK_bK.js +0 -13
- package/dist/assets/index-bESwPFF7.css +0 -1
package/dist/index.html
CHANGED
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Agent Chat</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-D8q-0GLx.js"></script>
|
|
8
8
|
<link rel="modulepreload" crossorigin href="/assets/katex-Dnem94XJ.js">
|
|
9
|
-
<link rel="modulepreload" crossorigin href="/assets/markdown-
|
|
10
|
-
<link rel="modulepreload" crossorigin href="/assets/icons-
|
|
11
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-
|
|
12
|
-
<link rel="modulepreload" crossorigin href="/assets/react-
|
|
13
|
-
<link rel="modulepreload" crossorigin href="/assets/acp-sdk-
|
|
14
|
-
<link rel="modulepreload" crossorigin href="/assets/radix-
|
|
15
|
-
<link rel="modulepreload" crossorigin href="/assets/framer-motion-
|
|
9
|
+
<link rel="modulepreload" crossorigin href="/assets/markdown-DPvuyxRv.js">
|
|
10
|
+
<link rel="modulepreload" crossorigin href="/assets/icons-B8NAg8v6.js">
|
|
11
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-BwwHDEUJ.js">
|
|
12
|
+
<link rel="modulepreload" crossorigin href="/assets/react-CsyacleJ.js">
|
|
13
|
+
<link rel="modulepreload" crossorigin href="/assets/acp-sdk-CSkQMG3m.js">
|
|
14
|
+
<link rel="modulepreload" crossorigin href="/assets/radix-BrXAtP0q.js">
|
|
15
|
+
<link rel="modulepreload" crossorigin href="/assets/framer-motion-DA39Af0y.js">
|
|
16
16
|
<link rel="stylesheet" crossorigin href="/assets/katex-DvXFAOB1.css">
|
|
17
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
17
|
+
<link rel="stylesheet" crossorigin href="/assets/index-By3xLWY5.css">
|
|
18
18
|
</head>
|
|
19
19
|
<body>
|
|
20
20
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@townco/gui-template",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.97",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
"check": "tsgo --noEmit"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@townco/core": "0.0.
|
|
23
|
-
"@townco/ui": "0.1.
|
|
22
|
+
"@townco/core": "0.0.78",
|
|
23
|
+
"@townco/ui": "0.1.100",
|
|
24
24
|
"lucide-react": "^0.552.0",
|
|
25
25
|
"react": "19.2.1",
|
|
26
26
|
"react-dom": "19.2.1"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@tailwindcss/postcss": "^4.1.17",
|
|
30
|
-
"@townco/tsconfig": "0.1.
|
|
30
|
+
"@townco/tsconfig": "0.1.97",
|
|
31
31
|
"@types/react": "^19.2.2",
|
|
32
32
|
"@types/react-dom": "^19.2.2",
|
|
33
33
|
"@vitejs/plugin-react": "^5.1.0",
|
package/src/config.ts
CHANGED
|
@@ -18,16 +18,16 @@ export function getDebuggerUrl(): string | undefined {
|
|
|
18
18
|
* Get the Bibliotecha URL from environment variables
|
|
19
19
|
* Used for auth verification (backend)
|
|
20
20
|
*/
|
|
21
|
-
export function
|
|
22
|
-
return import.meta.env.
|
|
21
|
+
export function getLibraryUrl(): string | undefined {
|
|
22
|
+
return import.meta.env.VITE_LIBRARY_API_URL;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* Get the Bibliotecha Frontend URL from environment variables
|
|
27
27
|
* Used for redirect on auth failure
|
|
28
28
|
*/
|
|
29
|
-
export function
|
|
30
|
-
return import.meta.env.
|
|
29
|
+
export function getLibraryFrontendUrl(): string | undefined {
|
|
30
|
+
return import.meta.env.VITE_LIBRARY_FRONTEND_URL;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
/**
|
|
@@ -36,6 +36,6 @@ export function getBibliotechaFrontendUrl(): string | undefined {
|
|
|
36
36
|
export const config = {
|
|
37
37
|
agentServerUrl: getAgentServerUrl(),
|
|
38
38
|
debuggerUrl: getDebuggerUrl(),
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
libraryUrl: getLibraryUrl(),
|
|
40
|
+
libraryFrontendUrl: getLibraryFrontendUrl(),
|
|
41
41
|
} as const;
|
package/src/main.tsx
CHANGED
|
@@ -30,16 +30,16 @@ async function init() {
|
|
|
30
30
|
const tokenFromUrl = params.get("token");
|
|
31
31
|
const tokenFromCookie = getCookie(AUTH_COOKIE_NAME);
|
|
32
32
|
|
|
33
|
-
if (config.
|
|
33
|
+
if (config.libraryUrl && config.libraryFrontendUrl) {
|
|
34
34
|
// If token in URL, verify and store in cookie
|
|
35
35
|
if (tokenFromUrl) {
|
|
36
36
|
const res = await fetch(
|
|
37
|
-
`${config.
|
|
37
|
+
`${config.libraryUrl}/auth/verify?token=${tokenFromUrl}`,
|
|
38
38
|
);
|
|
39
39
|
if (!res.ok) {
|
|
40
|
-
// Token is invalid, redirect to
|
|
40
|
+
// Token is invalid, redirect to library frontend
|
|
41
41
|
deleteCookie(AUTH_COOKIE_NAME);
|
|
42
|
-
window.location.href = config.
|
|
42
|
+
window.location.href = config.libraryFrontendUrl;
|
|
43
43
|
return;
|
|
44
44
|
}
|
|
45
45
|
|
|
@@ -47,8 +47,8 @@ async function init() {
|
|
|
47
47
|
setCookie(AUTH_COOKIE_NAME, tokenFromUrl);
|
|
48
48
|
window.history.replaceState({}, "", window.location.pathname);
|
|
49
49
|
} else if (!tokenFromCookie) {
|
|
50
|
-
// No token in URL and no cookie, redirect to
|
|
51
|
-
window.location.href = config.
|
|
50
|
+
// No token in URL and no cookie, redirect to library frontend
|
|
51
|
+
window.location.href = config.libraryFrontendUrl;
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
54
|
// If we have a cookie but no URL token, we trust the cookie and proceed
|