byt-lingxiao-ai 0.3.25 → 0.3.26

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/index.umd.js CHANGED
@@ -3616,6 +3616,26 @@ module.exports = function (it, Prototype) {
3616
3616
  };
3617
3617
 
3618
3618
 
3619
+ /***/ }),
3620
+
3621
+ /***/ 684:
3622
+ /***/ (function(module) {
3623
+
3624
+ "use strict";
3625
+
3626
+ // Should throw an error on invalid iterator
3627
+ // https://issues.chromium.org/issues/336839115
3628
+ module.exports = function (methodName, argument) {
3629
+ // eslint-disable-next-line es/no-iterator -- required for testing
3630
+ var method = typeof Iterator == 'function' && Iterator.prototype[methodName];
3631
+ if (method) try {
3632
+ method.call({ next: null }, argument).next();
3633
+ } catch (error) {
3634
+ return true;
3635
+ }
3636
+ };
3637
+
3638
+
3619
3639
  /***/ }),
3620
3640
 
3621
3641
  /***/ 722:
@@ -5280,6 +5300,229 @@ module.exports = Object.keys || function keys(O) {
5280
5300
  };
5281
5301
 
5282
5302
 
5303
+ /***/ }),
5304
+
5305
+ /***/ 1102:
5306
+ /***/ (function(module) {
5307
+
5308
+ /*
5309
+ Language: VHDL
5310
+ Author: Igor Kalnitsky <igor@kalnitsky.org>
5311
+ Contributors: Daniel C.K. Kho <daniel.kho@tauhop.com>, Guillaume Savaton <guillaume.savaton@eseo.fr>
5312
+ Description: VHDL is a hardware description language used in electronic design automation to describe digital and mixed-signal systems.
5313
+ Website: https://en.wikipedia.org/wiki/VHDL
5314
+ Category: hardware
5315
+ */
5316
+
5317
+ function vhdl(hljs) {
5318
+ // Regular expression for VHDL numeric literals.
5319
+
5320
+ // Decimal literal:
5321
+ const INTEGER_RE = '\\d(_|\\d)*';
5322
+ const EXPONENT_RE = '[eE][-+]?' + INTEGER_RE;
5323
+ const DECIMAL_LITERAL_RE = INTEGER_RE + '(\\.' + INTEGER_RE + ')?' + '(' + EXPONENT_RE + ')?';
5324
+ // Based literal:
5325
+ const BASED_INTEGER_RE = '\\w+';
5326
+ const BASED_LITERAL_RE = INTEGER_RE + '#' + BASED_INTEGER_RE + '(\\.' + BASED_INTEGER_RE + ')?' + '#' + '(' + EXPONENT_RE + ')?';
5327
+
5328
+ const NUMBER_RE = '\\b(' + BASED_LITERAL_RE + '|' + DECIMAL_LITERAL_RE + ')';
5329
+
5330
+ const KEYWORDS = [
5331
+ "abs",
5332
+ "access",
5333
+ "after",
5334
+ "alias",
5335
+ "all",
5336
+ "and",
5337
+ "architecture",
5338
+ "array",
5339
+ "assert",
5340
+ "assume",
5341
+ "assume_guarantee",
5342
+ "attribute",
5343
+ "begin",
5344
+ "block",
5345
+ "body",
5346
+ "buffer",
5347
+ "bus",
5348
+ "case",
5349
+ "component",
5350
+ "configuration",
5351
+ "constant",
5352
+ "context",
5353
+ "cover",
5354
+ "disconnect",
5355
+ "downto",
5356
+ "default",
5357
+ "else",
5358
+ "elsif",
5359
+ "end",
5360
+ "entity",
5361
+ "exit",
5362
+ "fairness",
5363
+ "file",
5364
+ "for",
5365
+ "force",
5366
+ "function",
5367
+ "generate",
5368
+ "generic",
5369
+ "group",
5370
+ "guarded",
5371
+ "if",
5372
+ "impure",
5373
+ "in",
5374
+ "inertial",
5375
+ "inout",
5376
+ "is",
5377
+ "label",
5378
+ "library",
5379
+ "linkage",
5380
+ "literal",
5381
+ "loop",
5382
+ "map",
5383
+ "mod",
5384
+ "nand",
5385
+ "new",
5386
+ "next",
5387
+ "nor",
5388
+ "not",
5389
+ "null",
5390
+ "of",
5391
+ "on",
5392
+ "open",
5393
+ "or",
5394
+ "others",
5395
+ "out",
5396
+ "package",
5397
+ "parameter",
5398
+ "port",
5399
+ "postponed",
5400
+ "procedure",
5401
+ "process",
5402
+ "property",
5403
+ "protected",
5404
+ "pure",
5405
+ "range",
5406
+ "record",
5407
+ "register",
5408
+ "reject",
5409
+ "release",
5410
+ "rem",
5411
+ "report",
5412
+ "restrict",
5413
+ "restrict_guarantee",
5414
+ "return",
5415
+ "rol",
5416
+ "ror",
5417
+ "select",
5418
+ "sequence",
5419
+ "severity",
5420
+ "shared",
5421
+ "signal",
5422
+ "sla",
5423
+ "sll",
5424
+ "sra",
5425
+ "srl",
5426
+ "strong",
5427
+ "subtype",
5428
+ "then",
5429
+ "to",
5430
+ "transport",
5431
+ "type",
5432
+ "unaffected",
5433
+ "units",
5434
+ "until",
5435
+ "use",
5436
+ "variable",
5437
+ "view",
5438
+ "vmode",
5439
+ "vprop",
5440
+ "vunit",
5441
+ "wait",
5442
+ "when",
5443
+ "while",
5444
+ "with",
5445
+ "xnor",
5446
+ "xor"
5447
+ ];
5448
+ const BUILT_INS = [
5449
+ "boolean",
5450
+ "bit",
5451
+ "character",
5452
+ "integer",
5453
+ "time",
5454
+ "delay_length",
5455
+ "natural",
5456
+ "positive",
5457
+ "string",
5458
+ "bit_vector",
5459
+ "file_open_kind",
5460
+ "file_open_status",
5461
+ "std_logic",
5462
+ "std_logic_vector",
5463
+ "unsigned",
5464
+ "signed",
5465
+ "boolean_vector",
5466
+ "integer_vector",
5467
+ "std_ulogic",
5468
+ "std_ulogic_vector",
5469
+ "unresolved_unsigned",
5470
+ "u_unsigned",
5471
+ "unresolved_signed",
5472
+ "u_signed",
5473
+ "real_vector",
5474
+ "time_vector"
5475
+ ];
5476
+ const LITERALS = [
5477
+ // severity_level
5478
+ "false",
5479
+ "true",
5480
+ "note",
5481
+ "warning",
5482
+ "error",
5483
+ "failure",
5484
+ // textio
5485
+ "line",
5486
+ "text",
5487
+ "side",
5488
+ "width"
5489
+ ];
5490
+
5491
+ return {
5492
+ name: 'VHDL',
5493
+ case_insensitive: true,
5494
+ keywords: {
5495
+ keyword: KEYWORDS,
5496
+ built_in: BUILT_INS,
5497
+ literal: LITERALS
5498
+ },
5499
+ illegal: /\{/,
5500
+ contains: [
5501
+ hljs.C_BLOCK_COMMENT_MODE, // VHDL-2008 block commenting.
5502
+ hljs.COMMENT('--', '$'),
5503
+ hljs.QUOTE_STRING_MODE,
5504
+ {
5505
+ className: 'number',
5506
+ begin: NUMBER_RE,
5507
+ relevance: 0
5508
+ },
5509
+ {
5510
+ className: 'string',
5511
+ begin: '\'(U|X|0|1|Z|W|L|H|-)\'',
5512
+ contains: [ hljs.BACKSLASH_ESCAPE ]
5513
+ },
5514
+ {
5515
+ className: 'symbol',
5516
+ begin: '\'[A-Za-z](_?[A-Za-z0-9])*',
5517
+ contains: [ hljs.BACKSLASH_ESCAPE ]
5518
+ }
5519
+ ]
5520
+ };
5521
+ }
5522
+
5523
+ module.exports = vhdl;
5524
+
5525
+
5283
5526
  /***/ }),
5284
5527
 
5285
5528
  /***/ 1108:
@@ -9997,6 +10240,30 @@ module.exports = function (argument) {
9997
10240
  };
9998
10241
 
9999
10242
 
10243
+ /***/ }),
10244
+
10245
+ /***/ 1385:
10246
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
10247
+
10248
+ "use strict";
10249
+
10250
+ var iteratorClose = __webpack_require__(9539);
10251
+
10252
+ module.exports = function (iters, kind, value) {
10253
+ for (var i = iters.length - 1; i >= 0; i--) {
10254
+ if (iters[i] === undefined) continue;
10255
+ try {
10256
+ value = iteratorClose(iters[i].iterator, kind, value);
10257
+ } catch (error) {
10258
+ kind = 'throw';
10259
+ value = error;
10260
+ }
10261
+ }
10262
+ if (kind === 'throw') throw value;
10263
+ return value;
10264
+ };
10265
+
10266
+
10000
10267
  /***/ }),
