@aipanel/provider-opencode 1.2.0-beta.1 → 1.2.0-beta.3
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/es/constants.d.ts +0 -3
- package/es/constants.js +0 -2
- package/es/opencode-web.js +3 -3
- package/lib/constants.cjs +0 -3
- package/lib/constants.d.ts +0 -3
- package/lib/opencode-web.cjs +2 -3
- package/package.json +3 -3
package/es/constants.d.ts
CHANGED
|
@@ -24,9 +24,6 @@ export declare const DEFAULT_OPENCODE_SETTINGS: {
|
|
|
24
24
|
shellToolPartsExpanded: boolean;
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
|
-
/** ==================== 运行环境 ==================== */
|
|
28
|
-
/** OpenCode 缓存目录(相对于项目根目录,存放 opencode.json 等运行状态) */
|
|
29
|
-
export declare const OPENCODE_CACHE_DIR = "node_modules/.cache/opencode";
|
|
30
27
|
/** ==================== Provider 专属配置默认值 ==================== */
|
|
31
28
|
/** OpenCode Provider 专属配置默认值(插件组装 config 时使用) */
|
|
32
29
|
export declare const DEFAULT_OPENCODE_PROVIDER_OPTIONS: OpenCodeProviderOptions;
|
package/es/constants.js
CHANGED
|
@@ -15,7 +15,6 @@ const DEFAULT_OPENCODE_SETTINGS = {
|
|
|
15
15
|
shellToolPartsExpanded: true
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
|
-
const OPENCODE_CACHE_DIR = "node_modules/.cache/opencode";
|
|
19
18
|
const DEFAULT_OPENCODE_PROVIDER_OPTIONS = {
|
|
20
19
|
enableLsp: true,
|
|
21
20
|
enableBlockOnError: false,
|
|
@@ -24,6 +23,5 @@ const DEFAULT_OPENCODE_PROVIDER_OPTIONS = {
|
|
|
24
23
|
export {
|
|
25
24
|
DEFAULT_OPENCODE_PROVIDER_OPTIONS,
|
|
26
25
|
DEFAULT_OPENCODE_SETTINGS,
|
|
27
|
-
OPENCODE_CACHE_DIR,
|
|
28
26
|
OPENCODE_STORAGE_KEYS
|
|
29
27
|
};
|
package/es/opencode-web.js
CHANGED
|
@@ -2,8 +2,8 @@ import { execa } from "execa";
|
|
|
2
2
|
import fs from "fs";
|
|
3
3
|
import path from "path";
|
|
4
4
|
import { pathToFileURL } from "url";
|
|
5
|
-
import { OPENCODE_CACHE_DIR } from "./constants.js";
|
|
6
5
|
import {
|
|
6
|
+
AIPANEL_CACHE_DIR,
|
|
7
7
|
MCP_API_PATH,
|
|
8
8
|
VSCODE_EXTENSION_PORT,
|
|
9
9
|
ENV_VSCODE_PORT,
|
|
@@ -16,7 +16,7 @@ const require2 = createPackageRequire();
|
|
|
16
16
|
const packageDir = resolvePackageDir("@aipanel/opencode-plugins");
|
|
17
17
|
const log = createLogger("OpenCodeWeb");
|
|
18
18
|
function prepareOpenCodeRuntime(cwd, vitePort, enableLsp, enablePrettier) {
|
|
19
|
-
const cacheDir = path.join(cwd,
|
|
19
|
+
const cacheDir = path.join(cwd, AIPANEL_CACHE_DIR, "opencode");
|
|
20
20
|
log.debug("Setting up OpenCode runtime", { cacheDir, enableLsp });
|
|
21
21
|
if (!fs.existsSync(cacheDir)) {
|
|
22
22
|
fs.mkdirSync(cacheDir, { recursive: true });
|
|
@@ -118,7 +118,7 @@ function startOpenCodeWeb(options) {
|
|
|
118
118
|
return proc;
|
|
119
119
|
}
|
|
120
120
|
function createStateDirectory(cwd) {
|
|
121
|
-
const stateDir = path.join(cwd,
|
|
121
|
+
const stateDir = path.join(cwd, AIPANEL_CACHE_DIR, "opencode");
|
|
122
122
|
if (!fs.existsSync(stateDir)) {
|
|
123
123
|
fs.mkdirSync(stateDir, { recursive: true });
|
|
124
124
|
log.debug("Created state directory", { stateDir });
|
package/lib/constants.cjs
CHANGED
|
@@ -19,7 +19,6 @@ var constants_exports = {};
|
|
|
19
19
|
__export(constants_exports, {
|
|
20
20
|
DEFAULT_OPENCODE_PROVIDER_OPTIONS: () => DEFAULT_OPENCODE_PROVIDER_OPTIONS,
|
|
21
21
|
DEFAULT_OPENCODE_SETTINGS: () => DEFAULT_OPENCODE_SETTINGS,
|
|
22
|
-
OPENCODE_CACHE_DIR: () => OPENCODE_CACHE_DIR,
|
|
23
22
|
OPENCODE_STORAGE_KEYS: () => OPENCODE_STORAGE_KEYS
|
|
24
23
|
});
|
|
25
24
|
module.exports = __toCommonJS(constants_exports);
|
|
@@ -40,7 +39,6 @@ const DEFAULT_OPENCODE_SETTINGS = {
|
|
|
40
39
|
shellToolPartsExpanded: true
|
|
41
40
|
}
|
|
42
41
|
};
|
|
43
|
-
const OPENCODE_CACHE_DIR = "node_modules/.cache/opencode";
|
|
44
42
|
const DEFAULT_OPENCODE_PROVIDER_OPTIONS = {
|
|
45
43
|
enableLsp: true,
|
|
46
44
|
enableBlockOnError: false,
|
|
@@ -50,6 +48,5 @@ const DEFAULT_OPENCODE_PROVIDER_OPTIONS = {
|
|
|
50
48
|
0 && (module.exports = {
|
|
51
49
|
DEFAULT_OPENCODE_PROVIDER_OPTIONS,
|
|
52
50
|
DEFAULT_OPENCODE_SETTINGS,
|
|
53
|
-
OPENCODE_CACHE_DIR,
|
|
54
51
|
OPENCODE_STORAGE_KEYS
|
|
55
52
|
});
|
package/lib/constants.d.ts
CHANGED
|
@@ -24,9 +24,6 @@ export declare const DEFAULT_OPENCODE_SETTINGS: {
|
|
|
24
24
|
shellToolPartsExpanded: boolean;
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
|
-
/** ==================== 运行环境 ==================== */
|
|
28
|
-
/** OpenCode 缓存目录(相对于项目根目录,存放 opencode.json 等运行状态) */
|
|
29
|
-
export declare const OPENCODE_CACHE_DIR = "node_modules/.cache/opencode";
|
|
30
27
|
/** ==================== Provider 专属配置默认值 ==================== */
|
|
31
28
|
/** OpenCode Provider 专属配置默认值(插件组装 config 时使用) */
|
|
32
29
|
export declare const DEFAULT_OPENCODE_PROVIDER_OPTIONS: OpenCodeProviderOptions;
|
package/lib/opencode-web.cjs
CHANGED
|
@@ -35,13 +35,12 @@ var import_execa = require("execa");
|
|
|
35
35
|
var import_fs = __toESM(require("fs"));
|
|
36
36
|
var import_path = __toESM(require("path"));
|
|
37
37
|
var import_url = require("url");
|
|
38
|
-
var import_constants = require("./constants.cjs");
|
|
39
38
|
var import_node = require("@aipanel/core/node");
|
|
40
39
|
const require2 = (0, import_node.createPackageRequire)();
|
|
41
40
|
const packageDir = (0, import_node.resolvePackageDir)("@aipanel/opencode-plugins");
|
|
42
41
|
const log = (0, import_node.createLogger)("OpenCodeWeb");
|
|
43
42
|
function prepareOpenCodeRuntime(cwd, vitePort, enableLsp, enablePrettier) {
|
|
44
|
-
const cacheDir = import_path.default.join(cwd,
|
|
43
|
+
const cacheDir = import_path.default.join(cwd, import_node.AIPANEL_CACHE_DIR, "opencode");
|
|
45
44
|
log.debug("Setting up OpenCode runtime", { cacheDir, enableLsp });
|
|
46
45
|
if (!import_fs.default.existsSync(cacheDir)) {
|
|
47
46
|
import_fs.default.mkdirSync(cacheDir, { recursive: true });
|
|
@@ -143,7 +142,7 @@ function startOpenCodeWeb(options) {
|
|
|
143
142
|
return proc;
|
|
144
143
|
}
|
|
145
144
|
function createStateDirectory(cwd) {
|
|
146
|
-
const stateDir = import_path.default.join(cwd,
|
|
145
|
+
const stateDir = import_path.default.join(cwd, import_node.AIPANEL_CACHE_DIR, "opencode");
|
|
147
146
|
if (!import_fs.default.existsSync(stateDir)) {
|
|
148
147
|
import_fs.default.mkdirSync(stateDir, { recursive: true });
|
|
149
148
|
log.debug("Created state directory", { stateDir });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aipanel/provider-opencode",
|
|
3
|
-
"version": "1.2.0-beta.
|
|
3
|
+
"version": "1.2.0-beta.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"execa": "^9.6.1",
|
|
25
|
-
"@aipanel/core": "1.2.0-beta.
|
|
26
|
-
"@aipanel/opencode-plugins": "1.2.0-beta.
|
|
25
|
+
"@aipanel/core": "1.2.0-beta.3",
|
|
26
|
+
"@aipanel/opencode-plugins": "1.2.0-beta.3"
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
29
|
"build": "pagoda-cli build",
|