claude-sessions-mcp 0.3.0 → 0.4.1-beta.0
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/README.md +25 -78
- package/dist/index.js +402 -0
- package/dist/index.js.map +1 -0
- package/package.json +20 -67
- package/dist/chunk-7MUU7A32.js +0 -47
- package/dist/chunk-7MUU7A32.js.map +0 -1
- package/dist/mcp/index.js +0 -714
- package/dist/mcp/index.js.map +0 -1
- package/dist/server.d.ts +0 -10
- package/dist/server.js +0 -9
- package/dist/server.js.map +0 -1
- package/dist/web/client/_app/immutable/assets/0.XO-DXdC4.css +0 -1
- package/dist/web/client/_app/immutable/assets/0.XO-DXdC4.css.br +0 -0
- package/dist/web/client/_app/immutable/assets/0.XO-DXdC4.css.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/B2IHY0Hs.js +0 -1
- package/dist/web/client/_app/immutable/chunks/B2IHY0Hs.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/B2IHY0Hs.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/BCJVXGHY.js +0 -1
- package/dist/web/client/_app/immutable/chunks/BCJVXGHY.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/BCJVXGHY.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/CMwK7N_O.js +0 -1
- package/dist/web/client/_app/immutable/chunks/CMwK7N_O.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/CMwK7N_O.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/CZTho13P.js +0 -1
- package/dist/web/client/_app/immutable/chunks/CZTho13P.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/CZTho13P.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/F-H9hLgW.js +0 -2
- package/dist/web/client/_app/immutable/chunks/F-H9hLgW.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/F-H9hLgW.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/gR9AL7GA.js +0 -2
- package/dist/web/client/_app/immutable/chunks/gR9AL7GA.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/gR9AL7GA.js.gz +0 -0
- package/dist/web/client/_app/immutable/entry/app.Boej0hfY.js +0 -2
- package/dist/web/client/_app/immutable/entry/app.Boej0hfY.js.br +0 -0
- package/dist/web/client/_app/immutable/entry/app.Boej0hfY.js.gz +0 -0
- package/dist/web/client/_app/immutable/entry/start.CVYJWPd9.js +0 -1
- package/dist/web/client/_app/immutable/entry/start.CVYJWPd9.js.br +0 -2
- package/dist/web/client/_app/immutable/entry/start.CVYJWPd9.js.gz +0 -0
- package/dist/web/client/_app/immutable/nodes/0.Lbeu1dpo.js +0 -1
- package/dist/web/client/_app/immutable/nodes/0.Lbeu1dpo.js.br +0 -0
- package/dist/web/client/_app/immutable/nodes/0.Lbeu1dpo.js.gz +0 -0
- package/dist/web/client/_app/immutable/nodes/1.DvRsCtcA.js +0 -1
- package/dist/web/client/_app/immutable/nodes/1.DvRsCtcA.js.br +0 -0
- package/dist/web/client/_app/immutable/nodes/1.DvRsCtcA.js.gz +0 -0
- package/dist/web/client/_app/immutable/nodes/2.CjVN0Bwe.js +0 -73
- package/dist/web/client/_app/immutable/nodes/2.CjVN0Bwe.js.br +0 -0
- package/dist/web/client/_app/immutable/nodes/2.CjVN0Bwe.js.gz +0 -0
- package/dist/web/client/_app/version.json +0 -1
- package/dist/web/client/_app/version.json.br +0 -0
- package/dist/web/client/_app/version.json.gz +0 -0
- package/dist/web/client/favicon.png +0 -0
- package/dist/web/env.js +0 -45
- package/dist/web/handler.js +0 -1390
- package/dist/web/index.js +0 -334
- package/dist/web/server/chunks/0-C_hzGzlo.js +0 -17
- package/dist/web/server/chunks/0-C_hzGzlo.js.map +0 -1
- package/dist/web/server/chunks/1-CSNAjAzD.js +0 -9
- package/dist/web/server/chunks/1-CSNAjAzD.js.map +0 -1
- package/dist/web/server/chunks/2-D_ZAFGkV.js +0 -9
- package/dist/web/server/chunks/2-D_ZAFGkV.js.map +0 -1
- package/dist/web/server/chunks/_layout.svelte-BWDuddeu.js +0 -33
- package/dist/web/server/chunks/_layout.svelte-BWDuddeu.js.map +0 -1
- package/dist/web/server/chunks/_page.svelte-BTPPI5f9.js +0 -113
- package/dist/web/server/chunks/_page.svelte-BTPPI5f9.js.map +0 -1
- package/dist/web/server/chunks/_server.ts-B0JVJ9FB.js +0 -28
- package/dist/web/server/chunks/_server.ts-B0JVJ9FB.js.map +0 -1
- package/dist/web/server/chunks/_server.ts-BLGLFyUk.js +0 -19
- package/dist/web/server/chunks/_server.ts-BLGLFyUk.js.map +0 -1
- package/dist/web/server/chunks/_server.ts-BaqmP9oG.js +0 -14
- package/dist/web/server/chunks/_server.ts-BaqmP9oG.js.map +0 -1
- package/dist/web/server/chunks/_server.ts-Beze9L3_.js +0 -19
- package/dist/web/server/chunks/_server.ts-Beze9L3_.js.map +0 -1
- package/dist/web/server/chunks/_server.ts-BlgHsHoW.js +0 -8
- package/dist/web/server/chunks/_server.ts-BlgHsHoW.js.map +0 -1
- package/dist/web/server/chunks/_server.ts-Bw_uJ6TN.js +0 -11
- package/dist/web/server/chunks/_server.ts-Bw_uJ6TN.js.map +0 -1
- package/dist/web/server/chunks/_server.ts-CHX8x48n.js +0 -27
- package/dist/web/server/chunks/_server.ts-CHX8x48n.js.map +0 -1
- package/dist/web/server/chunks/_server.ts-Cb5-fa8C.js +0 -37
- package/dist/web/server/chunks/_server.ts-Cb5-fa8C.js.map +0 -1
- package/dist/web/server/chunks/_server.ts-ChE2aT-W.js +0 -29
- package/dist/web/server/chunks/_server.ts-ChE2aT-W.js.map +0 -1
- package/dist/web/server/chunks/_server.ts-Cksv90lD.js +0 -18
- package/dist/web/server/chunks/_server.ts-Cksv90lD.js.map +0 -1
- package/dist/web/server/chunks/_server.ts-D80JJ66s.js +0 -26
- package/dist/web/server/chunks/_server.ts-D80JJ66s.js.map +0 -1
- package/dist/web/server/chunks/_server.ts-DjWf5N-i.js +0 -18
- package/dist/web/server/chunks/_server.ts-DjWf5N-i.js.map +0 -1
- package/dist/web/server/chunks/_server.ts-DmMLJ93T.js +0 -18
- package/dist/web/server/chunks/_server.ts-DmMLJ93T.js.map +0 -1
- package/dist/web/server/chunks/context-R2425nfV.js +0 -64
- package/dist/web/server/chunks/context-R2425nfV.js.map +0 -1
- package/dist/web/server/chunks/error.svelte-DazOwnSn.js +0 -45
- package/dist/web/server/chunks/error.svelte-DazOwnSn.js.map +0 -1
- package/dist/web/server/chunks/exports-BzHwARwz.js +0 -326
- package/dist/web/server/chunks/exports-BzHwARwz.js.map +0 -1
- package/dist/web/server/chunks/index-CXFDTUAl.js +0 -913
- package/dist/web/server/chunks/index-CXFDTUAl.js.map +0 -1
- package/dist/web/server/chunks/index-CoD1IJuy.js +0 -190
- package/dist/web/server/chunks/index-CoD1IJuy.js.map +0 -1
- package/dist/web/server/chunks/session-DmOGNZUD.js +0 -781
- package/dist/web/server/chunks/session-DmOGNZUD.js.map +0 -1
- package/dist/web/server/index.js +0 -7938
- package/dist/web/server/index.js.map +0 -1
- package/dist/web/server/manifest.js +0 -137
- package/dist/web/server/manifest.js.map +0 -1
- package/dist/web/shims.js +0 -32
- /package/dist/{mcp/index.d.ts → index.d.ts} +0 -0
package/dist/web/index.js
DELETED
|
@@ -1,334 +0,0 @@
|
|
|
1
|
-
import process from 'node:process';
|
|
2
|
-
import { handler } from './handler.js';
|
|
3
|
-
import { env } from './env.js';
|
|
4
|
-
import http from 'node:http';
|
|
5
|
-
import { setImmediate } from 'node:timers';
|
|
6
|
-
import * as qs from 'node:querystring';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @param {string|RegExp} input The route pattern
|
|
10
|
-
* @param {boolean} [loose] Allow open-ended matching. Ignored with `RegExp` input.
|
|
11
|
-
*/
|
|
12
|
-
function parse$1(input, loose) {
|
|
13
|
-
if (input instanceof RegExp) return { keys:false, pattern:input };
|
|
14
|
-
var c, o, tmp, ext, keys=[], pattern='', arr = input.split('/');
|
|
15
|
-
arr[0] || arr.shift();
|
|
16
|
-
|
|
17
|
-
while (tmp = arr.shift()) {
|
|
18
|
-
c = tmp[0];
|
|
19
|
-
if (c === '*') {
|
|
20
|
-
keys.push(c);
|
|
21
|
-
pattern += tmp[1] === '?' ? '(?:/(.*))?' : '/(.*)';
|
|
22
|
-
} else if (c === ':') {
|
|
23
|
-
o = tmp.indexOf('?', 1);
|
|
24
|
-
ext = tmp.indexOf('.', 1);
|
|
25
|
-
keys.push( tmp.substring(1, !!~o ? o : !!~ext ? ext : tmp.length) );
|
|
26
|
-
pattern += !!~o && !~ext ? '(?:/([^/]+?))?' : '/([^/]+?)';
|
|
27
|
-
if (!!~ext) pattern += (!!~o ? '?' : '') + '\\' + tmp.substring(ext);
|
|
28
|
-
} else {
|
|
29
|
-
pattern += '/' + tmp;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return {
|
|
34
|
-
keys: keys,
|
|
35
|
-
pattern: new RegExp('^' + pattern + (loose ? '(?=$|\/)' : '\/?$'), 'i')
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const MAP = {
|
|
40
|
-
"": 0,
|
|
41
|
-
GET: 1,
|
|
42
|
-
HEAD: 2,
|
|
43
|
-
PATCH: 3,
|
|
44
|
-
OPTIONS: 4,
|
|
45
|
-
CONNECT: 5,
|
|
46
|
-
DELETE: 6,
|
|
47
|
-
TRACE: 7,
|
|
48
|
-
POST: 8,
|
|
49
|
-
PUT: 9,
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
class Trouter {
|
|
53
|
-
constructor() {
|
|
54
|
-
this.routes = [];
|
|
55
|
-
|
|
56
|
-
this.all = this.add.bind(this, '');
|
|
57
|
-
this.get = this.add.bind(this, 'GET');
|
|
58
|
-
this.head = this.add.bind(this, 'HEAD');
|
|
59
|
-
this.patch = this.add.bind(this, 'PATCH');
|
|
60
|
-
this.options = this.add.bind(this, 'OPTIONS');
|
|
61
|
-
this.connect = this.add.bind(this, 'CONNECT');
|
|
62
|
-
this.delete = this.add.bind(this, 'DELETE');
|
|
63
|
-
this.trace = this.add.bind(this, 'TRACE');
|
|
64
|
-
this.post = this.add.bind(this, 'POST');
|
|
65
|
-
this.put = this.add.bind(this, 'PUT');
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
use(route, ...fns) {
|
|
69
|
-
let handlers = [].concat.apply([], fns);
|
|
70
|
-
let { keys, pattern } = parse$1(route, true);
|
|
71
|
-
this.routes.push({ keys, pattern, method: '', handlers, midx: MAP[''] });
|
|
72
|
-
return this;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
add(method, route, ...fns) {
|
|
76
|
-
let { keys, pattern } = parse$1(route);
|
|
77
|
-
let handlers = [].concat.apply([], fns);
|
|
78
|
-
this.routes.push({ keys, pattern, method, handlers, midx: MAP[method] });
|
|
79
|
-
return this;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
find(method, url) {
|
|
83
|
-
let midx = MAP[method];
|
|
84
|
-
let isHEAD = (midx === 2);
|
|
85
|
-
let i=0, j=0, k, tmp, arr=this.routes;
|
|
86
|
-
let matches=[], params={}, handlers=[];
|
|
87
|
-
for (; i < arr.length; i++) {
|
|
88
|
-
tmp = arr[i];
|
|
89
|
-
if (tmp.midx === midx || tmp.midx === 0 || (isHEAD && tmp.midx===1) ) {
|
|
90
|
-
if (tmp.keys === false) {
|
|
91
|
-
matches = tmp.pattern.exec(url);
|
|
92
|
-
if (matches === null) continue;
|
|
93
|
-
if (matches.groups !== void 0) for (k in matches.groups) params[k]=matches.groups[k];
|
|
94
|
-
tmp.handlers.length > 1 ? (handlers=handlers.concat(tmp.handlers)) : handlers.push(tmp.handlers[0]);
|
|
95
|
-
} else if (tmp.keys.length > 0) {
|
|
96
|
-
matches = tmp.pattern.exec(url);
|
|
97
|
-
if (matches === null) continue;
|
|
98
|
-
for (j=0; j < tmp.keys.length;) params[tmp.keys[j]]=matches[++j];
|
|
99
|
-
tmp.handlers.length > 1 ? (handlers=handlers.concat(tmp.handlers)) : handlers.push(tmp.handlers[0]);
|
|
100
|
-
} else if (tmp.pattern.test(url)) {
|
|
101
|
-
tmp.handlers.length > 1 ? (handlers=handlers.concat(tmp.handlers)) : handlers.push(tmp.handlers[0]);
|
|
102
|
-
}
|
|
103
|
-
} // else not a match
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
return { params, handlers };
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* @typedef ParsedURL
|
|
112
|
-
* @type {import('.').ParsedURL}
|
|
113
|
-
*/
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* @typedef Request
|
|
117
|
-
* @property {string} url
|
|
118
|
-
* @property {ParsedURL} _parsedUrl
|
|
119
|
-
*/
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* @param {Request} req
|
|
123
|
-
* @returns {ParsedURL|void}
|
|
124
|
-
*/
|
|
125
|
-
function parse(req) {
|
|
126
|
-
let raw = req.url;
|
|
127
|
-
if (raw == null) return;
|
|
128
|
-
|
|
129
|
-
let prev = req._parsedUrl;
|
|
130
|
-
if (prev && prev.raw === raw) return prev;
|
|
131
|
-
|
|
132
|
-
let pathname=raw, search='', query;
|
|
133
|
-
|
|
134
|
-
if (raw.length > 1) {
|
|
135
|
-
let idx = raw.indexOf('?', 1);
|
|
136
|
-
|
|
137
|
-
if (idx !== -1) {
|
|
138
|
-
search = raw.substring(idx);
|
|
139
|
-
pathname = raw.substring(0, idx);
|
|
140
|
-
if (search.length > 1) {
|
|
141
|
-
query = qs.parse(search.substring(1));
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
return req._parsedUrl = { pathname, search, query, raw };
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
function onError(err, req, res) {
|
|
150
|
-
let code = typeof err.status === 'number' && err.status;
|
|
151
|
-
code = res.statusCode = (code && code >= 100 ? code : 500);
|
|
152
|
-
if (typeof err === 'string' || Buffer.isBuffer(err)) res.end(err);
|
|
153
|
-
else res.end(err.message || http.STATUS_CODES[code]);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
const mount = fn => fn instanceof Polka ? fn.attach : fn;
|
|
157
|
-
|
|
158
|
-
class Polka extends Trouter {
|
|
159
|
-
constructor(opts={}) {
|
|
160
|
-
super();
|
|
161
|
-
this.parse = parse;
|
|
162
|
-
this.server = opts.server;
|
|
163
|
-
this.handler = this.handler.bind(this);
|
|
164
|
-
this.onError = opts.onError || onError; // catch-all handler
|
|
165
|
-
this.onNoMatch = opts.onNoMatch || this.onError.bind(null, { status: 404 });
|
|
166
|
-
this.attach = (req, res) => setImmediate(this.handler, req, res);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
use(base, ...fns) {
|
|
170
|
-
if (base === '/') {
|
|
171
|
-
super.use(base, fns.map(mount));
|
|
172
|
-
} else if (typeof base === 'function' || base instanceof Polka) {
|
|
173
|
-
super.use('/', [base, ...fns].map(mount));
|
|
174
|
-
} else {
|
|
175
|
-
super.use(base,
|
|
176
|
-
(req, _, next) => {
|
|
177
|
-
if (typeof base === 'string') {
|
|
178
|
-
let len = base.length;
|
|
179
|
-
base.startsWith('/') || len++;
|
|
180
|
-
req.url = req.url.substring(len) || '/';
|
|
181
|
-
req.path = req.path.substring(len) || '/';
|
|
182
|
-
} else {
|
|
183
|
-
req.url = req.url.replace(base, '') || '/';
|
|
184
|
-
req.path = req.path.replace(base, '') || '/';
|
|
185
|
-
}
|
|
186
|
-
if (req.url.charAt(0) !== '/') {
|
|
187
|
-
req.url = '/' + req.url;
|
|
188
|
-
}
|
|
189
|
-
next();
|
|
190
|
-
},
|
|
191
|
-
fns.map(mount),
|
|
192
|
-
(req, _, next) => {
|
|
193
|
-
req.path = req._parsedUrl.pathname;
|
|
194
|
-
req.url = req.path + req._parsedUrl.search;
|
|
195
|
-
next();
|
|
196
|
-
}
|
|
197
|
-
);
|
|
198
|
-
}
|
|
199
|
-
return this; // chainable
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
listen() {
|
|
203
|
-
(this.server = this.server || http.createServer()).on('request', this.attach);
|
|
204
|
-
this.server.listen.apply(this.server, arguments);
|
|
205
|
-
return this;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
handler(req, res, next) {
|
|
209
|
-
let info = this.parse(req), path = info.pathname;
|
|
210
|
-
let obj = this.find(req.method, req.path=path);
|
|
211
|
-
|
|
212
|
-
req.url = path + info.search;
|
|
213
|
-
req.originalUrl = req.originalUrl || req.url;
|
|
214
|
-
req.query = info.query || {};
|
|
215
|
-
req.search = info.search;
|
|
216
|
-
req.params = obj.params;
|
|
217
|
-
|
|
218
|
-
if (path.length > 1 && path.indexOf('%', 1) !== -1) {
|
|
219
|
-
for (let k in req.params) {
|
|
220
|
-
try { req.params[k] = decodeURIComponent(req.params[k]); }
|
|
221
|
-
catch (e) { /* malform uri segment */ }
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
let i=0, arr=obj.handlers.concat(this.onNoMatch), len=arr.length;
|
|
226
|
-
let loop = async () => res.finished || (i < len) && arr[i++](req, res, next);
|
|
227
|
-
(next = next || (err => err ? this.onError(err, req, res, next) : loop().catch(next)))(); // init
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
function polka (opts) {
|
|
232
|
-
return new Polka(opts);
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
const path = env('SOCKET_PATH', false);
|
|
236
|
-
const host = env('HOST', '0.0.0.0');
|
|
237
|
-
const port = env('PORT', !path && '3000');
|
|
238
|
-
|
|
239
|
-
const shutdown_timeout = parseInt(env('SHUTDOWN_TIMEOUT', '30'));
|
|
240
|
-
const idle_timeout = parseInt(env('IDLE_TIMEOUT', '0'));
|
|
241
|
-
const listen_pid = parseInt(env('LISTEN_PID', '0'));
|
|
242
|
-
const listen_fds = parseInt(env('LISTEN_FDS', '0'));
|
|
243
|
-
// https://www.freedesktop.org/software/systemd/man/latest/sd_listen_fds.html
|
|
244
|
-
const SD_LISTEN_FDS_START = 3;
|
|
245
|
-
|
|
246
|
-
if (listen_pid !== 0 && listen_pid !== process.pid) {
|
|
247
|
-
throw new Error(`received LISTEN_PID ${listen_pid} but current process id is ${process.pid}`);
|
|
248
|
-
}
|
|
249
|
-
if (listen_fds > 1) {
|
|
250
|
-
throw new Error(
|
|
251
|
-
`only one socket is allowed for socket activation, but LISTEN_FDS was set to ${listen_fds}`
|
|
252
|
-
);
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
const socket_activation = listen_pid === process.pid && listen_fds === 1;
|
|
256
|
-
|
|
257
|
-
let requests = 0;
|
|
258
|
-
/** @type {NodeJS.Timeout | void} */
|
|
259
|
-
let shutdown_timeout_id;
|
|
260
|
-
/** @type {NodeJS.Timeout | void} */
|
|
261
|
-
let idle_timeout_id;
|
|
262
|
-
|
|
263
|
-
const server = polka().use(handler);
|
|
264
|
-
|
|
265
|
-
if (socket_activation) {
|
|
266
|
-
server.listen({ fd: SD_LISTEN_FDS_START }, () => {
|
|
267
|
-
console.log(`Listening on file descriptor ${SD_LISTEN_FDS_START}`);
|
|
268
|
-
});
|
|
269
|
-
} else {
|
|
270
|
-
server.listen({ path, host, port }, () => {
|
|
271
|
-
console.log(`Listening on ${path || `http://${host}:${port}`}`);
|
|
272
|
-
});
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
/** @param {'SIGINT' | 'SIGTERM' | 'IDLE'} reason */
|
|
276
|
-
function graceful_shutdown(reason) {
|
|
277
|
-
if (shutdown_timeout_id) return;
|
|
278
|
-
|
|
279
|
-
// If a connection was opened with a keep-alive header close() will wait for the connection to
|
|
280
|
-
// time out rather than close it even if it is not handling any requests, so call this first
|
|
281
|
-
// @ts-expect-error this was added in 18.2.0 but is not reflected in the types
|
|
282
|
-
server.server.closeIdleConnections();
|
|
283
|
-
|
|
284
|
-
server.server.close((error) => {
|
|
285
|
-
// occurs if the server is already closed
|
|
286
|
-
if (error) return;
|
|
287
|
-
|
|
288
|
-
if (shutdown_timeout_id) {
|
|
289
|
-
clearTimeout(shutdown_timeout_id);
|
|
290
|
-
}
|
|
291
|
-
if (idle_timeout_id) {
|
|
292
|
-
clearTimeout(idle_timeout_id);
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
// @ts-expect-error custom events cannot be typed
|
|
296
|
-
process.emit('sveltekit:shutdown', reason);
|
|
297
|
-
});
|
|
298
|
-
|
|
299
|
-
shutdown_timeout_id = setTimeout(
|
|
300
|
-
// @ts-expect-error this was added in 18.2.0 but is not reflected in the types
|
|
301
|
-
() => server.server.closeAllConnections(),
|
|
302
|
-
shutdown_timeout * 1000
|
|
303
|
-
);
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
server.server.on(
|
|
307
|
-
'request',
|
|
308
|
-
/** @param {import('node:http').IncomingMessage} req */
|
|
309
|
-
(req) => {
|
|
310
|
-
requests++;
|
|
311
|
-
|
|
312
|
-
if (socket_activation && idle_timeout_id) {
|
|
313
|
-
idle_timeout_id = clearTimeout(idle_timeout_id);
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
req.on('close', () => {
|
|
317
|
-
requests--;
|
|
318
|
-
|
|
319
|
-
if (shutdown_timeout_id) {
|
|
320
|
-
// close connections as soon as they become idle, so they don't accept new requests
|
|
321
|
-
// @ts-expect-error this was added in 18.2.0 but is not reflected in the types
|
|
322
|
-
server.server.closeIdleConnections();
|
|
323
|
-
}
|
|
324
|
-
if (requests === 0 && socket_activation && idle_timeout) {
|
|
325
|
-
idle_timeout_id = setTimeout(() => graceful_shutdown('IDLE'), idle_timeout * 1000);
|
|
326
|
-
}
|
|
327
|
-
});
|
|
328
|
-
}
|
|
329
|
-
);
|
|
330
|
-
|
|
331
|
-
process.on('SIGTERM', graceful_shutdown);
|
|
332
|
-
process.on('SIGINT', graceful_shutdown);
|
|
333
|
-
|
|
334
|
-
export { host, path, port, server };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
const ssr = true;
|
|
2
|
-
|
|
3
|
-
var _layout_ts = /*#__PURE__*/Object.freeze({
|
|
4
|
-
__proto__: null,
|
|
5
|
-
ssr: ssr
|
|
6
|
-
});
|
|
7
|
-
|
|
8
|
-
const index = 0;
|
|
9
|
-
let component_cache;
|
|
10
|
-
const component = async () => component_cache ??= (await import('./_layout.svelte-BWDuddeu.js')).default;
|
|
11
|
-
const universal_id = "src/routes/+layout.ts";
|
|
12
|
-
const imports = ["_app/immutable/nodes/0.Lbeu1dpo.js","_app/immutable/chunks/F-H9hLgW.js","_app/immutable/chunks/B2IHY0Hs.js","_app/immutable/chunks/BCJVXGHY.js","_app/immutable/chunks/gR9AL7GA.js"];
|
|
13
|
-
const stylesheets = ["_app/immutable/assets/0.XO-DXdC4.css"];
|
|
14
|
-
const fonts = [];
|
|
15
|
-
|
|
16
|
-
export { component, fonts, imports, index, stylesheets, _layout_ts as universal, universal_id };
|
|
17
|
-
//# sourceMappingURL=0-C_hzGzlo.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"0-C_hzGzlo.js","sources":["../../../../web/.svelte-kit/adapter-node/entries/pages/_layout.ts.js","../../../../web/.svelte-kit/adapter-node/nodes/0.js"],"sourcesContent":["const ssr = true;\nexport {\n ssr\n};\n","import * as universal from '../entries/pages/_layout.ts.js';\n\nexport const index = 0;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/_layout.svelte.js')).default;\nexport { universal };\nexport const universal_id = \"src/routes/+layout.ts\";\nexport const imports = [\"_app/immutable/nodes/0.Lbeu1dpo.js\",\"_app/immutable/chunks/F-H9hLgW.js\",\"_app/immutable/chunks/B2IHY0Hs.js\",\"_app/immutable/chunks/BCJVXGHY.js\",\"_app/immutable/chunks/gR9AL7GA.js\"];\nexport const stylesheets = [\"_app/immutable/assets/0.XO-DXdC4.css\"];\nexport const fonts = [];\n"],"names":[],"mappings":"AAAA,MAAM,GAAG,GAAG,IAAI;;;;;;;ACEJ,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,8BAAoC,CAAC,EAAE;AAElG,MAAC,YAAY,GAAG;AAChB,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AAChM,MAAC,WAAW,GAAG,CAAC,sCAAsC;AACtD,MAAC,KAAK,GAAG;;;;"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
const index = 1;
|
|
2
|
-
let component_cache;
|
|
3
|
-
const component = async () => component_cache ??= (await import('./error.svelte-DazOwnSn.js')).default;
|
|
4
|
-
const imports = ["_app/immutable/nodes/1.DvRsCtcA.js","_app/immutable/chunks/F-H9hLgW.js","_app/immutable/chunks/B2IHY0Hs.js","_app/immutable/chunks/CZTho13P.js"];
|
|
5
|
-
const stylesheets = [];
|
|
6
|
-
const fonts = [];
|
|
7
|
-
|
|
8
|
-
export { component, fonts, imports, index, stylesheets };
|
|
9
|
-
//# sourceMappingURL=1-CSNAjAzD.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"1-CSNAjAzD.js","sources":["../../../../web/.svelte-kit/adapter-node/nodes/1.js"],"sourcesContent":["\n\nexport const index = 1;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/fallbacks/error.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/1.DvRsCtcA.js\",\"_app/immutable/chunks/F-H9hLgW.js\",\"_app/immutable/chunks/B2IHY0Hs.js\",\"_app/immutable/chunks/CZTho13P.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAAsC,CAAC,EAAE;AACpG,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AAC5J,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
const index = 2;
|
|
2
|
-
let component_cache;
|
|
3
|
-
const component = async () => component_cache ??= (await import('./_page.svelte-BTPPI5f9.js')).default;
|
|
4
|
-
const imports = ["_app/immutable/nodes/2.CjVN0Bwe.js","_app/immutable/chunks/F-H9hLgW.js","_app/immutable/chunks/B2IHY0Hs.js","_app/immutable/chunks/BCJVXGHY.js","_app/immutable/chunks/gR9AL7GA.js","_app/immutable/chunks/CMwK7N_O.js"];
|
|
5
|
-
const stylesheets = [];
|
|
6
|
-
const fonts = [];
|
|
7
|
-
|
|
8
|
-
export { component, fonts, imports, index, stylesheets };
|
|
9
|
-
//# sourceMappingURL=2-D_ZAFGkV.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"2-D_ZAFGkV.js","sources":["../../../../web/.svelte-kit/adapter-node/nodes/2.js"],"sourcesContent":["\n\nexport const index = 2;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/_page.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/2.CjVN0Bwe.js\",\"_app/immutable/chunks/F-H9hLgW.js\",\"_app/immutable/chunks/B2IHY0Hs.js\",\"_app/immutable/chunks/BCJVXGHY.js\",\"_app/immutable/chunks/gR9AL7GA.js\",\"_app/immutable/chunks/CMwK7N_O.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAAkC,CAAC,EAAE;AAChG,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AACpO,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { w as head, x as attr } from './index-CXFDTUAl.js';
|
|
2
|
-
import { e as escape_html } from './context-R2425nfV.js';
|
|
3
|
-
|
|
4
|
-
function _layout($$renderer, $$props) {
|
|
5
|
-
$$renderer.component(($$renderer2) => {
|
|
6
|
-
let { children } = $$props;
|
|
7
|
-
let cleaning = false;
|
|
8
|
-
let shuttingDown = false;
|
|
9
|
-
head("12qhfyh", $$renderer2, ($$renderer3) => {
|
|
10
|
-
$$renderer3.title(($$renderer4) => {
|
|
11
|
-
$$renderer4.push(`<title>Claude Session Manager</title>`);
|
|
12
|
-
});
|
|
13
|
-
});
|
|
14
|
-
$$renderer2.push(`<div class="min-h-screen flex flex-col bg-gh-bg text-gh-text"><header class="bg-gh-bg-secondary border-b border-gh-border px-8 py-4 flex justify-between items-center"><div class="flex items-center gap-3"><h1 class="text-2xl font-semibold">Claude Session Manager</h1> `);
|
|
15
|
-
{
|
|
16
|
-
$$renderer2.push("<!--[!-->");
|
|
17
|
-
}
|
|
18
|
-
$$renderer2.push(`<!--]--></div> <div class="flex gap-2"><button class="bg-gh-border-subtle border border-gh-border text-gh-text px-4 py-2 rounded-md text-sm transition-colors hover:bg-gh-border hover:border-gh-text-secondary disabled:opacity-50 disabled:cursor-not-allowed"${attr("disabled", cleaning, true)}>${escape_html("Cleanup")}</button> <button class="bg-gh-red border border-gh-red text-white px-4 py-2 rounded-md text-sm transition-colors hover:bg-red-700 disabled:opacity-50 disabled:cursor-not-allowed"${attr("disabled", shuttingDown, true)}>${escape_html("Shutdown")}</button></div></header> <main class="flex-1 p-8 max-w-7xl mx-auto w-full">`);
|
|
19
|
-
children($$renderer2);
|
|
20
|
-
$$renderer2.push(`<!----></main></div> `);
|
|
21
|
-
{
|
|
22
|
-
$$renderer2.push("<!--[!-->");
|
|
23
|
-
}
|
|
24
|
-
$$renderer2.push(`<!--]--> `);
|
|
25
|
-
{
|
|
26
|
-
$$renderer2.push("<!--[!-->");
|
|
27
|
-
}
|
|
28
|
-
$$renderer2.push(`<!--]-->`);
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export { _layout as default };
|
|
33
|
-
//# sourceMappingURL=_layout.svelte-BWDuddeu.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_layout.svelte-BWDuddeu.js","sources":["../../../../web/.svelte-kit/adapter-node/entries/pages/_layout.svelte.js"],"sourcesContent":["import { w as head, x as attr } from \"../../chunks/index.js\";\nimport { e as escape_html } from \"../../chunks/context.js\";\nfunction _layout($$renderer, $$props) {\n $$renderer.component(($$renderer2) => {\n let { children } = $$props;\n let cleaning = false;\n let shuttingDown = false;\n head(\"12qhfyh\", $$renderer2, ($$renderer3) => {\n $$renderer3.title(($$renderer4) => {\n $$renderer4.push(`<title>Claude Session Manager</title>`);\n });\n });\n $$renderer2.push(`<div class=\"min-h-screen flex flex-col bg-gh-bg text-gh-text\"><header class=\"bg-gh-bg-secondary border-b border-gh-border px-8 py-4 flex justify-between items-center\"><div class=\"flex items-center gap-3\"><h1 class=\"text-2xl font-semibold\">Claude Session Manager</h1> `);\n {\n $$renderer2.push(\"<!--[!-->\");\n }\n $$renderer2.push(`<!--]--></div> <div class=\"flex gap-2\"><button class=\"bg-gh-border-subtle border border-gh-border text-gh-text px-4 py-2 rounded-md text-sm transition-colors hover:bg-gh-border hover:border-gh-text-secondary disabled:opacity-50 disabled:cursor-not-allowed\"${attr(\"disabled\", cleaning, true)}>${escape_html(\"Cleanup\")}</button> <button class=\"bg-gh-red border border-gh-red text-white px-4 py-2 rounded-md text-sm transition-colors hover:bg-red-700 disabled:opacity-50 disabled:cursor-not-allowed\"${attr(\"disabled\", shuttingDown, true)}>${escape_html(\"Shutdown\")}</button></div></header> <main class=\"flex-1 p-8 max-w-7xl mx-auto w-full\">`);\n children($$renderer2);\n $$renderer2.push(`<!----></main></div> `);\n {\n $$renderer2.push(\"<!--[!-->\");\n }\n $$renderer2.push(`<!--]--> `);\n {\n $$renderer2.push(\"<!--[!-->\");\n }\n $$renderer2.push(`<!--]-->`);\n });\n}\nexport {\n _layout as default\n};\n"],"names":[],"mappings":";;;AAEA,SAAS,OAAO,CAAC,UAAU,EAAE,OAAO,EAAE;AACtC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,WAAW,KAAK;AACxC,IAAI,IAAI,EAAE,QAAQ,EAAE,GAAG,OAAO;AAC9B,IAAI,IAAI,QAAQ,GAAG,KAAK;AACxB,IAAI,IAAI,YAAY,GAAG,KAAK;AAC5B,IAAI,IAAI,CAAC,SAAS,EAAE,WAAW,EAAE,CAAC,WAAW,KAAK;AAClD,MAAM,WAAW,CAAC,KAAK,CAAC,CAAC,WAAW,KAAK;AACzC,QAAQ,WAAW,CAAC,IAAI,CAAC,CAAC,qCAAqC,CAAC,CAAC;AACjE,MAAM,CAAC,CAAC;AACR,IAAI,CAAC,CAAC;AACN,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,2QAA2Q,CAAC,CAAC;AACnS,IAAI;AACJ,MAAM,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC;AACnC,IAAI;AACJ,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,gQAAgQ,EAAE,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC,mLAAmL,EAAE,IAAI,CAAC,UAAU,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC,2EAA2E,CAAC,CAAC;AACrpB,IAAI,QAAQ,CAAC,WAAW,CAAC;AACzB,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,qBAAqB,CAAC,CAAC;AAC7C,IAAI;AACJ,MAAM,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC;AACnC,IAAI;AACJ,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC;AACjC,IAAI;AACJ,MAAM,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC;AACnC,IAAI;AACJ,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC;AAChC,EAAE,CAAC,CAAC;AACJ;;;;"}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { y as ensure_array_like, z as attr_class, x as attr, F as stringify } from './index-CXFDTUAl.js';
|
|
2
|
-
import { marked } from 'marked';
|
|
3
|
-
import { e as escape_html } from './context-R2425nfV.js';
|
|
4
|
-
|
|
5
|
-
marked.setOptions({
|
|
6
|
-
breaks: true,
|
|
7
|
-
gfm: true
|
|
8
|
-
});
|
|
9
|
-
const formatProjectName = (displayName) => {
|
|
10
|
-
return displayName.replace(/^\/Users\/[^/]+/, "~");
|
|
11
|
-
};
|
|
12
|
-
function ProjectTree($$renderer, $$props) {
|
|
13
|
-
$$renderer.component(($$renderer2) => {
|
|
14
|
-
let {
|
|
15
|
-
projects,
|
|
16
|
-
projectSessions,
|
|
17
|
-
expandedProjects,
|
|
18
|
-
selectedSession,
|
|
19
|
-
loadingProject
|
|
20
|
-
} = $$props;
|
|
21
|
-
const nonEmptyProjects = projects.filter((p) => p.sessionCount > 0);
|
|
22
|
-
let draggedSession = null;
|
|
23
|
-
let dropTargetProject = null;
|
|
24
|
-
$$renderer2.push(`<aside class="bg-gh-bg-secondary border border-gh-border rounded-lg overflow-hidden flex flex-col"><h2 class="p-4 text-base font-semibold border-b border-gh-border bg-gh-bg">Projects (${escape_html(nonEmptyProjects.length)})</h2> <ul class="overflow-y-auto flex-1"><!--[-->`);
|
|
25
|
-
const each_array = ensure_array_like(nonEmptyProjects);
|
|
26
|
-
for (let $$index_1 = 0, $$length = each_array.length; $$index_1 < $$length; $$index_1++) {
|
|
27
|
-
let project = each_array[$$index_1];
|
|
28
|
-
const isDropTarget = dropTargetProject === project.name;
|
|
29
|
-
$$renderer2.push(`<li class="border-b border-gh-border-subtle"><button${attr_class(`w-full py-3 px-4 bg-transparent border-none text-gh-text cursor-pointer text-left flex items-center gap-2 font-medium hover:bg-gh-border-subtle ${stringify(expandedProjects.has(project.name) ? "bg-gh-accent/10" : "")} ${stringify(isDropTarget ? "bg-gh-green/20 ring-2 ring-gh-green ring-inset" : "")}`)}><span class="text-xs w-3 text-gh-text-secondary">${escape_html(expandedProjects.has(project.name) ? "▼" : "▶")}</span> <span class="flex-1 overflow-hidden text-ellipsis whitespace-nowrap"${attr("title", project.display_name)}>${escape_html(formatProjectName(project.display_name))}</span> <span class="bg-gh-border px-2 py-0.5 rounded-full text-xs font-normal">${escape_html(project.sessionCount)}</span></button> `);
|
|
30
|
-
if (expandedProjects.has(project.name)) {
|
|
31
|
-
$$renderer2.push("<!--[-->");
|
|
32
|
-
$$renderer2.push(`<ul class="bg-gh-bg">`);
|
|
33
|
-
if (loadingProject === project.name) {
|
|
34
|
-
$$renderer2.push("<!--[-->");
|
|
35
|
-
$$renderer2.push(`<li class="py-2 px-8 text-gh-text-secondary text-sm">Loading...</li>`);
|
|
36
|
-
} else {
|
|
37
|
-
$$renderer2.push("<!--[!-->");
|
|
38
|
-
$$renderer2.push(`<!--[-->`);
|
|
39
|
-
const each_array_1 = ensure_array_like(projectSessions.get(project.name) ?? []);
|
|
40
|
-
for (let $$index = 0, $$length2 = each_array_1.length; $$index < $$length2; $$index++) {
|
|
41
|
-
let session = each_array_1[$$index];
|
|
42
|
-
const isSelected = selectedSession?.id === session.id;
|
|
43
|
-
const isDragging = draggedSession?.id === session.id;
|
|
44
|
-
$$renderer2.push(`<li${attr_class(`flex items-center border-t border-gh-border-subtle group ${stringify(isSelected ? "bg-gh-accent/20 border-l-3 border-l-gh-accent" : "")} ${stringify(isDragging ? "opacity-50" : "")}`)} draggable="true"><button${attr_class(`flex-1 min-w-0 py-2 pr-2 bg-transparent border-none text-gh-text cursor-pointer text-left flex items-center gap-2 text-sm hover:bg-gh-border-subtle ${stringify(isSelected ? "pl-[calc(2rem-3px)]" : "pl-8")}`)}><span class="flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap">${escape_html(session.title ?? "Untitled")}</span> <span class="flex-shrink-0 text-xs text-gh-text-secondary bg-gh-border px-1.5 py-px rounded-lg">${escape_html(session.messageCount)}</span></button> <div class="flex gap-0.5 pr-2 opacity-0 group-hover:opacity-100 transition-opacity"><button class="bg-transparent border-none cursor-pointer p-1 rounded hover:bg-gh-border text-xs" title="Rename">✏️</button> <button class="bg-transparent border-none cursor-pointer p-1 rounded hover:bg-gh-red/20 text-xs" title="Delete">🗑️</button></div></li>`);
|
|
45
|
-
}
|
|
46
|
-
$$renderer2.push(`<!--]-->`);
|
|
47
|
-
}
|
|
48
|
-
$$renderer2.push(`<!--]--></ul>`);
|
|
49
|
-
} else {
|
|
50
|
-
$$renderer2.push("<!--[!-->");
|
|
51
|
-
}
|
|
52
|
-
$$renderer2.push(`<!--]--></li>`);
|
|
53
|
-
}
|
|
54
|
-
$$renderer2.push(`<!--]--></ul></aside>`);
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
function MessageList($$renderer, $$props) {
|
|
58
|
-
$$renderer.component(($$renderer2) => {
|
|
59
|
-
let {
|
|
60
|
-
messages
|
|
61
|
-
} = $$props;
|
|
62
|
-
messages.findIndex((m) => m.type === "user" || m.type === "assistant" || m.type === "human");
|
|
63
|
-
$$renderer2.push(`<section class="bg-gh-bg-secondary border border-gh-border rounded-lg overflow-hidden flex flex-col"><div class="p-4 border-b border-gh-border bg-gh-bg flex justify-between items-start"><div class="flex-1 min-w-0">`);
|
|
64
|
-
{
|
|
65
|
-
$$renderer2.push("<!--[!-->");
|
|
66
|
-
$$renderer2.push(`<h2 class="text-base font-semibold">Messages</h2>`);
|
|
67
|
-
}
|
|
68
|
-
$$renderer2.push(`<!--]--></div> `);
|
|
69
|
-
{
|
|
70
|
-
$$renderer2.push("<!--[!-->");
|
|
71
|
-
}
|
|
72
|
-
$$renderer2.push(`<!--]--></div> `);
|
|
73
|
-
{
|
|
74
|
-
$$renderer2.push("<!--[!-->");
|
|
75
|
-
$$renderer2.push(`<p class="p-8 text-center text-gh-text-secondary">Select a session</p>`);
|
|
76
|
-
}
|
|
77
|
-
$$renderer2.push(`<!--]--></section>`);
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
function _page($$renderer, $$props) {
|
|
81
|
-
$$renderer.component(($$renderer2) => {
|
|
82
|
-
let projects = [];
|
|
83
|
-
let projectSessions = /* @__PURE__ */ new Map();
|
|
84
|
-
let expandedProjects = /* @__PURE__ */ new Set();
|
|
85
|
-
let selectedSession = null;
|
|
86
|
-
let messages = [];
|
|
87
|
-
let loadingProject = null;
|
|
88
|
-
$$renderer2.push(`<div class="grid grid-cols-[350px_1fr] gap-4 h-[calc(100vh-120px)]">`);
|
|
89
|
-
ProjectTree($$renderer2, {
|
|
90
|
-
projects,
|
|
91
|
-
projectSessions,
|
|
92
|
-
expandedProjects,
|
|
93
|
-
selectedSession,
|
|
94
|
-
loadingProject
|
|
95
|
-
});
|
|
96
|
-
$$renderer2.push(`<!----> `);
|
|
97
|
-
MessageList($$renderer2, {
|
|
98
|
-
messages
|
|
99
|
-
});
|
|
100
|
-
$$renderer2.push(`<!----></div> `);
|
|
101
|
-
{
|
|
102
|
-
$$renderer2.push("<!--[!-->");
|
|
103
|
-
}
|
|
104
|
-
$$renderer2.push(`<!--]--> `);
|
|
105
|
-
{
|
|
106
|
-
$$renderer2.push("<!--[!-->");
|
|
107
|
-
}
|
|
108
|
-
$$renderer2.push(`<!--]-->`);
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
export { _page as default };
|
|
113
|
-
//# sourceMappingURL=_page.svelte-BTPPI5f9.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_page.svelte-BTPPI5f9.js","sources":["../../../../web/.svelte-kit/adapter-node/entries/pages/_page.svelte.js"],"sourcesContent":["import { y as ensure_array_like, z as attr_class, x as attr, F as stringify } from \"../../chunks/index.js\";\nimport { marked } from \"marked\";\nimport { e as escape_html } from \"../../chunks/context.js\";\nmarked.setOptions({\n breaks: true,\n gfm: true\n});\nconst formatProjectName = (displayName) => {\n return displayName.replace(/^\\/Users\\/[^/]+/, \"~\");\n};\nfunction ProjectTree($$renderer, $$props) {\n $$renderer.component(($$renderer2) => {\n let {\n projects,\n projectSessions,\n expandedProjects,\n selectedSession,\n loadingProject\n } = $$props;\n const nonEmptyProjects = projects.filter((p) => p.sessionCount > 0);\n let draggedSession = null;\n let dropTargetProject = null;\n $$renderer2.push(`<aside class=\"bg-gh-bg-secondary border border-gh-border rounded-lg overflow-hidden flex flex-col\"><h2 class=\"p-4 text-base font-semibold border-b border-gh-border bg-gh-bg\">Projects (${escape_html(nonEmptyProjects.length)})</h2> <ul class=\"overflow-y-auto flex-1\"><!--[-->`);\n const each_array = ensure_array_like(nonEmptyProjects);\n for (let $$index_1 = 0, $$length = each_array.length; $$index_1 < $$length; $$index_1++) {\n let project = each_array[$$index_1];\n const isDropTarget = dropTargetProject === project.name;\n $$renderer2.push(`<li class=\"border-b border-gh-border-subtle\"><button${attr_class(`w-full py-3 px-4 bg-transparent border-none text-gh-text cursor-pointer text-left flex items-center gap-2 font-medium hover:bg-gh-border-subtle ${stringify(expandedProjects.has(project.name) ? \"bg-gh-accent/10\" : \"\")} ${stringify(isDropTarget ? \"bg-gh-green/20 ring-2 ring-gh-green ring-inset\" : \"\")}`)}><span class=\"text-xs w-3 text-gh-text-secondary\">${escape_html(expandedProjects.has(project.name) ? \"▼\" : \"▶\")}</span> <span class=\"flex-1 overflow-hidden text-ellipsis whitespace-nowrap\"${attr(\"title\", project.display_name)}>${escape_html(formatProjectName(project.display_name))}</span> <span class=\"bg-gh-border px-2 py-0.5 rounded-full text-xs font-normal\">${escape_html(project.sessionCount)}</span></button> `);\n if (expandedProjects.has(project.name)) {\n $$renderer2.push(\"<!--[-->\");\n $$renderer2.push(`<ul class=\"bg-gh-bg\">`);\n if (loadingProject === project.name) {\n $$renderer2.push(\"<!--[-->\");\n $$renderer2.push(`<li class=\"py-2 px-8 text-gh-text-secondary text-sm\">Loading...</li>`);\n } else {\n $$renderer2.push(\"<!--[!-->\");\n $$renderer2.push(`<!--[-->`);\n const each_array_1 = ensure_array_like(projectSessions.get(project.name) ?? []);\n for (let $$index = 0, $$length2 = each_array_1.length; $$index < $$length2; $$index++) {\n let session = each_array_1[$$index];\n const isSelected = selectedSession?.id === session.id;\n const isDragging = draggedSession?.id === session.id;\n $$renderer2.push(`<li${attr_class(`flex items-center border-t border-gh-border-subtle group ${stringify(isSelected ? \"bg-gh-accent/20 border-l-3 border-l-gh-accent\" : \"\")} ${stringify(isDragging ? \"opacity-50\" : \"\")}`)} draggable=\"true\"><button${attr_class(`flex-1 min-w-0 py-2 pr-2 bg-transparent border-none text-gh-text cursor-pointer text-left flex items-center gap-2 text-sm hover:bg-gh-border-subtle ${stringify(isSelected ? \"pl-[calc(2rem-3px)]\" : \"pl-8\")}`)}><span class=\"flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap\">${escape_html(session.title ?? \"Untitled\")}</span> <span class=\"flex-shrink-0 text-xs text-gh-text-secondary bg-gh-border px-1.5 py-px rounded-lg\">${escape_html(session.messageCount)}</span></button> <div class=\"flex gap-0.5 pr-2 opacity-0 group-hover:opacity-100 transition-opacity\"><button class=\"bg-transparent border-none cursor-pointer p-1 rounded hover:bg-gh-border text-xs\" title=\"Rename\">✏️</button> <button class=\"bg-transparent border-none cursor-pointer p-1 rounded hover:bg-gh-red/20 text-xs\" title=\"Delete\">🗑️</button></div></li>`);\n }\n $$renderer2.push(`<!--]-->`);\n }\n $$renderer2.push(`<!--]--></ul>`);\n } else {\n $$renderer2.push(\"<!--[!-->\");\n }\n $$renderer2.push(`<!--]--></li>`);\n }\n $$renderer2.push(`<!--]--></ul></aside>`);\n });\n}\nfunction MessageList($$renderer, $$props) {\n $$renderer.component(($$renderer2) => {\n let {\n messages\n } = $$props;\n messages.findIndex((m) => m.type === \"user\" || m.type === \"assistant\" || m.type === \"human\");\n $$renderer2.push(`<section class=\"bg-gh-bg-secondary border border-gh-border rounded-lg overflow-hidden flex flex-col\"><div class=\"p-4 border-b border-gh-border bg-gh-bg flex justify-between items-start\"><div class=\"flex-1 min-w-0\">`);\n {\n $$renderer2.push(\"<!--[!-->\");\n $$renderer2.push(`<h2 class=\"text-base font-semibold\">Messages</h2>`);\n }\n $$renderer2.push(`<!--]--></div> `);\n {\n $$renderer2.push(\"<!--[!-->\");\n }\n $$renderer2.push(`<!--]--></div> `);\n {\n $$renderer2.push(\"<!--[!-->\");\n $$renderer2.push(`<p class=\"p-8 text-center text-gh-text-secondary\">Select a session</p>`);\n }\n $$renderer2.push(`<!--]--></section>`);\n });\n}\nfunction _page($$renderer, $$props) {\n $$renderer.component(($$renderer2) => {\n let projects = [];\n let projectSessions = /* @__PURE__ */ new Map();\n let expandedProjects = /* @__PURE__ */ new Set();\n let selectedSession = null;\n let messages = [];\n let loadingProject = null;\n $$renderer2.push(`<div class=\"grid grid-cols-[350px_1fr] gap-4 h-[calc(100vh-120px)]\">`);\n ProjectTree($$renderer2, {\n projects,\n projectSessions,\n expandedProjects,\n selectedSession,\n loadingProject\n });\n $$renderer2.push(`<!----> `);\n MessageList($$renderer2, {\n messages\n });\n $$renderer2.push(`<!----></div> `);\n {\n $$renderer2.push(\"<!--[!-->\");\n }\n $$renderer2.push(`<!--]--> `);\n {\n $$renderer2.push(\"<!--[!-->\");\n }\n $$renderer2.push(`<!--]-->`);\n });\n}\nexport {\n _page as default\n};\n"],"names":[],"mappings":";;;;AAGA,MAAM,CAAC,UAAU,CAAC;AAClB,EAAE,MAAM,EAAE,IAAI;AACd,EAAE,GAAG,EAAE;AACP,CAAC,CAAC;AACF,MAAM,iBAAiB,GAAG,CAAC,WAAW,KAAK;AAC3C,EAAE,OAAO,WAAW,CAAC,OAAO,CA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,KAAK,CAAC;AACN,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,cAAc,CAAC,CAAC;AACtC,IAAI;AACJ,MAAM,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC;AACnC,IAAI;AACJ,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC;AACjC,IAAI;AACJ,MAAM,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC;AACnC,IAAI;AACJ,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC;AAChC,EAAE,CAAC,CAAC;AACJ;;;;"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { e as error, j as json } from './index-CoD1IJuy.js';
|
|
2
|
-
import { Effect } from 'effect';
|
|
3
|
-
import { b as deleteSession, r as readSession } from './session-DmOGNZUD.js';
|
|
4
|
-
import 'node:fs/promises';
|
|
5
|
-
import 'node:path';
|
|
6
|
-
import 'node:os';
|
|
7
|
-
|
|
8
|
-
const GET = async ({ url }) => {
|
|
9
|
-
const projectName = url.searchParams.get("project");
|
|
10
|
-
const sessionId = url.searchParams.get("id");
|
|
11
|
-
if (!projectName || !sessionId) {
|
|
12
|
-
throw error(400, "project and id parameters required");
|
|
13
|
-
}
|
|
14
|
-
const messages = await Effect.runPromise(readSession(projectName, sessionId));
|
|
15
|
-
return json(messages);
|
|
16
|
-
};
|
|
17
|
-
const DELETE = async ({ url }) => {
|
|
18
|
-
const projectName = url.searchParams.get("project");
|
|
19
|
-
const sessionId = url.searchParams.get("id");
|
|
20
|
-
if (!projectName || !sessionId) {
|
|
21
|
-
throw error(400, "project and id parameters required");
|
|
22
|
-
}
|
|
23
|
-
const result = await Effect.runPromise(deleteSession(projectName, sessionId));
|
|
24
|
-
return json(result);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export { DELETE, GET };
|
|
28
|
-
//# sourceMappingURL=_server.ts-B0JVJ9FB.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_server.ts-B0JVJ9FB.js","sources":["../../../../web/.svelte-kit/adapter-node/entries/endpoints/api/session/_server.ts.js"],"sourcesContent":["import { error, json } from \"@sveltejs/kit\";\nimport { Effect } from \"effect\";\nimport { r as readSession, b as deleteSession } from \"../../../../chunks/session.js\";\nconst GET = async ({ url }) => {\n const projectName = url.searchParams.get(\"project\");\n const sessionId = url.searchParams.get(\"id\");\n if (!projectName || !sessionId) {\n throw error(400, \"project and id parameters required\");\n }\n const messages = await Effect.runPromise(readSession(projectName, sessionId));\n return json(messages);\n};\nconst DELETE = async ({ url }) => {\n const projectName = url.searchParams.get(\"project\");\n const sessionId = url.searchParams.get(\"id\");\n if (!projectName || !sessionId) {\n throw error(400, \"project and id parameters required\");\n }\n const result = await Effect.runPromise(deleteSession(projectName, sessionId));\n return json(result);\n};\nexport {\n DELETE,\n GET\n};\n"],"names":[],"mappings":";;;;;;;AAGK,MAAC,GAAG,GAAG,OAAO,EAAE,GAAG,EAAE,KAAK;AAC/B,EAAE,MAAM,WAAW,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,SAAS,CAAC;AACrD,EAAE,MAAM,SAAS,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC;AAC9C,EAAE,IAAI,CAAC,WAAW,IAAI,CAAC,SAAS,EAAE;AAClC,IAAI,MAAM,KAAK,CAAC,GAAG,EAAE,oCAAoC,CAAC;AAC1D,EAAE;AACF,EAAE,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;AAC/E,EAAE,OAAO,IAAI,CAAC,QAAQ,CAAC;AACvB;AACK,MAAC,MAAM,GAAG,OAAO,EAAE,GAAG,EAAE,KAAK;AAClC,EAAE,MAAM,WAAW,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,SAAS,CAAC;AACrD,EAAE,MAAM,SAAS,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC;AAC9C,EAAE,IAAI,CAAC,WAAW,IAAI,CAAC,SAAS,EAAE;AAClC,IAAI,MAAM,KAAK,CAAC,GAAG,EAAE,oCAAoC,CAAC;AAC1D,EAAE;AACF,EAAE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,aAAa,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;AAC/E,EAAE,OAAO,IAAI,CAAC,MAAM,CAAC;AACrB;;;;"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { e as error, j as json } from './index-CoD1IJuy.js';
|
|
2
|
-
import { Effect } from 'effect';
|
|
3
|
-
import { g as getSessionFiles } from './session-DmOGNZUD.js';
|
|
4
|
-
import 'node:fs/promises';
|
|
5
|
-
import 'node:path';
|
|
6
|
-
import 'node:os';
|
|
7
|
-
|
|
8
|
-
const GET = async ({ url }) => {
|
|
9
|
-
const projectName = url.searchParams.get("project");
|
|
10
|
-
const sessionId = url.searchParams.get("id");
|
|
11
|
-
if (!projectName || !sessionId) {
|
|
12
|
-
throw error(400, "project and id parameters required");
|
|
13
|
-
}
|
|
14
|
-
const result = await Effect.runPromise(getSessionFiles(projectName, sessionId));
|
|
15
|
-
return json(result);
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export { GET };
|
|
19
|
-
//# sourceMappingURL=_server.ts-BLGLFyUk.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_server.ts-BLGLFyUk.js","sources":["../../../../web/.svelte-kit/adapter-node/entries/endpoints/api/session/files/_server.ts.js"],"sourcesContent":["import { error, json } from \"@sveltejs/kit\";\nimport { Effect } from \"effect\";\nimport { g as getSessionFiles } from \"../../../../../chunks/session.js\";\nconst GET = async ({ url }) => {\n const projectName = url.searchParams.get(\"project\");\n const sessionId = url.searchParams.get(\"id\");\n if (!projectName || !sessionId) {\n throw error(400, \"project and id parameters required\");\n }\n const result = await Effect.runPromise(getSessionFiles(projectName, sessionId));\n return json(result);\n};\nexport {\n GET\n};\n"],"names":[],"mappings":";;;;;;;AAGK,MAAC,GAAG,GAAG,OAAO,EAAE,GAAG,EAAE,KAAK;AAC/B,EAAE,MAAM,WAAW,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,SAAS,CAAC;AACrD,EAAE,MAAM,SAAS,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC;AAC9C,EAAE,IAAI,CAAC,WAAW,IAAI,CAAC,SAAS,EAAE;AAClC,IAAI,MAAM,KAAK,CAAC,GAAG,EAAE,oCAAoC,CAAC;AAC1D,EAAE;AACF,EAAE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,eAAe,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;AACjF,EAAE,OAAO,IAAI,CAAC,MAAM,CAAC;AACrB;;;;"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { j as json } from './index-CoD1IJuy.js';
|
|
2
|
-
import { Effect } from 'effect';
|
|
3
|
-
import { l as listProjects } from './session-DmOGNZUD.js';
|
|
4
|
-
import 'node:fs/promises';
|
|
5
|
-
import 'node:path';
|
|
6
|
-
import 'node:os';
|
|
7
|
-
|
|
8
|
-
const GET = async () => {
|
|
9
|
-
const projects = await Effect.runPromise(listProjects);
|
|
10
|
-
return json(projects);
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export { GET };
|
|
14
|
-
//# sourceMappingURL=_server.ts-BaqmP9oG.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_server.ts-BaqmP9oG.js","sources":["../../../../web/.svelte-kit/adapter-node/entries/endpoints/api/projects/_server.ts.js"],"sourcesContent":["import { json } from \"@sveltejs/kit\";\nimport { Effect } from \"effect\";\nimport { l as listProjects } from \"../../../../chunks/session.js\";\nconst GET = async () => {\n const projects = await Effect.runPromise(listProjects);\n return json(projects);\n};\nexport {\n GET\n};\n"],"names":[],"mappings":";;;;;;;AAGK,MAAC,GAAG,GAAG,YAAY;AACxB,EAAE,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,YAAY,CAAC;AACxD,EAAE,OAAO,IAAI,CAAC,QAAQ,CAAC;AACvB;;;;"}
|