10001
10268
 
10002
10269
  /***/ 1432:
@@ -12389,6 +12656,58 @@ $({ target: 'Set', proto: true, real: true, forced: FORCED }, {
12389
12656
  });
12390
12657
 
12391
12658
 
12659
+ /***/ }),
12660
+
12661
+ /***/ 1701:
12662
+ /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
12663
+
12664
+ "use strict";
12665
+
12666
+ var $ = __webpack_require__(6518);
12667
+ var call = __webpack_require__(9565);
12668
+ var aCallable = __webpack_require__(9306);
12669
+ var anObject = __webpack_require__(8551);
12670
+ var getIteratorDirect = __webpack_require__(1767);
12671
+ var createIteratorProxy = __webpack_require__(9462);
12672
+ var callWithSafeIterationClosing = __webpack_require__(6319);
12673
+ var iteratorClose = __webpack_require__(9539);
12674
+ var iteratorHelperThrowsOnInvalidIterator = __webpack_require__(684);
12675
+ var iteratorHelperWithoutClosingOnEarlyError = __webpack_require__(4549);
12676
+ var IS_PURE = __webpack_require__(6395);
12677
+
12678
+ var MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR = !IS_PURE && !iteratorHelperThrowsOnInvalidIterator('map', function () { /* empty */ });
12679
+ var mapWithoutClosingOnEarlyError = !IS_PURE && !MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR
12680
+ && iteratorHelperWithoutClosingOnEarlyError('map', TypeError);
12681
+
12682
+ var FORCED = IS_PURE || MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR || mapWithoutClosingOnEarlyError;
12683
+
12684
+ var IteratorProxy = createIteratorProxy(function () {
12685
+ var iterator = this.iterator;
12686
+ var result = anObject(call(this.next, iterator));
12687
+ var done = this.done = !!result.done;
12688
+ if (!done) return callWithSafeIterationClosing(iterator, this.mapper, [result.value, this.counter++], true);
12689
+ });
12690
+
12691
+ // `Iterator.prototype.map` method
12692
+ // https://tc39.es/ecma262/#sec-iterator.prototype.map
12693
+ $({ target: 'Iterator', proto: true, real: true, forced: FORCED }, {
12694
+ map: function map(mapper) {
12695
+ anObject(this);
12696
+ try {
12697
+ aCallable(mapper);
12698
+ } catch (error) {
12699
+ iteratorClose(this, 'throw', error);
12700
+ }
12701
+
12702
+ if (mapWithoutClosingOnEarlyError) return call(mapWithoutClosingOnEarlyError, this, mapper);
12703
+
12704
+ return new IteratorProxy(getIteratorDirect(this), {
12705
+ mapper: mapper
12706
+ });
12707
+ }
12708
+ });
12709
+
12710
+
12392
12711
  /***/ }),
12393
12712
 
12394
12713
  /***/ 1726:
@@ -14330,6 +14649,20 @@ function lisp(hljs) {
14330
14649
  module.exports = lisp;
14331
14650
 
14332
14651
 
14652
+ /***/ }),
14653
+
14654
+ /***/ 2529:
14655
+ /***/ (function(module) {
14656
+
14657
+ "use strict";
14658
+
14659
+ // `CreateIterResultObject` abstract operation
14660
+ // https://tc39.es/ecma262/#sec-createiterresultobject
14661
+ module.exports = function (value, done) {
14662
+ return { value: value, done: done };
14663
+ };
14664
+
14665
+
14333
14666
  /***/ }),
14334
14667
 
14335
14668
  /***/ 2546:
@@ -14840,6 +15173,21 @@ var POLYFILL = isForced.POLYFILL = 'P';
14840
15173
  module.exports = isForced;
14841
15174
 
14842
15175
 
15176
+ /***/ }),
15177
+
15178
+ /***/ 2812:
15179
+ /***/ (function(module) {
15180
+
15181
+ "use strict";
15182
+
15183
+ var $TypeError = TypeError;
15184
+
15185
+ module.exports = function (passed, required) {
15186
+ if (passed < required) throw new $TypeError('Not enough arguments');
15187
+ return passed;
15188
+ };
15189
+
15190
+
14843
15191
  /***/ }),
14844
15192
 
14845
15193
  /***/ 2838:
@@ -17110,7 +17458,7 @@ hljs.registerLanguage('vbnet', __webpack_require__(8928));
17110
17458
  hljs.registerLanguage('vbscript', __webpack_require__(1200));
