@sourcegraph/cody-web 0.8.3 → 0.10.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/LICENSE +201 -0
- package/dist/agent.worker-D-CTHcD9.mjs +173398 -0
- package/dist/agent.worker.js +2 -2
- package/dist/{browser-fSoJnYQE.mjs → browser-xmS9GzfL.mjs} +19966 -18646
- package/dist/{git-log-DFDYqWm8.mjs → git-log-oavcyP_a.mjs} +2 -2
- package/dist/{index-D37eXObq.mjs → index-CGL3SWV3.mjs} +2 -2
- package/dist/index.js +34526 -33465
- package/dist/lib/agent/agent.client.d.ts.map +1 -1
- package/dist/lib/agent/index-db-storage.d.ts.map +1 -1
- package/dist/lib/agent/shims/inline-completion-item-provider.d.ts +2 -3
- package/dist/lib/agent/shims/inline-completion-item-provider.d.ts.map +1 -1
- package/dist/lib/components/CodyWebChat.d.ts.map +1 -1
- package/dist/style.css +518 -198
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +17 -15
- package/dist/agent.worker-BRaA9Bfg.mjs +0 -66676
- package/dist/shell-CMHu3sfo.mjs +0 -48
- package/dist/util-HSH4uVeM.mjs +0 -28
package/dist/shell-CMHu3sfo.mjs
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { e as exec, o as os, a as env, w as window, p as path, b as workspace, U as Uri, l as logError } from "./agent.worker-BRaA9Bfg.mjs";
|
|
2
|
-
import { a as utilExports } from "./util-HSH4uVeM.mjs";
|
|
3
|
-
import { w as wrapInActiveSpan, T as TokenCounterUtils, C as ContextItemSource } from "./browser-fSoJnYQE.mjs";
|
|
4
|
-
var define_process_default = { env: {} };
|
|
5
|
-
const _exec = utilExports.promisify(exec);
|
|
6
|
-
async function getContextFileFromShell(command) {
|
|
7
|
-
return wrapInActiveSpan("commands.context.command", async (span) => {
|
|
8
|
-
var _a, _b, _c;
|
|
9
|
-
const rootDir = os.homedir() || define_process_default.env.HOME || define_process_default.env.USERPROFILE || "";
|
|
10
|
-
if (!env.shell) {
|
|
11
|
-
void window.showErrorMessage("Shell command is not supported your current workspace.");
|
|
12
|
-
return [];
|
|
13
|
-
}
|
|
14
|
-
const filteredCommand = command.replaceAll(/(\s~\/)/g, ` ${rootDir}${path.sep}`);
|
|
15
|
-
const cwd = (_c = (_b = (_a = workspace.workspaceFolders) == null ? void 0 : _a[0]) == null ? void 0 : _b.uri) == null ? void 0 : _c.fsPath;
|
|
16
|
-
try {
|
|
17
|
-
const { stdout, stderr } = await _exec(filteredCommand, { cwd, encoding: "utf8" });
|
|
18
|
-
const output = JSON.stringify(stdout ?? stderr).trim();
|
|
19
|
-
if (!output) {
|
|
20
|
-
throw new Error("Empty output");
|
|
21
|
-
}
|
|
22
|
-
const content = outputWrapper.replace("{command}", command).replace("{output}", output);
|
|
23
|
-
const size = await TokenCounterUtils.countTokens(content);
|
|
24
|
-
return [
|
|
25
|
-
{
|
|
26
|
-
type: "file",
|
|
27
|
-
content,
|
|
28
|
-
title: "Terminal Output",
|
|
29
|
-
uri: Uri.file(command),
|
|
30
|
-
source: ContextItemSource.Terminal,
|
|
31
|
-
size
|
|
32
|
-
}
|
|
33
|
-
];
|
|
34
|
-
} catch (error) {
|
|
35
|
-
logError("getContextFileFromShell", "failed", { verbose: error });
|
|
36
|
-
void window.showErrorMessage(error.message);
|
|
37
|
-
throw new Error("Failed to get shell output for Custom Command.");
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
const outputWrapper = `
|
|
42
|
-
Terminal output from the \`{command}\` command enclosed between <OUTPUT0412> tags:
|
|
43
|
-
<OUTPUT0412>
|
|
44
|
-
{output}
|
|
45
|
-
</OUTPUT0412>`;
|
|
46
|
-
export {
|
|
47
|
-
getContextFileFromShell
|
|
48
|
-
};
|
package/dist/util-HSH4uVeM.mjs
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { r as requireUtil } from "./agent.worker-BRaA9Bfg.mjs";
|
|
2
|
-
function _mergeNamespaces(n, m) {
|
|
3
|
-
for (var i = 0; i < m.length; i++) {
|
|
4
|
-
const e = m[i];
|
|
5
|
-
if (typeof e !== "string" && !Array.isArray(e)) {
|
|
6
|
-
for (const k in e) {
|
|
7
|
-
if (k !== "default" && !(k in n)) {
|
|
8
|
-
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
9
|
-
if (d) {
|
|
10
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: () => e[k]
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
return Object.freeze(Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }));
|
|
20
|
-
}
|
|
21
|
-
var utilExports = requireUtil();
|
|
22
|
-
const util = /* @__PURE__ */ _mergeNamespaces({
|
|
23
|
-
__proto__: null
|
|
24
|
-
}, [utilExports]);
|
|
25
|
-
export {
|
|
26
|
-
utilExports as a,
|
|
27
|
-
util as u
|
|
28
|
-
};
|