@chainingintention/pi-web-cn 1.202608.3 → 1.202608.5
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/client/assets/{CodeViewer-4gPJstDS.js → CodeViewer-BUT2Idcq.js} +1 -1
- package/dist/client/assets/{TerminalPanel-BOafuuU6.js → TerminalPanel-b8CZY7en.js} +1 -1
- package/dist/client/assets/{UnifiedDiffViewer-BZewUESj.js → UnifiedDiffViewer-CXY7AXrD.js} +1 -1
- package/dist/client/assets/{index-DHGDF1O1.js → index-80SI7dCz.js} +229 -218
- package/dist/client/index.html +1 -1
- package/dist/server/sessions/piSessionService.js +16 -1
- package/dist/server/sessions/piSessionService.js.map +1 -1
- package/package.json +1 -1
package/dist/client/index.html
CHANGED
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--pi-bg); color: var(--pi-text); }
|
|
54
54
|
body { min-height: 100dvh; }
|
|
55
55
|
</style>
|
|
56
|
-
<script type="module" crossorigin src="./assets/index-
|
|
56
|
+
<script type="module" crossorigin src="./assets/index-80SI7dCz.js"></script>
|
|
57
57
|
<link rel="modulepreload" crossorigin href="./assets/vendor-editor-core-vUi74DnD.js">
|
|
58
58
|
<link rel="modulepreload" crossorigin href="./assets/vendor-editor-languages-DoaXUodB.js">
|
|
59
59
|
</head>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { statSync } from "node:fs";
|
|
1
|
+
import { realpathSync, statSync } from "node:fs";
|
|
2
2
|
import { readFile, writeFile } from "node:fs/promises";
|
|
3
3
|
import { basename, dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
4
4
|
import { createAgentSessionFromServices, createAgentSessionRuntime, createAgentSessionServices, createEditToolDefinition, createFindToolDefinition, createGrepToolDefinition, getAgentDir, createLsToolDefinition, createReadToolDefinition, createWriteToolDefinition, defineTool, ModelRuntime, readStoredCredential, SessionManager, } from "@earendil-works/pi-coding-agent";
|
|
@@ -136,6 +136,20 @@ export function filterManagedGlobalContextFiles(cwd, agentDir, base) {
|
|
|
136
136
|
}),
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
|
+
export function filterManagedProjectSkills(cwd, base) {
|
|
140
|
+
const projectRoot = realpathSync(cwd);
|
|
141
|
+
return {
|
|
142
|
+
...base,
|
|
143
|
+
skills: base.skills.filter((skill) => {
|
|
144
|
+
try {
|
|
145
|
+
return pathInsideOrEqual(projectRoot, realpathSync(skill.filePath));
|
|
146
|
+
}
|
|
147
|
+
catch {
|
|
148
|
+
return false;
|
|
149
|
+
}
|
|
150
|
+
}),
|
|
151
|
+
};
|
|
152
|
+
}
|
|
139
153
|
function pathInsideOrEqual(parent, child) {
|
|
140
154
|
const normalizedParent = resolve(parent);
|
|
141
155
|
const normalizedChild = resolve(child);
|
|
@@ -319,6 +333,7 @@ function createManagementRuntimeFactory(modelRuntime, resolveSettingsScope, spaw
|
|
|
319
333
|
settingsManager,
|
|
320
334
|
resourceLoaderOptions: {
|
|
321
335
|
agentsFilesOverride: (base) => filterManagedGlobalContextFiles(cwd, agentDir, base),
|
|
336
|
+
skillsOverride: (base) => filterManagedProjectSkills(cwd, base),
|
|
322
337
|
},
|
|
323
338
|
});
|
|
324
339
|
const managedToolOptions = createManagedAgentToolOptions(cwd);
|