17111
17459
  hljs.registerLanguage('vbscript-html', __webpack_require__(164));
17112
17460
  hljs.registerLanguage('verilog', __webpack_require__(8249));
17113
- hljs.registerLanguage('vhdl', __webpack_require__(8721));
17461
+ hljs.registerLanguage('vhdl', __webpack_require__(1102));
17114
17462
  hljs.registerLanguage('vim', __webpack_require__(8907));
17115
17463
  hljs.registerLanguage('wasm', __webpack_require__(9351));
17116
17464
  hljs.registerLanguage('wren', __webpack_require__(5069));
@@ -20887,6 +21235,63 @@ module.exports =
20887
21235
  (function () { return this; })() || Function('return this')();
20888
21236
 
20889
21237
 
21238
+ /***/ }),
21239
+
21240
+ /***/ 4603:
21241
+ /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
21242
+
21243
+ "use strict";
21244
+
21245
+ var defineBuiltIn = __webpack_require__(6840);
21246
+ var uncurryThis = __webpack_require__(9504);
21247
+ var toString = __webpack_require__(655);
21248
+ var validateArgumentsLength = __webpack_require__(2812);
21249
+
21250
+ var $URLSearchParams = URLSearchParams;
21251
+ var URLSearchParamsPrototype = $URLSearchParams.prototype;
21252
+ var append = uncurryThis(URLSearchParamsPrototype.append);
21253
+ var $delete = uncurryThis(URLSearchParamsPrototype['delete']);
21254
+ var forEach = uncurryThis(URLSearchParamsPrototype.forEach);
21255
+ var push = uncurryThis([].push);
21256
+ var params = new $URLSearchParams('a=1&a=2&b=3');
21257
+
21258
+ params['delete']('a', 1);
21259
+ // `undefined` case is a Chromium 117 bug
21260
+ // https://bugs.chromium.org/p/v8/issues/detail?id=14222
21261
+ params['delete']('b', undefined);
21262
+
21263
+ if (params + '' !== 'a=2') {
21264
+ defineBuiltIn(URLSearchParamsPrototype, 'delete', function (name /* , value */) {
21265
+ var length = arguments.length;
21266
+ var $value = length < 2 ? undefined : arguments[1];
21267
+ if (length && $value === undefined) return $delete(this, name);
21268
+ var entries = [];
21269
+ forEach(this, function (v, k) { // also validates `this`
21270
+ push(entries, { key: k, value: v });
21271
+ });
21272
+ validateArgumentsLength(length, 1);
21273
+ var key = toString(name);
21274
+ var value = toString($value);
21275
+ var index = 0;
21276
+ var dindex = 0;
21277
+ var found = false;
21278
+ var entriesLength = entries.length;
21279
+ var entry;
21280
+ while (index < entriesLength) {
21281
+ entry = entries[index++];
21282
+ if (found || entry.key === key) {
21283
+ found = true;
21284
+ $delete(this, entry.key);
21285
+ } else dindex++;
21286
+ }
21287
+ while (dindex < entriesLength) {
21288
+ entry = entries[dindex++];
21289
+ if (!(entry.key === key && entry.value === value)) append(this, entry.key, entry.value);
21290
+ }
21291
+ }, { enumerable: true, unsafe: true });
21292
+ }
21293
+
21294
+
20890
21295
  /***/ }),
20891
21296
 
20892
21297
  /***/ 4644:
@@ -31545,6 +31950,41 @@ module.exports = scheme;
31545
31950
  module.exports = {};
31546
31951
 
31547
31952
 
31953
+ /***/ }),
31954
+
31955
+ /***/ 6279:
31956
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
31957
+
31958
+ "use strict";
31959
+
31960
+ var defineBuiltIn = __webpack_require__(6840);
31961
+
31962
+ module.exports = function (target, src, options) {
31963
+ for (var key in src) defineBuiltIn(target, key, src[key], options);
31964
+ return target;
31965
+ };
31966
+
31967
+
31968
+ /***/ }),
31969
+
31970
+ /***/ 6319:
31971
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
31972
+
31973
+ "use strict";
31974
+
31975
+ var anObject = __webpack_require__(8551);
31976
+ var iteratorClose = __webpack_require__(9539);
31977
+
31978
+ // call something on iterator step with safe closing on error
31979
+ module.exports = function (iterator, fn, value, ENTRIES) {
31980
+ try {
31981
+ return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
31982
+ } catch (error) {
31983
+ iteratorClose(iterator, 'throw', error);
31984
+ }
31985
+ };
31986
+
31987
+
31548
31988
  /***/ }),
31549
31989
 
31550
31990
  /***/ 6325:
@@ -46953,6 +47393,42 @@ function x86asm(hljs) {
46953
47393
  module.exports = x86asm;
46954
47394
 
46955
47395
 
47396
+ /***/ }),
47397
+
47398
+ /***/ 7566:
47399
+ /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
47400
+
47401
+ "use strict";
47402
+
47403
+ var defineBuiltIn = __webpack_require__(6840);
47404
+ var uncurryThis = __webpack_require__(9504);
47405
+ var toString = __webpack_require__(655);
47406
+ var validateArgumentsLength = __webpack_require__(2812);
47407
+
47408
+ var $URLSearchParams = URLSearchParams;
47409
+ var URLSearchParamsPrototype = $URLSearchParams.prototype;
47410
+ var getAll = uncurryThis(URLSearchParamsPrototype.getAll);
47411
+ var $has = uncurryThis(URLSearchParamsPrototype.has);
47412
+ var params = new $URLSearchParams('a=1');
47413
+
47414
+ // `undefined` case is a Chromium 117 bug
47415
+ // https://bugs.chromium.org/p/v8/issues/detail?id=14222
47416
+ if (params.has('a', 2) || !params.has('a', undefined)) {
47417
+ defineBuiltIn(URLSearchParamsPrototype, 'has', function has(name /* , value */) {
47418
+ var length = arguments.length;
47419
+ var $value = length < 2 ? undefined : arguments[1];
47420
+ if (length && $value === undefined) return $has(this, name);
47421
+ var values = getAll(this, name); // also validates `this`
47422
+ validateArgumentsLength(length, 1);
47423
+ var value = toString($value);
47424
+ var index = 0;
47425
+ while (index < values.length) {
47426
+ if (values[index++] === value) return true;
47427
+ } return false;
47428
+ }, { enumerable: true, unsafe: true });
47429
+ }
47430
+
47431
+
46956
47432
  /***/ }),
46957
47433
 
46958
47434
  /***/ 7572:
@@ -59274,225 +59750,31 @@ module.exports = DESCRIPTORS && fails(function () {
59274
59750
  /***/ }),
59275
59751
 
59276
59752
  /***/ 8721:
