@vite-plugin-opencode-assistant/opencode 1.0.65 → 1.0.66
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.
|
@@ -59,12 +59,11 @@ ${logFileConfig.description}
|
|
|
59
59
|
level: tool.schema.string().optional().describe(
|
|
60
60
|
"\u65E5\u5FD7\u7EA7\u522B\u8FC7\u6EE4\uFF1Aerror(\u9519\u8BEF)\u3001warn(\u8B66\u544A)\u3001info(\u4FE1\u606F)\u3002\u591A\u4E2A\u7528\u9017\u53F7\u5206\u9694\uFF0C\u5982 'error,warn'"
|
|
61
61
|
),
|
|
62
|
-
limit: tool.schema.number().int().min(1).max(200).optional().default(50).describe("\u8FD4\u56DE\u6761\u6570\uFF0C\u9ED8\u8BA4 50\uFF0C\u6700\u5927 200")
|
|
63
|
-
since: tool.schema.string().optional().describe("\u8D77\u59CB\u65F6\u95F4\uFF08ISO \u683C\u5F0F\uFF09\uFF0C\u83B7\u53D6\u6B64\u65F6\u95F4\u4E4B\u540E\u7684\u65E5\u5FD7")
|
|
62
|
+
limit: tool.schema.number().int().min(1).max(200).optional().default(50).describe("\u8FD4\u56DE\u6761\u6570\uFF0C\u9ED8\u8BA4 50\uFF0C\u6700\u5927 200")
|
|
64
63
|
},
|
|
65
64
|
execute(args, context) {
|
|
66
65
|
return __async(this, null, function* () {
|
|
67
|
-
const { level, limit
|
|
66
|
+
const { level, limit } = args;
|
|
68
67
|
log.debug(`${toolName} called`, {
|
|
69
68
|
args,
|
|
70
69
|
sessionID: context.sessionID,
|
|
@@ -77,7 +76,6 @@ ${logFileConfig.description}
|
|
|
77
76
|
projectRoot: process.cwd(),
|
|
78
77
|
lines: Math.max(requestedLimit * 3, 500),
|
|
79
78
|
level: level ? level.split(",").map((l) => l.trim()) : void 0,
|
|
80
|
-
since,
|
|
81
79
|
limit: requestedLimit
|
|
82
80
|
});
|
|
83
81
|
if (entries.length === 0) {
|
|
@@ -88,9 +86,8 @@ ${logFileConfig.description}
|
|
|
88
86
|
- \u4F7F\u7528 level=error,warn \u83B7\u53D6\u9519\u8BEF\u548C\u8B66\u544A`;
|
|
89
87
|
}
|
|
90
88
|
const formattedLogs = entries.map((entry) => {
|
|
91
|
-
const time = new Date(entry.timestamp).toLocaleTimeString();
|
|
92
89
|
const levelIcon = entry.level === "error" ? "\u274C" : entry.level === "warn" ? "\u26A0\uFE0F" : "\u2139\uFE0F";
|
|
93
|
-
return `${
|
|
90
|
+
return `${levelIcon} ${entry.message}`;
|
|
94
91
|
}).join("\n");
|
|
95
92
|
return `${logFileConfig.name} \u65E5\u5FD7\uFF08${entries.length} \u6761\uFF09\uFF1A
|
|
96
93
|
|
|
@@ -82,12 +82,11 @@ ${logFileConfig.description}
|
|
|
82
82
|
level: import_plugin.tool.schema.string().optional().describe(
|
|
83
83
|
"\u65E5\u5FD7\u7EA7\u522B\u8FC7\u6EE4\uFF1Aerror(\u9519\u8BEF)\u3001warn(\u8B66\u544A)\u3001info(\u4FE1\u606F)\u3002\u591A\u4E2A\u7528\u9017\u53F7\u5206\u9694\uFF0C\u5982 'error,warn'"
|
|
84
84
|
),
|
|
85
|
-
limit: import_plugin.tool.schema.number().int().min(1).max(200).optional().default(50).describe("\u8FD4\u56DE\u6761\u6570\uFF0C\u9ED8\u8BA4 50\uFF0C\u6700\u5927 200")
|
|
86
|
-
since: import_plugin.tool.schema.string().optional().describe("\u8D77\u59CB\u65F6\u95F4\uFF08ISO \u683C\u5F0F\uFF09\uFF0C\u83B7\u53D6\u6B64\u65F6\u95F4\u4E4B\u540E\u7684\u65E5\u5FD7")
|
|
85
|
+
limit: import_plugin.tool.schema.number().int().min(1).max(200).optional().default(50).describe("\u8FD4\u56DE\u6761\u6570\uFF0C\u9ED8\u8BA4 50\uFF0C\u6700\u5927 200")
|
|
87
86
|
},
|
|
88
87
|
execute(args, context) {
|
|
89
88
|
return __async(this, null, function* () {
|
|
90
|
-
const { level, limit
|
|
89
|
+
const { level, limit } = args;
|
|
91
90
|
log.debug(`${toolName} called`, {
|
|
92
91
|
args,
|
|
93
92
|
sessionID: context.sessionID,
|
|
@@ -100,7 +99,6 @@ ${logFileConfig.description}
|
|
|
100
99
|
projectRoot: process.cwd(),
|
|
101
100
|
lines: Math.max(requestedLimit * 3, 500),
|
|
102
101
|
level: level ? level.split(",").map((l) => l.trim()) : void 0,
|
|
103
|
-
since,
|
|
104
102
|
limit: requestedLimit
|
|
105
103
|
});
|
|
106
104
|
if (entries.length === 0) {
|
|
@@ -111,9 +109,8 @@ ${logFileConfig.description}
|
|
|
111
109
|
- \u4F7F\u7528 level=error,warn \u83B7\u53D6\u9519\u8BEF\u548C\u8B66\u544A`;
|
|
112
110
|
}
|
|
113
111
|
const formattedLogs = entries.map((entry) => {
|
|
114
|
-
const time = new Date(entry.timestamp).toLocaleTimeString();
|
|
115
112
|
const levelIcon = entry.level === "error" ? "\u274C" : entry.level === "warn" ? "\u26A0\uFE0F" : "\u2139\uFE0F";
|
|
116
|
-
return `${
|
|
113
|
+
return `${levelIcon} ${entry.message}`;
|
|
117
114
|
}).join("\n");
|
|
118
115
|
return `${logFileConfig.name} \u65E5\u5FD7\uFF08${entries.length} \u6761\uFF09\uFF1A
|
|
119
116
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vite-plugin-opencode-assistant/opencode",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.66",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"execa": "^9.6.1",
|
|
25
|
-
"@vite-plugin-opencode-assistant/shared": "1.0.
|
|
25
|
+
"@vite-plugin-opencode-assistant/shared": "1.0.66"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@opencode-ai/plugin": "^1.3.15",
|