@comate/zulu 0.4.0 → 0.5.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/README.md +4 -0
- package/comate-engine/fallbackServer.js +1 -1
- package/comate-engine/node_modules/@comate/plugin-engine/dist/index.js +8 -8
- package/comate-engine/node_modules/@comate/plugin-host/dist/index.js +1 -1
- package/comate-engine/node_modules/@comate/plugin-host/dist/main.js +3 -3
- package/comate-engine/node_modules/@comate/plugin-host/dist/user-CcQDM3F-.js +44 -0
- package/comate-engine/node_modules/@comate/plugin-shared-internals/dist/index.d.ts +197 -16
- package/comate-engine/node_modules/@comate/plugin-shared-internals/dist/index.js +8 -8
- package/comate-engine/node_modules/@comate/preview-proxy/bin/preview.js +1 -0
- package/comate-engine/node_modules/@comate/preview-proxy/dist/index.js +53 -53
- package/comate-engine/node_modules/@comate/preview-proxy/static/comate-preview-injector.css +1 -1
- package/comate-engine/node_modules/@comate/preview-proxy/static/comate-preview-injector.js +1 -1
- package/comate-engine/node_modules/better-sqlite3/deps/download.sh +1 -1
- package/comate-engine/node_modules/better-sqlite3/deps/sqlite3/sqlite3.c +122 -81
- package/comate-engine/node_modules/better-sqlite3/deps/sqlite3/sqlite3.h +45 -45
- package/comate-engine/node_modules/better-sqlite3/lib/database.js +1 -1
- package/comate-engine/node_modules/better-sqlite3/node_modules/.bin/prebuild-install +2 -2
- package/comate-engine/node_modules/better-sqlite3/package.json +4 -7
- package/comate-engine/node_modules/better-sqlite3/src/addon.cpp +47 -0
- package/comate-engine/node_modules/better-sqlite3/src/better_sqlite3.cpp +44 -2164
- package/comate-engine/node_modules/better-sqlite3/src/objects/backup.cpp +120 -0
- package/comate-engine/node_modules/better-sqlite3/src/objects/backup.hpp +36 -0
- package/comate-engine/node_modules/better-sqlite3/src/objects/database.cpp +417 -0
- package/comate-engine/node_modules/better-sqlite3/src/objects/database.hpp +103 -0
- package/comate-engine/node_modules/better-sqlite3/src/objects/statement-iterator.cpp +113 -0
- package/comate-engine/node_modules/better-sqlite3/src/objects/statement-iterator.hpp +50 -0
- package/comate-engine/node_modules/better-sqlite3/src/objects/statement.cpp +383 -0
- package/comate-engine/node_modules/better-sqlite3/src/objects/statement.hpp +58 -0
- package/comate-engine/node_modules/better-sqlite3/src/util/bind-map.cpp +73 -0
- package/comate-engine/node_modules/better-sqlite3/src/util/binder.cpp +193 -0
- package/comate-engine/node_modules/better-sqlite3/src/util/constants.cpp +172 -0
- package/comate-engine/node_modules/better-sqlite3/src/util/custom-aggregate.cpp +121 -0
- package/comate-engine/node_modules/better-sqlite3/src/util/custom-function.cpp +59 -0
- package/comate-engine/node_modules/better-sqlite3/src/util/custom-table.cpp +409 -0
- package/comate-engine/node_modules/better-sqlite3/src/util/data-converter.cpp +17 -0
- package/comate-engine/node_modules/better-sqlite3/src/util/data.cpp +194 -0
- package/comate-engine/node_modules/better-sqlite3/src/util/helpers.cpp +109 -0
- package/comate-engine/node_modules/better-sqlite3/src/util/macros.cpp +63 -0
- package/comate-engine/node_modules/better-sqlite3/src/util/query-macros.cpp +71 -0
- package/comate-engine/node_modules/better-sqlite3/src/util/row-builder.cpp +49 -0
- package/comate-engine/package.json +8 -5
- package/comate-engine/plugins/demo-feature/dist/index.js +128 -61
- package/comate-engine/plugins/demo-feature/dist/providers/renderJsx.js +10 -1
- package/comate-engine/plugins/demo-timer/assets/icon.svg +2 -0
- package/comate-engine/plugins/demo-timer/dist/index.js +463 -0
- package/comate-engine/plugins/demo-timer/package.json +73 -0
- package/comate-engine/server.js +136 -53
- package/dist/bundle/index.js +8 -8
- package/package.json +1 -1
- package/comate-engine/node_modules/@comate/plugin-host/dist/user-DQgjkMe9.js +0 -44
- package/comate-engine/node_modules/better-sqlite3/src/better_sqlite3.hpp +0 -1036
- package/comate-engine/node_modules/sql.js/.devcontainer/Dockerfile +0 -76
- package/comate-engine/node_modules/sql.js/.devcontainer/devcontainer.json +0 -20
- package/comate-engine/node_modules/sql.js/.eslintrc.js +0 -68
- package/comate-engine/node_modules/sql.js/.jsdoc.config.json +0 -38
- package/comate-engine/node_modules/sql.js/.nojekyll +0 -0
- package/comate-engine/node_modules/sql.js/AUTHORS +0 -8
- package/comate-engine/node_modules/sql.js/CONTRIBUTING.md +0 -66
- package/comate-engine/node_modules/sql.js/LICENSE +0 -44
- package/comate-engine/node_modules/sql.js/README.md +0 -357
- package/comate-engine/node_modules/sql.js/dist/sql-asm-debug.js +0 -140661
- package/comate-engine/node_modules/sql.js/dist/sql-asm-memory-growth.js +0 -209
- package/comate-engine/node_modules/sql.js/dist/sql-asm.js +0 -209
- package/comate-engine/node_modules/sql.js/dist/sql-wasm-debug.js +0 -6989
- package/comate-engine/node_modules/sql.js/dist/sql-wasm-debug.wasm +0 -0
- package/comate-engine/node_modules/sql.js/dist/sql-wasm.js +0 -188
- package/comate-engine/node_modules/sql.js/dist/sql-wasm.wasm +0 -0
- package/comate-engine/node_modules/sql.js/dist/sqljs-all.zip +0 -0
- package/comate-engine/node_modules/sql.js/dist/sqljs-wasm.zip +0 -0
- package/comate-engine/node_modules/sql.js/dist/sqljs-worker-wasm.zip +0 -0
- package/comate-engine/node_modules/sql.js/dist/worker.sql-asm-debug.js +0 -140784
- package/comate-engine/node_modules/sql.js/dist/worker.sql-asm.js +0 -332
- package/comate-engine/node_modules/sql.js/dist/worker.sql-wasm-debug.js +0 -7112
- package/comate-engine/node_modules/sql.js/dist/worker.sql-wasm.js +0 -311
- package/comate-engine/node_modules/sql.js/documentation_index.md +0 -26
- package/comate-engine/node_modules/sql.js/logo.svg +0 -13
- package/comate-engine/node_modules/sql.js/package.json +0 -51
|
@@ -14,9 +14,9 @@ import require$$3 from 'http';
|
|
|
14
14
|
import require$$4 from 'https';
|
|
15
15
|
import require$$0$6 from 'url';
|
|
16
16
|
import crypto from 'crypto';
|
|
17
|
-
import require$$
|
|
17
|
+
import require$$1 from 'tty';
|
|
18
18
|
import zlib from 'zlib';
|
|
19
|
-
import require$$0$
|
|
19
|
+
import require$$0$7, { EventEmitter } from 'events';
|
|
20
20
|
import 'node:os';
|
|
21
21
|
import 'node:process';
|
|
22
22
|
import 'node:stream';
|
|
@@ -481,6 +481,36 @@ class CodeQueryProvider extends SkillProvider {
|
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
483
|
|
|
484
|
+
var ContextType$1;
|
|
485
|
+
(function(ContextType) {
|
|
486
|
+
/** 当前文件 */ ContextType["CURRENT_FILE"] = "CURRENT_FILE";
|
|
487
|
+
/** 文件 */ ContextType["FILE"] = "FILE";
|
|
488
|
+
/** 目录 */ ContextType["FOLDER"] = "FOLDER";
|
|
489
|
+
/** 代码库 */ ContextType["REPO"] = "REPO";
|
|
490
|
+
/** 系统知识集 */ ContextType["SYSTEM"] = "SYSTEM";
|
|
491
|
+
/** 普通知识集 */ ContextType["NORMAL"] = "NORMAL";
|
|
492
|
+
/** 网页 */ ContextType["URL"] = "URL";
|
|
493
|
+
/** Web,网络搜索 */ ContextType["WEB"] = "WEB";
|
|
494
|
+
/** 用户划选的代码,理论上不会放到 context 里 */ ContextType["CODE"] = "CODE";
|
|
495
|
+
/** 历史存在,先保留该类型 */ ContextType["TEMP"] = "TEMP";
|
|
496
|
+
/** 终端,暂时只有autoDebug在用 */ ContextType["TERMINAL"] = "TERMINAL";
|
|
497
|
+
ContextType["IMAGE"] = "IMAGE";
|
|
498
|
+
/** 规则 */ ContextType["RULE"] = "RULE";
|
|
499
|
+
/** 编码区右键添加的代码块 */ ContextType["CODE_SELECTION"] = "CODE_SELECTION";
|
|
500
|
+
/** 终端右键添加的信息 */ ContextType["TERMINAL_SELECTION"] = "TERMINAL_SELECTION";
|
|
501
|
+
/** diff */ ContextType["DIFF"] = "DIFF";
|
|
502
|
+
/** 预览添加的代码块 */ ContextType["PREVIEW_CODE_SNIPPET"] = "PREVIEW_CODE_SNIPPET";
|
|
503
|
+
ContextType["PREVIEW_CONSOLE_ERROR_SNIPPET"] = "PREVIEW_CONSOLE_ERROR_SNIPPET";
|
|
504
|
+
ContextType["PREVIEW_TEXT_SELECTION_SNIPPET"] = "PREVIEW_TEXT_SELECTION_SNIPPET";
|
|
505
|
+
/** FIGMA设计稿 */ ContextType["FIGMA"] = "FIGMA";
|
|
506
|
+
ContextType["DIAGNOSTIC"] = "DIAGNOSTIC";
|
|
507
|
+
})(ContextType$1 || (ContextType$1 = {}));
|
|
508
|
+
var RoleType;
|
|
509
|
+
(function(RoleType) {
|
|
510
|
+
RoleType["CHAT"] = "chat";
|
|
511
|
+
RoleType["ZULU"] = "zulu";
|
|
512
|
+
})(RoleType || (RoleType = {}));
|
|
513
|
+
|
|
484
514
|
var PermissionType;
|
|
485
515
|
(function(PermissionType) {
|
|
486
516
|
PermissionType["WorkspaceFileSystem"] = "WorkspaceFileSystem";
|
|
@@ -18188,12 +18218,12 @@ var hasRequiredHasFlag;
|
|
|
18188
18218
|
function requireHasFlag () {
|
|
18189
18219
|
if (hasRequiredHasFlag) return hasFlag;
|
|
18190
18220
|
hasRequiredHasFlag = 1;
|
|
18191
|
-
|
|
18192
|
-
|
|
18221
|
+
|
|
18222
|
+
hasFlag = (flag, argv = process.argv) => {
|
|
18193
18223
|
const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
|
|
18194
|
-
const
|
|
18195
|
-
const
|
|
18196
|
-
return
|
|
18224
|
+
const position = argv.indexOf(prefix + flag);
|
|
18225
|
+
const terminatorPosition = argv.indexOf('--');
|
|
18226
|
+
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
18197
18227
|
};
|
|
18198
18228
|
return hasFlag;
|
|
18199
18229
|
}
|
|
@@ -18205,23 +18235,32 @@ function requireSupportsColor () {
|
|
|
18205
18235
|
if (hasRequiredSupportsColor) return supportsColor_1;
|
|
18206
18236
|
hasRequiredSupportsColor = 1;
|
|
18207
18237
|
const os = require$$0$5;
|
|
18238
|
+
const tty = require$$1;
|
|
18208
18239
|
const hasFlag = requireHasFlag();
|
|
18209
18240
|
|
|
18210
|
-
const env = process
|
|
18241
|
+
const {env} = process;
|
|
18211
18242
|
|
|
18212
18243
|
let forceColor;
|
|
18213
18244
|
if (hasFlag('no-color') ||
|
|
18214
18245
|
hasFlag('no-colors') ||
|
|
18215
|
-
hasFlag('color=false')
|
|
18216
|
-
|
|
18246
|
+
hasFlag('color=false') ||
|
|
18247
|
+
hasFlag('color=never')) {
|
|
18248
|
+
forceColor = 0;
|
|
18217
18249
|
} else if (hasFlag('color') ||
|
|
18218
18250
|
hasFlag('colors') ||
|
|
18219
18251
|
hasFlag('color=true') ||
|
|
18220
18252
|
hasFlag('color=always')) {
|
|
18221
|
-
forceColor =
|
|
18253
|
+
forceColor = 1;
|
|
18222
18254
|
}
|
|
18255
|
+
|
|
18223
18256
|
if ('FORCE_COLOR' in env) {
|
|
18224
|
-
|
|
18257
|
+
if (env.FORCE_COLOR === 'true') {
|
|
18258
|
+
forceColor = 1;
|
|
18259
|
+
} else if (env.FORCE_COLOR === 'false') {
|
|
18260
|
+
forceColor = 0;
|
|
18261
|
+
} else {
|
|
18262
|
+
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
|
|
18263
|
+
}
|
|
18225
18264
|
}
|
|
18226
18265
|
|
|
18227
18266
|
function translateLevel(level) {
|
|
@@ -18237,8 +18276,8 @@ function requireSupportsColor () {
|
|
|
18237
18276
|
};
|
|
18238
18277
|
}
|
|
18239
18278
|
|
|
18240
|
-
function supportsColor(
|
|
18241
|
-
if (forceColor ===
|
|
18279
|
+
function supportsColor(haveStream, streamIsTTY) {
|
|
18280
|
+
if (forceColor === 0) {
|
|
18242
18281
|
return 0;
|
|
18243
18282
|
}
|
|
18244
18283
|
|
|
@@ -18252,22 +18291,21 @@ function requireSupportsColor () {
|
|
|
18252
18291
|
return 2;
|
|
18253
18292
|
}
|
|
18254
18293
|
|
|
18255
|
-
if (
|
|
18294
|
+
if (haveStream && !streamIsTTY && forceColor === undefined) {
|
|
18256
18295
|
return 0;
|
|
18257
18296
|
}
|
|
18258
18297
|
|
|
18259
|
-
const min = forceColor
|
|
18298
|
+
const min = forceColor || 0;
|
|
18299
|
+
|
|
18300
|
+
if (env.TERM === 'dumb') {
|
|
18301
|
+
return min;
|
|
18302
|
+
}
|
|
18260
18303
|
|
|
18261
18304
|
if (process.platform === 'win32') {
|
|
18262
|
-
//
|
|
18263
|
-
//
|
|
18264
|
-
// won't work. However, here we target Node.js 8 at minimum as it is an LTS
|
|
18265
|
-
// release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
|
|
18266
|
-
// release that supports 256 colors. Windows 10 build 14931 is the first release
|
|
18267
|
-
// that supports 16m/TrueColor.
|
|
18305
|
+
// Windows 10 build 10586 is the first Windows release that supports 256 colors.
|
|
18306
|
+
// Windows 10 build 14931 is the first release that supports 16m/TrueColor.
|
|
18268
18307
|
const osRelease = os.release().split('.');
|
|
18269
18308
|
if (
|
|
18270
|
-
Number(process.versions.node.split('.')[0]) >= 8 &&
|
|
18271
18309
|
Number(osRelease[0]) >= 10 &&
|
|
18272
18310
|
Number(osRelease[2]) >= 10586
|
|
18273
18311
|
) {
|
|
@@ -18278,7 +18316,7 @@ function requireSupportsColor () {
|
|
|
18278
18316
|
}
|
|
18279
18317
|
|
|
18280
18318
|
if ('CI' in env) {
|
|
18281
|
-
if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
|
|
18319
|
+
if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
|
|
18282
18320
|
return 1;
|
|
18283
18321
|
}
|
|
18284
18322
|
|
|
@@ -18317,22 +18355,18 @@ function requireSupportsColor () {
|
|
|
18317
18355
|
return 1;
|
|
18318
18356
|
}
|
|
18319
18357
|
|
|
18320
|
-
if (env.TERM === 'dumb') {
|
|
18321
|
-
return min;
|
|
18322
|
-
}
|
|
18323
|
-
|
|
18324
18358
|
return min;
|
|
18325
18359
|
}
|
|
18326
18360
|
|
|
18327
18361
|
function getSupportLevel(stream) {
|
|
18328
|
-
const level = supportsColor(stream);
|
|
18362
|
+
const level = supportsColor(stream, stream && stream.isTTY);
|
|
18329
18363
|
return translateLevel(level);
|
|
18330
18364
|
}
|
|
18331
18365
|
|
|
18332
18366
|
supportsColor_1 = {
|
|
18333
18367
|
supportsColor: getSupportLevel,
|
|
18334
|
-
stdout:
|
|
18335
|
-
stderr:
|
|
18368
|
+
stdout: translateLevel(supportsColor(true, tty.isatty(1))),
|
|
18369
|
+
stderr: translateLevel(supportsColor(true, tty.isatty(2)))
|
|
18336
18370
|
};
|
|
18337
18371
|
return supportsColor_1;
|
|
18338
18372
|
}
|
|
@@ -18347,7 +18381,7 @@ function requireNode () {
|
|
|
18347
18381
|
if (hasRequiredNode) return node.exports;
|
|
18348
18382
|
hasRequiredNode = 1;
|
|
18349
18383
|
(function (module, exports) {
|
|
18350
|
-
const tty = require$$
|
|
18384
|
+
const tty = require$$1;
|
|
18351
18385
|
const util = require$$0$3;
|
|
18352
18386
|
|
|
18353
18387
|
/**
|
|
@@ -22023,7 +22057,7 @@ var WEBVIEW_CONSUMER;
|
|
|
22023
22057
|
|
|
22024
22058
|
const SAAS_API_HOST = 'https://comate.baidu.com';
|
|
22025
22059
|
const INTERNAL_API_HOST = 'https://comate.baidu-int.com';
|
|
22026
|
-
const SAAS_TEST_API_HOST = 'https://comate-
|
|
22060
|
+
const SAAS_TEST_API_HOST = 'https://comate-external-test.now.baidu.com';
|
|
22027
22061
|
const INTERNAL_TEST_API_HOST = 'https://comate-test.now.baidu.com';
|
|
22028
22062
|
let platform = process.env.PLATFORM || PLATFORM.INTERNAL;
|
|
22029
22063
|
let environment = process.env.ENVIRONMENT || ENVIRONMENT.PRODUCTION;
|
|
@@ -22095,35 +22129,55 @@ function parseProxyUrl(proxyUrl) {
|
|
|
22095
22129
|
const config = {
|
|
22096
22130
|
};
|
|
22097
22131
|
const proxyURL = process.env.HTTP_PROXY_URL || '';
|
|
22098
|
-
// 暂时注释
|
|
22099
|
-
// const noProxyStr = process.env.HTTP_NO_PROXY_URL || '';
|
|
22100
22132
|
const { protocol, hostname: host, port } = parseProxyUrl(proxyURL);
|
|
22133
|
+
const noProxyStr = process.env.HTTP_NO_PROXY_URL || '';
|
|
22134
|
+
const noProxyPatterns = noProxyStr.split(',').map((p)=>p.trim());
|
|
22135
|
+
const shouldProxyCache = new Map();
|
|
22136
|
+
function matchesNoProxyPattern(_host, _pattern) {
|
|
22137
|
+
if (!_host || !_pattern) {
|
|
22138
|
+
return false;
|
|
22139
|
+
}
|
|
22140
|
+
// Convert to lowercase for case-insensitive comparison
|
|
22141
|
+
const host = _host.toLowerCase();
|
|
22142
|
+
const pattern = _pattern.toLowerCase();
|
|
22143
|
+
// Check for direct match
|
|
22144
|
+
if (host === pattern) {
|
|
22145
|
+
return true;
|
|
22146
|
+
}
|
|
22147
|
+
// Check for IP address or port (e.g., 192.168.1.1 or 192.168.1.1:8080)
|
|
22148
|
+
if (/^(\d+\.)+\d+(:\d+)?$/.test(pattern)) {
|
|
22149
|
+
return host === pattern.split(':')[0];
|
|
22150
|
+
}
|
|
22151
|
+
// Check for domains (e.g., *.example.com or .example.com)
|
|
22152
|
+
const [, domain = ''] = Array.from(/^(?:\*?\.)?(.+)$/.exec(pattern) ?? []);
|
|
22153
|
+
if (domain) {
|
|
22154
|
+
return host.endsWith(domain);
|
|
22155
|
+
}
|
|
22156
|
+
return false;
|
|
22157
|
+
}
|
|
22101
22158
|
// 加了proxy,除此之外没区别
|
|
22102
22159
|
const axiosInstance = axios.create(config);
|
|
22103
22160
|
axios.create(config);
|
|
22104
22161
|
axiosInstance.interceptors.request.use(async (config)=>{
|
|
22162
|
+
const baseURL = getApiHost();
|
|
22105
22163
|
const requestConfig = {
|
|
22106
22164
|
...config,
|
|
22107
|
-
baseURL
|
|
22165
|
+
baseURL
|
|
22108
22166
|
};
|
|
22109
22167
|
requestConfig.headers['Accept-Language'] = acceptLanguage;
|
|
22110
22168
|
if (proxyURL) {
|
|
22111
|
-
|
|
22112
|
-
|
|
22113
|
-
|
|
22114
|
-
|
|
22115
|
-
|
|
22116
|
-
|
|
22117
|
-
|
|
22118
|
-
|
|
22119
|
-
|
|
22120
|
-
|
|
22121
|
-
|
|
22122
|
-
}
|
|
22123
|
-
// if (noProxyStr) {
|
|
22124
|
-
// // @ts-ignore 需要merge axios no_proxy原有字段
|
|
22125
|
-
// requestConfig.no_proxy = noProxyStr;
|
|
22126
|
-
// }
|
|
22169
|
+
if (!shouldProxyCache.has(baseURL)) {
|
|
22170
|
+
shouldProxyCache.set(baseURL, !noProxyPatterns.some((pattern)=>matchesNoProxyPattern(baseURL, pattern)));
|
|
22171
|
+
}
|
|
22172
|
+
const shouldProxy = shouldProxyCache.get(baseURL) ?? true;
|
|
22173
|
+
if (shouldProxy) {
|
|
22174
|
+
requestConfig.proxy = {
|
|
22175
|
+
host,
|
|
22176
|
+
port: Number(port),
|
|
22177
|
+
protocol
|
|
22178
|
+
};
|
|
22179
|
+
}
|
|
22180
|
+
}
|
|
22127
22181
|
return requestConfig;
|
|
22128
22182
|
});
|
|
22129
22183
|
axios.CanceledError;
|
|
@@ -27990,7 +28044,7 @@ let Reader$1 = class Reader {
|
|
|
27990
28044
|
reader$1.default = Reader$1;
|
|
27991
28045
|
|
|
27992
28046
|
Object.defineProperty(async$4, "__esModule", { value: true });
|
|
27993
|
-
const events_1 = require$$0$
|
|
28047
|
+
const events_1 = require$$0$7;
|
|
27994
28048
|
const fsScandir$2 = out$1;
|
|
27995
28049
|
const fastq = queueExports;
|
|
27996
28050
|
const common$1 = common$3;
|
|
@@ -51640,12 +51694,6 @@ var createFlow = _createFlow;
|
|
|
51640
51694
|
*/
|
|
51641
51695
|
createFlow();
|
|
51642
51696
|
|
|
51643
|
-
var VirtualDocumentAction;
|
|
51644
|
-
(function(VirtualDocumentAction) {
|
|
51645
|
-
VirtualDocumentAction["EDIT"] = "edit";
|
|
51646
|
-
VirtualDocumentAction["PREVIEW"] = "preview";
|
|
51647
|
-
})(VirtualDocumentAction || (VirtualDocumentAction = {}));
|
|
51648
|
-
|
|
51649
51697
|
class Diff {
|
|
51650
51698
|
diff(oldStr, newStr,
|
|
51651
51699
|
// Type below is not accurate/complete - see above for full possibilities - but it compiles
|
|
@@ -51957,6 +52005,12 @@ function tokenize(value, options) {
|
|
|
51957
52005
|
return retLines;
|
|
51958
52006
|
}
|
|
51959
52007
|
|
|
52008
|
+
var VirtualDocumentAction;
|
|
52009
|
+
(function(VirtualDocumentAction) {
|
|
52010
|
+
VirtualDocumentAction["EDIT"] = "edit";
|
|
52011
|
+
VirtualDocumentAction["PREVIEW"] = "preview";
|
|
52012
|
+
})(VirtualDocumentAction || (VirtualDocumentAction = {}));
|
|
52013
|
+
|
|
51960
52014
|
const trim = (str)=>str.replace(/\s|\t/g, '').replace(/[;|,]$/, '').toLowerCase();
|
|
51961
52015
|
const roughEqual = (left, right)=>trim(left) === trim(right);
|
|
51962
52016
|
class LineDiff extends Diff {
|
|
@@ -52150,6 +52204,7 @@ var ExtensionText;
|
|
|
52150
52204
|
ExtensionText["LOGIN_FAILED"] = "login.failed";
|
|
52151
52205
|
ExtensionText["LOGIN_TOKEN_ERROR"] = "login.token.error";
|
|
52152
52206
|
ExtensionText["LOGIN_KEY_ERROR"] = "login.key.error";
|
|
52207
|
+
ExtensionText["LOGIN_LICENSE_ERROR"] = "login.license.error";
|
|
52153
52208
|
ExtensionText["LOGIN_INTERNAL_USER"] = "login.internalUser.message";
|
|
52154
52209
|
ExtensionText["LOGIN_INSTALL_INTERNAL"] = "login.install.internal";
|
|
52155
52210
|
ExtensionText["LOGIN_AGREEMENT"] = "login.agreement.message";
|
|
@@ -52988,7 +53043,15 @@ class RenderJsxProvider extends SkillProvider {
|
|
|
52988
53043
|
em.createNativeQuery(sql);
|
|
52989
53044
|
}`,
|
|
52990
53045
|
to: '234\n567',
|
|
52991
|
-
replaceAll: true
|
|
53046
|
+
replaceAll: true,
|
|
53047
|
+
acceptCommandData: {
|
|
53048
|
+
commandName: "commitMessage:replaceToFileAccept",
|
|
53049
|
+
data: {
|
|
53050
|
+
filePath: 'JPASQLi.java'
|
|
53051
|
+
},
|
|
53052
|
+
pluginName: 'demo-feature',
|
|
53053
|
+
replyText: ''
|
|
53054
|
+
}
|
|
52992
53055
|
},
|
|
52993
53056
|
closed: false,
|
|
52994
53057
|
children: code
|
|
@@ -52997,7 +53060,8 @@ class RenderJsxProvider extends SkillProvider {
|
|
|
52997
53060
|
language: "javascript",
|
|
52998
53061
|
actions: [
|
|
52999
53062
|
'showFileInsertDiff',
|
|
53000
|
-
'insertToFile'
|
|
53063
|
+
'insertToFile',
|
|
53064
|
+
'replaceToFile'
|
|
53001
53065
|
],
|
|
53002
53066
|
insertToFileData: {
|
|
53003
53067
|
filePath: 'JPASQLi.java',
|
|
@@ -53089,6 +53153,9 @@ class RenderJsxProvider extends SkillProvider {
|
|
|
53089
53153
|
children: "点击数据为yes"
|
|
53090
53154
|
}));
|
|
53091
53155
|
}
|
|
53156
|
+
if (commandName === 'commitMessage:replaceToFileAccept') {
|
|
53157
|
+
console.log('replaceToFileAccept', data);
|
|
53158
|
+
}
|
|
53092
53159
|
}
|
|
53093
53160
|
handleChatCancel(cancleToken) {
|
|
53094
53161
|
this.logger.info(`handleChatCancel: ${cancleToken}`);
|
|
@@ -131,8 +131,14 @@ export class RenderJsxProvider extends SkillProvider {
|
|
|
131
131
|
}`,
|
|
132
132
|
to: '234\n567',
|
|
133
133
|
replaceAll: true,
|
|
134
|
+
acceptCommandData: {
|
|
135
|
+
commandName: "commitMessage:replaceToFileAccept",
|
|
136
|
+
data: { filePath: 'JPASQLi.java' },
|
|
137
|
+
pluginName: 'demo-feature',
|
|
138
|
+
replyText: '',
|
|
139
|
+
},
|
|
134
140
|
}, closed: false, children: code }));
|
|
135
|
-
yield stream.flush(_jsx("code-block", { language: "javascript", actions: ['showFileInsertDiff', 'insertToFile'], insertToFileData: {
|
|
141
|
+
yield stream.flush(_jsx("code-block", { language: "javascript", actions: ['showFileInsertDiff', 'insertToFile', 'replaceToFile'], insertToFileData: {
|
|
136
142
|
filePath: 'JPASQLi.java',
|
|
137
143
|
position: { line: 1, character: 0 },
|
|
138
144
|
newText: 'test 1\ntest 2\n',
|
|
@@ -166,6 +172,9 @@ export class RenderJsxProvider extends SkillProvider {
|
|
|
166
172
|
}
|
|
167
173
|
yield stream.flushReplaceLast(_jsx("p", { children: "\u70B9\u51FB\u6570\u636E\u4E3Ayes" }));
|
|
168
174
|
}
|
|
175
|
+
if (commandName === 'commitMessage:replaceToFileAccept') {
|
|
176
|
+
console.log('replaceToFileAccept', data);
|
|
177
|
+
}
|
|
169
178
|
}
|
|
170
179
|
handleChatCancel(cancleToken) {
|
|
171
180
|
this.logger.info(`handleChatCancel: ${cancleToken}`);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve"
|
|
2
|
+
style="enable-background:new 0 0 120 120" viewBox="0 0 120 120"><circle cx="60" cy="60" r="42.1" style="fill:#439dff"/><circle cx="60" cy="60" r="34.4" style="fill:#f4f4f4"/><path d="M79.8 56.5H63.5V32.9c0-1.9-1.6-3.5-3.5-3.5s-3.5 1.6-3.5 3.5V60.1c0 1.9 1.6 3.5 3.5 3.5h19.8c1.9 0 3.5-1.6 3.5-3.5 0-2-1.6-3.6-3.5-3.6z" style="fill:#1576ce"/><circle cx="60" cy="60" r="6.7" style="fill:#ffc856"/></svg>
|