59277
- /***/ (function(module) {
59278
-
59279
- /*
59280
- Language: VHDL
59281
- Author: Igor Kalnitsky <igor@kalnitsky.org>
59282
- Contributors: Daniel C.K. Kho <daniel.kho@tauhop.com>, Guillaume Savaton <guillaume.savaton@eseo.fr>
59283
- Description: VHDL is a hardware description language used in electronic design automation to describe digital and mixed-signal systems.
59284
- Website: https://en.wikipedia.org/wiki/VHDL
59285
- Category: hardware
59286
- */
59287
-
59288
- function vhdl(hljs) {
59289
- // Regular expression for VHDL numeric literals.
59290
-
59291
- // Decimal literal:
59292
- const INTEGER_RE = '\\d(_|\\d)*';
59293
- const EXPONENT_RE = '[eE][-+]?' + INTEGER_RE;
59294
- const DECIMAL_LITERAL_RE = INTEGER_RE + '(\\.' + INTEGER_RE + ')?' + '(' + EXPONENT_RE + ')?';
59295
- // Based literal:
59296
- const BASED_INTEGER_RE = '\\w+';
59297
- const BASED_LITERAL_RE = INTEGER_RE + '#' + BASED_INTEGER_RE + '(\\.' + BASED_INTEGER_RE + ')?' + '#' + '(' + EXPONENT_RE + ')?';
59753
+ /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
59298
59754
 
59299
- const NUMBER_RE = '\\b(' + BASED_LITERAL_RE + '|' + DECIMAL_LITERAL_RE + ')';
59755
+ "use strict";
59300
59756
 
59301
- const KEYWORDS = [
59302
- "abs",
59303
- "access",
59304
- "after",
59305
- "alias",
59306
- "all",
59307
- "and",
59308
- "architecture",
59309
- "array",
59310
- "assert",
59311
- "assume",
59312
- "assume_guarantee",
59313
- "attribute",
59314
- "begin",
59315
- "block",
59316
- "body",
59317
- "buffer",
59318
- "bus",
59319
- "case",
59320
- "component",
59321
- "configuration",
59322
- "constant",
59323
- "context",
59324
- "cover",
59325
- "disconnect",
59326
- "downto",
59327
- "default",
59328
- "else",
59329
- "elsif",
59330
- "end",
59331
- "entity",
59332
- "exit",
59333
- "fairness",
59334
- "file",
59335
- "for",
59336
- "force",
59337
- "function",
59338
- "generate",
59339
- "generic",
59340
- "group",
59341
- "guarded",
59342
- "if",
59343
- "impure",
59344
- "in",
59345
- "inertial",
59346
- "inout",
59347
- "is",
59348
- "label",
59349
- "library",
59350
- "linkage",
59351
- "literal",
59352
- "loop",
59353
- "map",
59354
- "mod",
59355
- "nand",
59356
- "new",
59357
- "next",
59358
- "nor",
59359
- "not",
59360
- "null",
59361
- "of",
59362
- "on",
59363
- "open",
59364
- "or",
59365
- "others",
59366
- "out",
59367
- "package",
59368
- "parameter",
59369
- "port",
59370
- "postponed",
59371
- "procedure",
59372
- "process",
59373
- "property",
59374
- "protected",
59375
- "pure",
59376
- "range",
59377
- "record",
59378
- "register",
59379
- "reject",
59380
- "release",
59381
- "rem",
59382
- "report",
59383
- "restrict",
59384
- "restrict_guarantee",
59385
- "return",
59386
- "rol",
59387
- "ror",
59388
- "select",
59389
- "sequence",
59390
- "severity",
59391
- "shared",
59392
- "signal",
59393
- "sla",
59394
- "sll",
59395
- "sra",
59396
- "srl",
59397
- "strong",
59398
- "subtype",
59399
- "then",
59400
- "to",
59401
- "transport",
59402
- "type",
59403
- "unaffected",
59404
- "units",
59405
- "until",
59406
- "use",
59407
- "variable",
59408
- "view",
59409
- "vmode",
59410
- "vprop",
59411
- "vunit",
59412
- "wait",
59413
- "when",
59414
- "while",
59415
- "with",
59416
- "xnor",
59417
- "xor"
59418
- ];
59419
- const BUILT_INS = [
59420
- "boolean",
59421
- "bit",
59422
- "character",
59423
- "integer",
59424
- "time",
59425
- "delay_length",
59426
- "natural",
59427
- "positive",
59428
- "string",
59429
- "bit_vector",
59430
- "file_open_kind",
59431
- "file_open_status",
59432
- "std_logic",
59433
- "std_logic_vector",
59434
- "unsigned",
59435
- "signed",
59436
- "boolean_vector",
59437
- "integer_vector",
59438
- "std_ulogic",
59439
- "std_ulogic_vector",
59440
- "unresolved_unsigned",
59441
- "u_unsigned",
59442
- "unresolved_signed",
59443
- "u_signed",
59444
- "real_vector",
59445
- "time_vector"
59446
- ];
59447
- const LITERALS = [
59448
- // severity_level
59449
- "false",
59450
- "true",
59451
- "note",
59452
- "warning",
59453
- "error",
59454
- "failure",
59455
- // textio
59456
- "line",
59457
- "text",
59458
- "side",
59459
- "width"
59460
- ];
59757
+ var DESCRIPTORS = __webpack_require__(3724);
59758
+ var uncurryThis = __webpack_require__(9504);
59759
+ var defineBuiltInAccessor = __webpack_require__(2106);
59461
59760
 
59462
- return {
59463
- name: 'VHDL',
59464
- case_insensitive: true,
59465
- keywords: {
59466
- keyword: KEYWORDS,
59467
- built_in: BUILT_INS,
59468
- literal: LITERALS
59761
+ var URLSearchParamsPrototype = URLSearchParams.prototype;
59762
+ var forEach = uncurryThis(URLSearchParamsPrototype.forEach);
59763
+
59764
+ // `URLSearchParams.prototype.size` getter
59765
+ // https://github.com/whatwg/url/pull/734
59766
+ if (DESCRIPTORS && !('size' in URLSearchParamsPrototype)) {
59767
+ defineBuiltInAccessor(URLSearchParamsPrototype, 'size', {
59768
+ get: function size() {
59769
+ var count = 0;
59770
+ forEach(this, function () { count++; });
59771
+ return count;
59469
59772
  },
59470
- illegal: /\{/,
59471
- contains: [
59472
- hljs.C_BLOCK_COMMENT_MODE, // VHDL-2008 block commenting.
59473
- hljs.COMMENT('--', '$'),
59474
- hljs.QUOTE_STRING_MODE,
59475
- {
59476
- className: 'number',
59477
- begin: NUMBER_RE,
59478
- relevance: 0
59479
- },
59480
- {
59481
- className: 'string',
59482
- begin: '\'(U|X|0|1|Z|W|L|H|-)\'',
59483
- contains: [ hljs.BACKSLASH_ESCAPE ]
59484
- },
59485
- {
59486
- className: 'symbol',
59487
- begin: '\'[A-Za-z](_?[A-Za-z0-9])*',
59488
- contains: [ hljs.BACKSLASH_ESCAPE ]
59489
- }
59490
- ]
59491
- };
59773
+ configurable: true,
59774
+ enumerable: true
59775
+ });
59492
59776
  }
59493
59777
 
59494
- module.exports = vhdl;
59495
-
59496
59778
 
59497
59779
  /***/ }),
59498
59780
 
@@ -63311,6 +63593,100 @@ function vala(hljs) {
63311
63593
  module.exports = vala;
63312
63594
 
63313
63595
 
63596
+ /***/ }),
63597
+
63598
+ /***/ 9462:
63599
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
63600
+
63601
+ "use strict";
63602
+
63603
+ var call = __webpack_require__(9565);
63604
+ var create = __webpack_require__(2360);
63605
+ var createNonEnumerableProperty = __webpack_require__(6699);
63606
+ var defineBuiltIns = __webpack_require__(6279);
63607
+ var wellKnownSymbol = __webpack_require__(8227);
63608
+ var InternalStateModule = __webpack_require__(1181);
63609
+ var getMethod = __webpack_require__(5966);
63610
+ var IteratorPrototype = (__webpack_require__(7657).IteratorPrototype);
63611
+ var createIterResultObject = __webpack_require__(2529);
63612
+ var iteratorClose = __webpack_require__(9539);
63613
+ var iteratorCloseAll = __webpack_require__(1385);
63614
+
63615
+ var TO_STRING_TAG = wellKnownSymbol('toStringTag');
63616
+ var ITERATOR_HELPER = 'IteratorHelper';
63617
+ var WRAP_FOR_VALID_ITERATOR = 'WrapForValidIterator';
63618
+ var NORMAL = 'normal';
63619
+ var THROW = 'throw';
63620
+ var setInternalState = InternalStateModule.set;
63621
+
63622
+ var createIteratorProxyPrototype = function (IS_ITERATOR) {
63623
+ var getInternalState = InternalStateModule.getterFor(IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER);
63624
+
63625
+ return defineBuiltIns(create(IteratorPrototype), {
63626
+ next: function next() {
63627
+ var state = getInternalState(this);
63628
+ // for simplification:
63629
+ // for `%WrapForValidIteratorPrototype%.next` or with `state.returnHandlerResult` our `nextHandler` returns `IterResultObject`
63630
+ // for `%IteratorHelperPrototype%.next` - just a value
63631
+ if (IS_ITERATOR) return state.nextHandler();
63632
+ if (state.done) return createIterResultObject(undefined, true);
63633
+ try {
63634
+ var result = state.nextHandler();
63635
+ return state.returnHandlerResult ? result : createIterResultObject(result, state.done);
63636
+ } catch (error) {
63637
+ state.done = true;
63638
+ throw error;
63639
+ }
63640
+ },
63641
+ 'return': function () {
63642
+ var state = getInternalState(this);
63643
+ var iterator = state.iterator;
63644
+ state.done = true;
63645
+ if (IS_ITERATOR) {
63646
+ var returnMethod = getMethod(iterator, 'return');
63647
+ return returnMethod ? call(returnMethod, iterator) : createIterResultObject(undefined, true);
63648
+ }
63649
+ if (state.inner) try {
63650
+ iteratorClose(state.inner.iterator, NORMAL);
63651
+ } catch (error) {
63652
+ return iteratorClose(iterator, THROW, error);
63653
+ }
63654
+ if (state.openIters) try {
63655
+ iteratorCloseAll(state.openIters, NORMAL);
63656
+ } catch (error) {
63657
+ return iteratorClose(iterator, THROW, error);
63658
+ }
63659
+ if (iterator) iteratorClose(iterator, NORMAL);
63660
+ return createIterResultObject(undefined, true);
63661
+ }
63662
+ });
63663
+ };
63664
+
63665
+ var WrapForValidIteratorPrototype = createIteratorProxyPrototype(true);
63666
+ var IteratorHelperPrototype = createIteratorProxyPrototype(false);
63667
+
63668
+ createNonEnumerableProperty(IteratorHelperPrototype, TO_STRING_TAG, 'Iterator Helper');
63669
+
63670
+ module.exports = function (nextHandler, IS_ITERATOR, RETURN_HANDLER_RESULT) {
63671
+ var IteratorProxy = function Iterator(record, state) {
63672
+ if (state) {
63673
+ state.iterator = record.iterator;
63674
+ state.next = record.next;
63675
+ } else state = record;
63676
+ state.type = IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER;
63677
+ state.returnHandlerResult = !!RETURN_HANDLER_RESULT;
63678
+ state.nextHandler = nextHandler;
63679
+ state.counter = 0;
63680
+ state.done = false;
63681
+ setInternalState(this, state);
63682
+ };
63683
+
63684
+ IteratorProxy.prototype = IS_ITERATOR ? WrapForValidIteratorPrototype : IteratorHelperPrototype;
63685
+
63686
+ return IteratorProxy;
63687
+ };
63688
+
63689
+
63314
63690
  /***/ }),
