@cryptiklemur/lattice 1.18.5 → 1.19.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/client/src/utils/editorUrl.ts +14 -13
- package/package.json +1 -1
- package/server/src/daemon.ts +12 -0
|
@@ -9,18 +9,21 @@ function toWindowsPath(linuxPath: string, wslDistro: string): string {
|
|
|
9
9
|
return "\\\\" + "wsl.localhost\\" + wslDistro + linuxPath.replace(/\//g, "\\");
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
function buildJetBrainsUrl(ideId: string,
|
|
12
|
+
function buildJetBrainsUrl(ideId: string, relativePath: string, line?: number, projectName?: string, projectRoot?: string): string {
|
|
13
13
|
var url = "jetbrains://" + ideId + "/navigate/reference?";
|
|
14
|
+
var params: string[] = [];
|
|
14
15
|
if (projectName) {
|
|
15
|
-
|
|
16
|
+
params.push("project=" + encodeURIComponent(projectName));
|
|
17
|
+
} else if (projectRoot) {
|
|
18
|
+
params.push("origin=" + encodeURIComponent(projectRoot));
|
|
16
19
|
}
|
|
17
|
-
if (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
if (relativePath) {
|
|
21
|
+
params.push("path=" + encodeURIComponent(relativePath));
|
|
22
|
+
}
|
|
23
|
+
if (line) {
|
|
24
|
+
params.push("line=" + String(line));
|
|
22
25
|
}
|
|
23
|
-
return url;
|
|
26
|
+
return url + params.join("&");
|
|
24
27
|
}
|
|
25
28
|
|
|
26
29
|
export interface EditorUrlOptions {
|
|
@@ -38,11 +41,9 @@ export function getEditorUrl(editorType: string, projectPath: string, filePath:
|
|
|
38
41
|
|
|
39
42
|
var jetbrainsId = JETBRAINS_IDS[editorType];
|
|
40
43
|
if (jetbrainsId) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
return buildJetBrainsUrl(jetbrainsId, resolvedPath, line);
|
|
44
|
+
var jbRelativePath = filePath === "." ? "" : filePath;
|
|
45
|
+
var jbProjectRoot = wslDistro ? toWindowsPath(projectPath, wslDistro) : projectPath;
|
|
46
|
+
return buildJetBrainsUrl(jetbrainsId, jbRelativePath, line, ideProjectName || undefined, ideProjectName ? undefined : jbProjectRoot);
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
if (editorType === "vscode" || editorType === "vscode-insiders" || editorType === "cursor") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cryptiklemur/lattice",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.19.0",
|
|
4
4
|
"description": "Multi-machine agentic dashboard for Claude Code. Monitor sessions, manage MCP servers and skills, orchestrate across mesh-networked nodes.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Aaron Scherer <me@aaronscherer.me>",
|
package/server/src/daemon.ts
CHANGED
|
@@ -373,4 +373,16 @@ export async function startDaemon(portOverride?: number | null): Promise<void> {
|
|
|
373
373
|
return;
|
|
374
374
|
}
|
|
375
375
|
});
|
|
376
|
+
|
|
377
|
+
setInterval(function () {
|
|
378
|
+
var currentConfig = loadConfig();
|
|
379
|
+
var currentIdentity = loadOrCreateIdentity();
|
|
380
|
+
broadcast({ type: "mesh:nodes", nodes: buildNodesMessage() });
|
|
381
|
+
broadcast({
|
|
382
|
+
type: "projects:list",
|
|
383
|
+
projects: currentConfig.projects.map(function (p: typeof currentConfig.projects[number]) {
|
|
384
|
+
return { slug: p.slug, path: p.path, title: p.title, nodeId: currentIdentity.id, nodeName: currentConfig.name, isRemote: false };
|
|
385
|
+
}),
|
|
386
|
+
});
|
|
387
|
+
}, 10000);
|
|
376
388
|
}
|