63315
63691
 
63316
63692
  /***/ 9504:
@@ -66474,8 +66850,8 @@ var ChatWindowHeader_component = normalizeComponent(
66474
66850
  )
66475
66851
 
66476
66852
  /* harmony default export */ var ChatWindowHeader = (ChatWindowHeader_component.exports);
66477
- ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/ChatMessageList.vue?vue&type=template&id=1963170c&scoped=true
66478
- var ChatMessageListvue_type_template_id_1963170c_scoped_true_render = function render() {
66853
+ ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/ChatMessageList.vue?vue&type=template&id=74195154&scoped=true
66854
+ var ChatMessageListvue_type_template_id_74195154_scoped_true_render = function render() {
66479
66855
  var _vm = this,
66480
66856
  _c = _vm._self._c;
66481
66857
  return _c('div', {
@@ -66495,17 +66871,14 @@ var ChatMessageListvue_type_template_id_1963170c_scoped_true_render = function r
66495
66871
  attrs: {
66496
66872
  "message": message,
66497
66873
  "think-status": _vm.thinkStatus
66498
- },
66499
- on: {
66500
- "thinking-toggle": function ($event) {
66501
- return _vm.handleThinkingToggle(message);
66502
- }
66503
66874
  }
66504
66875
  })], 1);
66505
66876
  })], 2);
66506
66877
  };
66507
- var ChatMessageListvue_type_template_id_1963170c_scoped_true_staticRenderFns = [];
66878
+ var ChatMessageListvue_type_template_id_74195154_scoped_true_staticRenderFns = [];
66508
66879
 
66880
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.map.js
66881
+ var es_iterator_map = __webpack_require__(1701);
66509
66882
  ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/UserMessage.vue?vue&type=template&id=6a2b6167&scoped=true
66510
66883
  var UserMessagevue_type_template_id_6a2b6167_scoped_true_render = function render() {
66511
66884
  var _vm = this,
@@ -66556,8 +66929,8 @@ var UserMessage_component = normalizeComponent(
66556
66929
  )
66557
66930
 
66558
66931
  /* harmony default export */ var UserMessage = (UserMessage_component.exports);
66559
- ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/AiMessage.vue?vue&type=template&id=76c8c993&scoped=true
66560
- var AiMessagevue_type_template_id_76c8c993_scoped_true_render = function render() {
66932
+ ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/AiMessage.vue?vue&type=template&id=59354fe3&scoped=true
66933
+ var AiMessagevue_type_template_id_59354fe3_scoped_true_render = function render() {
66561
66934
  var _vm = this,
66562
66935
  _c = _vm._self._c;
66563
66936
  return _c('div', {
@@ -66577,21 +66950,24 @@ var AiMessagevue_type_template_id_76c8c993_scoped_true_render = function render(
66577
66950
  key: item.id,
66578
66951
  staticClass: "ai-message-item"
66579
66952
  }, [item.type === 'thinking' ? _c('div', {
66580
- staticClass: "ai-thinking",
66953
+ staticClass: "ai-thinking"
66954
+ }, [_c('div', {
66955
+ staticClass: "ai-thinking-time",
66956
+ class: {
66957
+ 'thinking-expanded': !item.thinkingExpanded
66958
+ },
66581
66959
  on: {
66582
66960
  "click": function ($event) {
66583
- return _vm.$emit('thinking-toggle');
66961
+ return _vm.handleThinkingToggle(item);
66584
66962
  }
66585
66963
  }
66586
- }, [_c('div', {
66587
- staticClass: "ai-thinking-time"
66588
- }, [_vm._v(" " + _vm._s(item.duration ? `思考用时 ${item.duration} 秒` : '思考中...') + " ")]), _vm.thinkingExpanded ? _c('div', {
66964
+ }, [_vm._v(" " + _vm._s(item.duration ? `思考用时 ${item.duration} 秒` : '思考中...') + " ")]), item.thinkingExpanded ? _c('div', {
66589
66965
  staticClass: "ai-thinking-content"
66590
66966
  }, [_vm._v(" " + _vm._s(item.content) + " ")]) : _vm._e()]) : item.type === 'tool_call' ? _c('div', {
66591
66967
  staticClass: "ai-tool-call"
66592
66968
  }, [_c('div', {
66593
66969
  staticClass: "tool-title"
66594
- }, [_vm._v("🔧 " + _vm._s(item.content) + _vm._s(item.name))])]) : item.type === 'tool_result' ? _c('div', {
66970
+ }, [_vm._v("🔧 " + _vm._s(item.name))])]) : item.type === 'tool_result' ? _c('div', {
66595
66971
  staticClass: "ai-tool-result"
66596
66972
  }, [_c('div', {
66597
66973
  staticClass: "tool-title"
@@ -66603,8 +66979,14 @@ var AiMessagevue_type_template_id_76c8c993_scoped_true_render = function render(
66603
66979
  }) : _vm._e()]);
66604
66980
  })], 2)]);
66605
66981
  };
66606
- var AiMessagevue_type_template_id_76c8c993_scoped_true_staticRenderFns = [];
66607
-
66982
+ var AiMessagevue_type_template_id_59354fe3_scoped_true_staticRenderFns = [];
66983
+
66984
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.delete.js
66985
+ var web_url_search_params_delete = __webpack_require__(4603);
66986
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.has.js
66987
+ var web_url_search_params_has = __webpack_require__(7566);
66988
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.size.js
66989
+ var web_url_search_params_size = __webpack_require__(8721);
66608
66990
  ;// ./node_modules/marked/lib/marked.esm.js
66609
66991
  /**
66610
66992
  * marked v15.0.12 - a markdown parser
@@ -68792,8 +69174,33 @@ var lib = __webpack_require__(3223);
68792
69174
 
68793
69175
 
68794
69176
 
69177
+
69178
+
69179
+
69180
+
69181
+ // 创建自定义渲染器
69182
+ const renderer = new marked.Renderer();
69183
+
69184
+ // 自定义链接渲染
69185
+ renderer.link = function ({
69186
+ href,
69187
+ text
69188
+ }) {
69189
+ let dataPath = '';
69190
+ const url = new URL(href, window.location.origin);
69191
+ const pathname = url.pathname;
69192
+ const search = url.search;
69193
+ if (pathname.startsWith('/portal/')) {
69194
+ dataPath = pathname.substring('/portal'.length) + search;
69195
+ return `<a href="javascript:void(0)" data-path="${dataPath}" data-text="${text}">${text}</a>`;
69196
+ } else {
69197
+ dataPath = href;
69198
+ return `<a href="${dataPath}" target="_blank">${text}</a>`;
69199
+ }
69200
+ };
68795
69201
  marked.setOptions({
68796
- highlight(code, lang) {
69202
+ renderer: renderer,
69203
+ highlight: function (code, lang) {
68797
69204
  if (lang && es.getLanguage(lang)) {
68798
69205
  return es.highlight(code, {
68799
69206
  language: lang
@@ -68817,15 +69224,18 @@ marked.setOptions({
68817
69224
  methods: {
68818
69225
  renderMarkdown(text) {
68819
69226
  return marked.parse(text || '');
69227
+ },
69228
+ handleThinkingToggle(item) {
69229
+ this.$set(item, 'thinkingExpanded', !item.thinkingExpanded);
68820
69230
  }
68821
69231
  }
68822
69232
  });
68823
69233
  ;// ./components/AiMessage.vue?vue&type=script&lang=js
68824
69234
  /* harmony default export */ var components_AiMessagevue_type_script_lang_js = (AiMessagevue_type_script_lang_js);
68825
- ;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-54.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-54.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-54.use[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/AiMessage.vue?vue&type=style&index=0&id=76c8c993&prod&scoped=true&lang=css
69235
+ ;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-54.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-54.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-54.use[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/AiMessage.vue?vue&type=style&index=0&id=59354fe3&prod&scoped=true&lang=css
68826
69236
  // extracted by mini-css-extract-plugin
68827
69237
 
68828
- ;// ./components/AiMessage.vue?vue&type=style&index=0&id=76c8c993&prod&scoped=true&lang=css
69238
+ ;// ./components/AiMessage.vue?vue&type=style&index=0&id=59354fe3&prod&scoped=true&lang=css
68829
69239
 
68830
69240
  ;// ./components/AiMessage.vue
68831
69241
 
@@ -68838,11 +69248,11 @@ marked.setOptions({
68838
69248
 
68839
69249
  var AiMessage_component = normalizeComponent(
68840
69250
  components_AiMessagevue_type_script_lang_js,
68841
- AiMessagevue_type_template_id_76c8c993_scoped_true_render,
68842
- AiMessagevue_type_template_id_76c8c993_scoped_true_staticRenderFns,
69251
+ AiMessagevue_type_template_id_59354fe3_scoped_true_render,
69252
+ AiMessagevue_type_template_id_59354fe3_scoped_true_staticRenderFns,
68843
69253
  false,
68844
69254
  null,
68845
- "76c8c993",
69255
+ "59354fe3",
68846
69256
  null
68847
69257
 
68848
69258
  )
@@ -68851,6 +69261,8 @@ var AiMessage_component = normalizeComponent(
68851
69261
  ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/ChatMessageList.vue?vue&type=script&lang=js
68852
69262
 
68853
69263
 
69264
+
69265
+
68854
69266
  /* harmony default export */ var ChatMessageListvue_type_script_lang_js = ({
68855
69267
  components: {
68856
69268
  UserMessage: UserMessage,
@@ -68863,12 +69275,16 @@ var AiMessage_component = normalizeComponent(
68863
69275
  computed: {
68864
69276
  lastMessageObject() {
68865
69277
  return this.messages[this.messages.length - 1] || null;
69278
+ },
69279
+ timelineContents() {
69280
+ if (!this.lastMessageObject || !this.lastMessageObject.timeline) {
69281
+ return '';
69282
+ }
69283
+ // 将所有 content 拼接成一个字符串用于监听变化
69284
+ return this.lastMessageObject.timeline.map(item => item.content || '').join('');
68866
69285
  }
68867
69286
  },
68868
69287
  methods: {
68869
- handleThinkingToggle(message) {
68870
- this.$set(message, 'thinkingExpanded', !message.thinkingExpanded);
68871
- },
68872
69288
  scrollToBottom() {
68873
69289
  this.$nextTick(() => {
68874
69290
  const el = this.$refs.chatArea;
@@ -68877,7 +69293,7 @@ var AiMessage_component = normalizeComponent(
68877
69293
  }
68878
69294
  },
68879
69295
  watch: {
68880
- lastMessageObject: {
69296
+ timelineContents: {
68881
69297
  handler() {
68882
69298
  this.scrollToBottom();
68883
69299
  },
@@ -68888,10 +69304,10 @@ var AiMessage_component = normalizeComponent(
68888
69304
  });
68889
69305
  ;// ./components/ChatMessageList.vue?vue&type=script&lang=js
68890
69306
  /* harmony default export */ var components_ChatMessageListvue_type_script_lang_js = (ChatMessageListvue_type_script_lang_js);
68891
- ;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-54.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-54.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-54.use[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/ChatMessageList.vue?vue&type=style&index=0&id=1963170c&prod&scoped=true&lang=css
69307
+ ;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-54.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-54.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-54.use[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/ChatMessageList.vue?vue&type=style&index=0&id=74195154&prod&scoped=true&lang=css
68892
69308
  // extracted by mini-css-extract-plugin
68893
69309
 
68894
- ;// ./components/ChatMessageList.vue?vue&type=style&index=0&id=1963170c&prod&scoped=true&lang=css
69310
+ ;// ./components/ChatMessageList.vue?vue&type=style&index=0&id=74195154&prod&scoped=true&lang=css
68895
69311
 
68896
69312
  ;// ./components/ChatMessageList.vue
68897
69313
 
@@ -68904,11 +69320,11 @@ var AiMessage_component = normalizeComponent(
68904
69320
 
68905
69321
  var ChatMessageList_component = normalizeComponent(
68906
69322
  components_ChatMessageListvue_type_script_lang_js,
68907
- ChatMessageListvue_type_template_id_1963170c_scoped_true_render,
68908
- ChatMessageListvue_type_template_id_1963170c_scoped_true_staticRenderFns,
69323
+ ChatMessageListvue_type_template_id_74195154_scoped_true_render,
69324
+ ChatMessageListvue_type_template_id_74195154_scoped_true_staticRenderFns,
68909
69325
  false,
68910
69326
  null,
68911
- "1963170c",
69327
+ "74195154",
68912
69328
  null
68913
69329
 
68914
69330
  )
@@ -69353,6 +69769,8 @@ const TIME_JUMP_POINTS_URL = '/minio/lingxiaoai/timeJumpPoints.json'; // 语音u
69353
69769
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.json.stringify.js
69354
69770
  var es_json_stringify = __webpack_require__(3110);
69355
69771
  ;// ./components/utils/StreamParser.js
69772
+
69773
+
69356
69774
  class StreamParser {
69357
69775
  constructor(options = {}) {
69358
69776
  this.options = {
@@ -69408,36 +69826,63 @@ class StreamParser {
69408
69826
  }
69409
69827
  this.scheduleFlush(emit);
69410
69828
  }
69829
+ parseTag(tag) {
69830
+ const isClosing = tag.startsWith('</');
69831
+ const content = tag.replace(/^<\/?|>$/g, '').trim();
69832
+ const [tagName, ...attrParts] = content.split(/\s+/);
69833
+ const attrs = {};
69834
+ attrParts.forEach(part => {
69835
+ const [key, rawValue] = part.split('=');
69836
+ if (!key || !rawValue) return;
69837
+ attrs[key] = rawValue.replace(/^['"]|['"]$/g, '');
69838
+ });
69839
+ return {
69840
+ tag: tagName.replace('/', ''),
69841
+ attrs,
69842
+ isClosing
69843
+ };
69844
+ }
69411
69845
  handleTag(tag, emit) {
69412
- const t = tag.toLowerCase().trim();
69413
- if (t.startsWith('<think')) {
69414
- this.startThinking(emit);
69415
- } else if (t.startsWith('</think')) {
69416
- this.closeThinking();
69417
- this.currentType = 'content';
69418
- this.currentEvent = null;
69419
- } else if (t.startsWith('<tool_call')) {
69420
- const attrs = this.parseTagAttributes(tag);
69421
- this.switchType('tool_call', emit, attrs.name);
69422
- } else if (t.startsWith('</tool_call')) {
69423
- this.switchType('content', emit);
69424
- } else if (t.startsWith('<tool_result')) {
69425
- this.switchType('tool_result', emit);
69426
- } else if (t.startsWith('</tool_result')) {
69427
- this.switchType('content', emit);
69846
+ const {
69847
+ tag: tagName,
69848
+ attrs,
69849
+ isClosing
69850
+ } = this.parseTag(tag.toLowerCase());
69851
+ if (tagName === 'think') {
69852
+ if (!isClosing) {
69853
+ this.startThinking(attrs, emit);
69854
+ } else {
69855
+ this.closeThinking();
69856
+ this.currentType = 'content';
69857
+ this.currentEvent = null;
69858
+ }
69859
+ } else if (tagName === 'tool_call') {
69860
+ if (!isClosing) {
69861
+ this.switchType('tool_call', emit, attrs);
69862
+ } else {
69863
+ this.switchType('content', emit);
69864
+ }
69865
+ } else if (tagName === 'tool_result') {
69866
+ if (!isClosing) {
69867
+ this.switchType('tool_result', emit, attrs);
69868
+ } else {
69869
+ this.switchType('content', emit);
69870
+ }
69428
69871
  } else {
69429
69872
  this.append(tag, emit);
69430
69873
  }
69431
69874
  }
69432
- startThinking(emit) {
69875
+ startThinking(attrs = {}, emit) {
69433
69876
  // 如果上一个 thinking 还没结算,先结算
69434
69877
  this.closeThinking();
69435
69878
  this.currentType = 'thinking';
69436
69879
  this.currentEvent = {
69437
69880
  id: this.uuid(),
69438
69881
  type: 'thinking',
69882
+ name: attrs.name || null,
69439
69883
  content: '',
69440
69884
  startTime: Date.now(),
69885
+ thinkingExpanded: true,
69441
69886
  endTime: null,
69442
69887
  duration: null
69443
69888
  };
@@ -69453,13 +69898,22 @@ class StreamParser {
69453
69898
  console.log(this.currentEvent.endTime - this.currentEvent.startTime);
69454
69899
  }
69455
69900
  }
69456
- switchType(type) {
69901
+ switchType(type, emit, attrs = {}) {
69457
69902
  // 如果是从 thinking 切走,结算时间
69458
69903
  if (this.currentEvent?.type === 'thinking') {
69459
69904
  this.closeThinking();
69460
69905
  }
69461
69906
  this.currentType = type;
69462
- this.currentEvent = null;
69907
+ this.currentEvent = {
69908
+ id: this.uuid(),
69909
+ type,
69910
+ name: attrs.name || null,
69911
+ content: ''
69912
+ };
69913
+ emit({
69914
+ type: 'create',
69915
+ event: this.currentEvent
69916
+ });
69463
69917
  }
69464
69918
  append(text, emit) {
69465
69919
  if (!text) return;
@@ -69480,15 +69934,6 @@ class StreamParser {
69480
69934
  event: this.currentEvent
69481
69935
  });
69482
69936
  }
69483
- parseTagAttributes(tag) {
69484
- const attrRegex = /(\w+)=['"]([^'"]+)['"]/g;
69485
- const attrs = {};
69486
- let match;
69487
- while ((match = attrRegex.exec(tag)) !== null) {
69488
- attrs[match[1]] = match[2];
69489
- }
69490
- return attrs;
69491
- }
69492
69937
  scheduleFlush(emit) {
69493
69938
  if (this.updateTimer) return;
69494
69939
  this.updateTimer = setTimeout(() => {
@@ -69529,23 +69974,26 @@ const getCookie = cname => {
69529
69974
  return '';
69530
69975
  };
69531
69976
 
69977
+ ;// ./components/utils/Uuid.js
69978
+ function generateUuid() {
69979
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
69980
+ var r = Math.random() * 16 | 0,
69981
+ v = c === 'x' ? r : r & 0x3 | 0x8;
69982
+ return v.toString(16);
69983
+ });
69984
+ }
69532
69985
  ;// ./components/mixins/messageMixin.js
69533
69986
 
69534
69987
 
69535
69988
 
69536
69989
 
69537
69990
 
69991
+
69538
69992
  /* harmony default export */ var messageMixin = ({
69539
69993
  data() {
69540
69994
  return {
69541
69995
  streamParser: null,
69542
- aiMessage: {
69543
- id: Date.now(),
69544
- type: 'ai',
69545
- timeline: [],
69546
- loading: true,
69547
- thinkingExpanded: true
69548
- }
69996
+ currentMessage: null
69549
69997
  };
69550
69998
  },
69551
69999
  created() {
@@ -69558,13 +70006,21 @@ const getCookie = cname => {
69558
70006
  },
69559
70007
  methods: {
69560
70008
  createAiMessage() {
69561
- this.messages.push(this.aiMessage);
69562
- this.currentMessage = this.aiMessage;
69563
- return this.aiMessage;
70009
+ const aiMessage = {
70010
+ id: generateUuid(),
70011
+ type: 'ai',
70012
+ sender: 'AI',
70013
+ timeline: [],
70014
+ loading: true,
70015
+ thinkingExpanded: true
70016
+ };
70017
+ this.messages.push(aiMessage);
70018
+ this.currentMessage = aiMessage;
70019
+ return aiMessage;
69564
70020
  },
69565
70021
  createUserMessage(content) {
69566
70022
  const message = {
69567
- id: this.messages.length + 1,
70023
+ id: generateUuid(),
69568
70024
  type: 'user',
69569
70025
  sender: '用户',
69570
70026
  time: '',
@@ -69609,7 +70065,6 @@ const getCookie = cname => {
69609
70065
 
69610
70066
  // 完成解析
69611
70067
  this.streamParser.finish(() => {});
69612
- this.aiMessage.loading = false;
69613
70068
 
69614
70069
  // 记录耗时
69615
70070
  const duration = Date.now() - startTime;
@@ -69622,7 +70077,6 @@ const getCookie = cname => {
69622
70077
  console.error('发送消息失败:', error);
69623
70078
  if (this.currentMessage) {
69624
70079
  this.currentMessage.content = '抱歉,发生了错误,请重试。';
69625
- this.$forceUpdate();
69626
70080
  }
69627
70081
  } finally {
69628
70082
  // 确保加载状态关闭
@@ -69651,9 +70105,9 @@ const getCookie = cname => {
69651
70105
  console.log('收到数据块:', chunk);
69652
70106
  // 使用解析器处理数据块,确保this指向正确
69653
70107
  this.streamParser.processChunk(chunk, e => {
69654
- console.log('处理数据块:', e);
70108
+ if (!this.currentMessage) return;
69655
70109
  if (e.type === 'create') {
69656
- this.aiMessage.timeline.push(e.event);
70110
+ this.currentMessage.timeline.push(e.event);
69657
70111
  }
69658
70112
  });
69659
70113
  }
@@ -69694,14 +70148,6 @@ const getCookie = cname => {
69694
70148
  },
69695
70149
  beforeDestroy() {}
69696
70150
  });
69697
- ;// ./components/utils/Uuid.js
69698
- function generateUuid() {
69699
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
69700
- var r = Math.random() * 16 | 0,
69701
- v = c === 'x' ? r : r & 0x3 | 0x8;
69702
- return v.toString(16);
69703
- });
69704
- }
69705
70151
  ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/ChatWindow.vue?vue&type=script&lang=js
69706
70152
 
69707
70153