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.
@@ -3606,6 +3606,26 @@ module.exports = function (it, Prototype) {
3606
3606
  };
3607
3607
 
3608
3608
 
3609
+ /***/ }),
3610
+
3611
+ /***/ 684:
3612
+ /***/ (function(module) {
3613
+
3614
+ "use strict";
3615
+
3616
+ // Should throw an error on invalid iterator
3617
+ // https://issues.chromium.org/issues/336839115
3618
+ module.exports = function (methodName, argument) {
3619
+ // eslint-disable-next-line es/no-iterator -- required for testing
3620
+ var method = typeof Iterator == 'function' && Iterator.prototype[methodName];
3621
+ if (method) try {
3622
+ method.call({ next: null }, argument).next();
3623
+ } catch (error) {
3624
+ return true;
3625
+ }
3626
+ };
3627
+
3628
+
3609
3629
  /***/ }),
3610
3630
 
3611
3631
  /***/ 722:
@@ -5270,6 +5290,229 @@ module.exports = Object.keys || function keys(O) {
5270
5290
  };
5271
5291
 
5272
5292
 
5293
+ /***/ }),
5294
+
5295
+ /***/ 1102:
5296
+ /***/ (function(module) {
5297
+
5298
+ /*
5299
+ Language: VHDL
5300
+ Author: Igor Kalnitsky <igor@kalnitsky.org>
5301
+ Contributors: Daniel C.K. Kho <daniel.kho@tauhop.com>, Guillaume Savaton <guillaume.savaton@eseo.fr>
5302
+ Description: VHDL is a hardware description language used in electronic design automation to describe digital and mixed-signal systems.
5303
+ Website: https://en.wikipedia.org/wiki/VHDL
5304
+ Category: hardware
5305
+ */
5306
+
5307
+ function vhdl(hljs) {
5308
+ // Regular expression for VHDL numeric literals.
5309
+
5310
+ // Decimal literal:
5311
+ const INTEGER_RE = '\\d(_|\\d)*';
5312
+ const EXPONENT_RE = '[eE][-+]?' + INTEGER_RE;
5313
+ const DECIMAL_LITERAL_RE = INTEGER_RE + '(\\.' + INTEGER_RE + ')?' + '(' + EXPONENT_RE + ')?';
5314
+ // Based literal:
5315
+ const BASED_INTEGER_RE = '\\w+';
5316
+ const BASED_LITERAL_RE = INTEGER_RE + '#' + BASED_INTEGER_RE + '(\\.' + BASED_INTEGER_RE + ')?' + '#' + '(' + EXPONENT_RE + ')?';
5317
+
5318
+ const NUMBER_RE = '\\b(' + BASED_LITERAL_RE + '|' + DECIMAL_LITERAL_RE + ')';
5319
+
5320
+ const KEYWORDS = [
5321
+ "abs",
5322
+ "access",
5323
+ "after",
5324
+ "alias",
5325
+ "all",
5326
+ "and",
5327
+ "architecture",
5328
+ "array",
5329
+ "assert",
5330
+ "assume",
5331
+ "assume_guarantee",
5332
+ "attribute",
5333
+ "begin",
5334
+ "block",
5335
+ "body",
5336
+ "buffer",
5337
+ "bus",
5338
+ "case",
5339
+ "component",
5340
+ "configuration",
5341
+ "constant",
5342
+ "context",
5343
+ "cover",
5344
+ "disconnect",
5345
+ "downto",
5346
+ "default",
5347
+ "else",
5348
+ "elsif",
5349
+ "end",
5350
+ "entity",
5351
+ "exit",
5352
+ "fairness",
5353
+ "file",
5354
+ "for",
5355
+ "force",
5356
+ "function",
5357
+ "generate",
5358
+ "generic",
5359
+ "group",
5360
+ "guarded",
5361
+ "if",
5362
+ "impure",
5363
+ "in",
5364
+ "inertial",
5365
+ "inout",
5366
+ "is",
5367
+ "label",
5368
+ "library",
5369
+ "linkage",
5370
+ "literal",
5371
+ "loop",
5372
+ "map",
5373
+ "mod",
5374
+ "nand",
5375
+ "new",
5376
+ "next",
5377
+ "nor",
5378
+ "not",
5379
+ "null",
5380
+ "of",
5381
+ "on",
5382
+ "open",
5383
+ "or",
5384
+ "others",
5385
+ "out",
5386
+ "package",
5387
+ "parameter",
5388
+ "port",
5389
+ "postponed",
5390
+ "procedure",
5391
+ "process",
5392
+ "property",
5393
+ "protected",
5394
+ "pure",
5395
+ "range",
5396
+ "record",
5397
+ "register",
5398
+ "reject",
5399
+ "release",
5400
+ "rem",
5401
+ "report",
5402
+ "restrict",
5403
+ "restrict_guarantee",
5404
+ "return",
5405
+ "rol",
5406
+ "ror",
5407
+ "select",
5408
+ "sequence",
5409
+ "severity",
5410
+ "shared",
5411
+ "signal",
5412
+ "sla",
5413
+ "sll",
5414
+ "sra",
5415
+ "srl",
5416
+ "strong",
5417
+ "subtype",
5418
+ "then",
5419
+ "to",
5420
+ "transport",
5421
+ "type",
5422
+ "unaffected",
5423
+ "units",
5424
+ "until",
5425
+ "use",
5426
+ "variable",
5427
+ "view",
5428
+ "vmode",
5429
+ "vprop",
5430
+ "vunit",
5431
+ "wait",
5432
+ "when",
5433
+ "while",
5434
+ "with",
5435
+ "xnor",
5436
+ "xor"
5437
+ ];
5438
+ const BUILT_INS = [
5439
+ "boolean",
5440
+ "bit",
5441
+ "character",
5442
+ "integer",
5443
+ "time",
5444
+ "delay_length",
5445
+ "natural",
5446
+ "positive",
5447
+ "string",
5448
+ "bit_vector",
5449
+ "file_open_kind",
5450
+ "file_open_status",
5451
+ "std_logic",
5452
+ "std_logic_vector",
5453
+ "unsigned",
5454
+ "signed",
5455
+ "boolean_vector",
5456
+ "integer_vector",
5457
+ "std_ulogic",
5458
+ "std_ulogic_vector",
5459
+ "unresolved_unsigned",
5460
+ "u_unsigned",
5461
+ "unresolved_signed",
5462
+ "u_signed",
5463
+ "real_vector",
5464
+ "time_vector"
5465
+ ];
5466
+ const LITERALS = [
5467
+ // severity_level
5468
+ "false",
5469
+ "true",
5470
+ "note",
5471
+ "warning",
5472
+ "error",
5473
+ "failure",
5474
+ // textio
5475
+ "line",
5476
+ "text",
5477
+ "side",
5478
+ "width"
5479
+ ];
5480
+
5481
+ return {
5482
+ name: 'VHDL',
5483
+ case_insensitive: true,
5484
+ keywords: {
5485
+ keyword: KEYWORDS,
5486
+ built_in: BUILT_INS,
5487
+ literal: LITERALS
5488
+ },
5489
+ illegal: /\{/,
5490
+ contains: [
5491
+ hljs.C_BLOCK_COMMENT_MODE, // VHDL-2008 block commenting.
5492
+ hljs.COMMENT('--', '$'),
5493
+ hljs.QUOTE_STRING_MODE,
5494
+ {
5495
+ className: 'number',
5496
+ begin: NUMBER_RE,
5497
+ relevance: 0
5498
+ },
5499
+ {
5500
+ className: 'string',
5501
+ begin: '\'(U|X|0|1|Z|W|L|H|-)\'',
5502
+ contains: [ hljs.BACKSLASH_ESCAPE ]
5503
+ },
5504
+ {
5505
+ className: 'symbol',
5506
+ begin: '\'[A-Za-z](_?[A-Za-z0-9])*',
5507
+ contains: [ hljs.BACKSLASH_ESCAPE ]
5508
+ }
5509
+ ]
5510
+ };
5511
+ }
5512
+
5513
+ module.exports = vhdl;
5514
+
5515
+
5273
5516
  /***/ }),
5274
5517
 
5275
5518
  /***/ 1108:
@@ -9987,6 +10230,30 @@ module.exports = function (argument) {
9987
10230
  };
9988
10231
 
9989
10232
 
10233
+ /***/ }),
10234
+
10235
+ /***/ 1385:
10236
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
10237
+
10238
+ "use strict";
10239
+
10240
+ var iteratorClose = __webpack_require__(9539);
10241
+
10242
+ module.exports = function (iters, kind, value) {
10243
+ for (var i = iters.length - 1; i >= 0; i--) {
10244
+ if (iters[i] === undefined) continue;
10245
+ try {
10246
+ value = iteratorClose(iters[i].iterator, kind, value);
10247
+ } catch (error) {
10248
+ kind = 'throw';
10249
+ value = error;
10250
+ }
10251
+ }
10252
+ if (kind === 'throw') throw value;
10253
+ return value;
10254
+ };
10255
+
10256
+
9990
10257
  /***/ }),
9991
10258
 
9992
10259
  /***/ 1432:
@@ -12379,6 +12646,58 @@ $({ target: 'Set', proto: true, real: true, forced: FORCED }, {
12379
12646
  });
12380
12647
 
12381
12648
 
12649
+ /***/ }),
12650
+
12651
+ /***/ 1701:
12652
+ /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
12653
+
12654
+ "use strict";
12655
+
12656
+ var $ = __webpack_require__(6518);
12657
+ var call = __webpack_require__(9565);
12658
+ var aCallable = __webpack_require__(9306);
12659
+ var anObject = __webpack_require__(8551);
12660
+ var getIteratorDirect = __webpack_require__(1767);
12661
+ var createIteratorProxy = __webpack_require__(9462);
12662
+ var callWithSafeIterationClosing = __webpack_require__(6319);
12663
+ var iteratorClose = __webpack_require__(9539);
12664
+ var iteratorHelperThrowsOnInvalidIterator = __webpack_require__(684);
12665
+ var iteratorHelperWithoutClosingOnEarlyError = __webpack_require__(4549);
12666
+ var IS_PURE = __webpack_require__(6395);
12667
+
12668
+ var MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR = !IS_PURE && !iteratorHelperThrowsOnInvalidIterator('map', function () { /* empty */ });
12669
+ var mapWithoutClosingOnEarlyError = !IS_PURE && !MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR
12670
+ && iteratorHelperWithoutClosingOnEarlyError('map', TypeError);
12671
+
12672
+ var FORCED = IS_PURE || MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR || mapWithoutClosingOnEarlyError;
12673
+
12674
+ var IteratorProxy = createIteratorProxy(function () {
12675
+ var iterator = this.iterator;
12676
+ var result = anObject(call(this.next, iterator));
12677
+ var done = this.done = !!result.done;
12678
+ if (!done) return callWithSafeIterationClosing(iterator, this.mapper, [result.value, this.counter++], true);
12679
+ });
12680
+
12681
+ // `Iterator.prototype.map` method
12682
+ // https://tc39.es/ecma262/#sec-iterator.prototype.map
12683
+ $({ target: 'Iterator', proto: true, real: true, forced: FORCED }, {
12684
+ map: function map(mapper) {
12685
+ anObject(this);
12686
+ try {
12687
+ aCallable(mapper);
12688
+ } catch (error) {
12689
+ iteratorClose(this, 'throw', error);
12690
+ }
12691
+
12692
+ if (mapWithoutClosingOnEarlyError) return call(mapWithoutClosingOnEarlyError, this, mapper);
12693
+
12694
+ return new IteratorProxy(getIteratorDirect(this), {
12695
+ mapper: mapper
12696
+ });
12697
+ }
12698
+ });
12699
+
12700
+
12382
12701
  /***/ }),
12383
12702
 
12384
12703
  /***/ 1726:
@@ -14320,6 +14639,20 @@ function lisp(hljs) {
14320
14639
  module.exports = lisp;
14321
14640
 
14322
14641
 
14642
+ /***/ }),
14643
+
14644
+ /***/ 2529:
14645
+ /***/ (function(module) {
14646
+
14647
+ "use strict";
14648
+
14649
+ // `CreateIterResultObject` abstract operation
14650
+ // https://tc39.es/ecma262/#sec-createiterresultobject
14651
+ module.exports = function (value, done) {
14652
+ return { value: value, done: done };
14653
+ };
14654
+
14655
+
14323
14656
  /***/ }),
14324
14657
 
14325
14658
  /***/ 2546:
@@ -14830,6 +15163,21 @@ var POLYFILL = isForced.POLYFILL = 'P';
14830
15163
  module.exports = isForced;
14831
15164
 
14832
15165
 
15166
+ /***/ }),
15167
+
15168
+ /***/ 2812:
15169
+ /***/ (function(module) {
15170
+
15171
+ "use strict";
15172
+
15173
+ var $TypeError = TypeError;
15174
+
15175
+ module.exports = function (passed, required) {
15176
+ if (passed < required) throw new $TypeError('Not enough arguments');
15177
+ return passed;
15178
+ };
15179
+
15180
+
14833
15181
  /***/ }),
14834
15182
 
14835
15183
  /***/ 2838:
@@ -17100,7 +17448,7 @@ hljs.registerLanguage('vbnet', __webpack_require__(8928));
17100
17448
  hljs.registerLanguage('vbscript', __webpack_require__(1200));
17101
17449
  hljs.registerLanguage('vbscript-html', __webpack_require__(164));
17102
17450
  hljs.registerLanguage('verilog', __webpack_require__(8249));
17103
- hljs.registerLanguage('vhdl', __webpack_require__(8721));
17451
+ hljs.registerLanguage('vhdl', __webpack_require__(1102));
17104
17452
  hljs.registerLanguage('vim', __webpack_require__(8907));
17105
17453
  hljs.registerLanguage('wasm', __webpack_require__(9351));
17106
17454
  hljs.registerLanguage('wren', __webpack_require__(5069));
@@ -20877,6 +21225,63 @@ module.exports =
20877
21225
  (function () { return this; })() || Function('return this')();
20878
21226
 
20879
21227
 
21228
+ /***/ }),
21229
+
21230
+ /***/ 4603:
21231
+ /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
21232
+
21233
+ "use strict";
21234
+
21235
+ var defineBuiltIn = __webpack_require__(6840);
21236
+ var uncurryThis = __webpack_require__(9504);
21237
+ var toString = __webpack_require__(655);
21238
+ var validateArgumentsLength = __webpack_require__(2812);
21239
+
21240
+ var $URLSearchParams = URLSearchParams;
21241
+ var URLSearchParamsPrototype = $URLSearchParams.prototype;
21242
+ var append = uncurryThis(URLSearchParamsPrototype.append);
21243
+ var $delete = uncurryThis(URLSearchParamsPrototype['delete']);
21244
+ var forEach = uncurryThis(URLSearchParamsPrototype.forEach);
21245
+ var push = uncurryThis([].push);
21246
+ var params = new $URLSearchParams('a=1&a=2&b=3');
21247
+
21248
+ params['delete']('a', 1);
21249
+ // `undefined` case is a Chromium 117 bug
21250
+ // https://bugs.chromium.org/p/v8/issues/detail?id=14222
21251
+ params['delete']('b', undefined);
21252
+
21253
+ if (params + '' !== 'a=2') {
21254
+ defineBuiltIn(URLSearchParamsPrototype, 'delete', function (name /* , value */) {
21255
+ var length = arguments.length;
21256
+ var $value = length < 2 ? undefined : arguments[1];
21257
+ if (length && $value === undefined) return $delete(this, name);
21258
+ var entries = [];
21259
+ forEach(this, function (v, k) { // also validates `this`
21260
+ push(entries, { key: k, value: v });
21261
+ });
21262
+ validateArgumentsLength(length, 1);
21263
+ var key = toString(name);
21264
+ var value = toString($value);
21265
+ var index = 0;
21266
+ var dindex = 0;
21267
+ var found = false;
21268
+ var entriesLength = entries.length;
21269
+ var entry;
21270
+ while (index < entriesLength) {
21271
+ entry = entries[index++];
21272
+ if (found || entry.key === key) {
21273
+ found = true;
21274
+ $delete(this, entry.key);
21275
+ } else dindex++;
21276
+ }
21277
+ while (dindex < entriesLength) {
21278
+ entry = entries[dindex++];
21279
+ if (!(entry.key === key && entry.value === value)) append(this, entry.key, entry.value);
21280
+ }
21281
+ }, { enumerable: true, unsafe: true });
21282
+ }
21283
+
21284
+
20880
21285
  /***/ }),
20881
21286
 
20882
21287
  /***/ 4644:
@@ -31535,6 +31940,41 @@ module.exports = scheme;
31535
31940
  module.exports = {};
31536
31941
 
31537
31942
 
31943
+ /***/ }),
31944
+
31945
+ /***/ 6279:
31946
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
31947
+
31948
+ "use strict";
31949
+
31950
+ var defineBuiltIn = __webpack_require__(6840);
31951
+
31952
+ module.exports = function (target, src, options) {
31953
+ for (var key in src) defineBuiltIn(target, key, src[key], options);
31954
+ return target;
31955
+ };
31956
+
31957
+
31958
+ /***/ }),
31959
+
31960
+ /***/ 6319:
31961
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
31962
+
31963
+ "use strict";
31964
+
31965
+ var anObject = __webpack_require__(8551);
31966
+ var iteratorClose = __webpack_require__(9539);
31967
+
31968
+ // call something on iterator step with safe closing on error
31969
+ module.exports = function (iterator, fn, value, ENTRIES) {
31970
+ try {
31971
+ return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
31972
+ } catch (error) {
31973
+ iteratorClose(iterator, 'throw', error);
31974
+ }
31975
+ };
31976
+
31977
+
31538
31978
  /***/ }),
31539
31979
 
31540
31980
  /***/ 6325:
@@ -46943,6 +47383,42 @@ function x86asm(hljs) {
46943
47383
  module.exports = x86asm;
46944
47384
 
46945
47385
 
47386
+ /***/ }),
47387
+
47388
+ /***/ 7566:
47389
+ /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
47390
+
47391
+ "use strict";
47392
+
47393
+ var defineBuiltIn = __webpack_require__(6840);
47394
+ var uncurryThis = __webpack_require__(9504);
47395
+ var toString = __webpack_require__(655);
47396
+ var validateArgumentsLength = __webpack_require__(2812);
47397
+
47398
+ var $URLSearchParams = URLSearchParams;
47399
+ var URLSearchParamsPrototype = $URLSearchParams.prototype;
47400
+ var getAll = uncurryThis(URLSearchParamsPrototype.getAll);
47401
+ var $has = uncurryThis(URLSearchParamsPrototype.has);
47402
+ var params = new $URLSearchParams('a=1');
47403
+
47404
+ // `undefined` case is a Chromium 117 bug
47405
+ // https://bugs.chromium.org/p/v8/issues/detail?id=14222
47406
+ if (params.has('a', 2) || !params.has('a', undefined)) {
47407
+ defineBuiltIn(URLSearchParamsPrototype, 'has', function has(name /* , value */) {
47408
+ var length = arguments.length;
47409
+ var $value = length < 2 ? undefined : arguments[1];
47410
+ if (length && $value === undefined) return $has(this, name);
47411
+ var values = getAll(this, name); // also validates `this`
47412
+ validateArgumentsLength(length, 1);
47413
+ var value = toString($value);
47414
+ var index = 0;
47415
+ while (index < values.length) {
47416
+ if (values[index++] === value) return true;
47417
+ } return false;
47418
+ }, { enumerable: true, unsafe: true });
47419
+ }
47420
+
47421
+
46946
47422
  /***/ }),
46947
47423
 
46948
47424
  /***/ 7572:
@@ -59264,225 +59740,31 @@ module.exports = DESCRIPTORS && fails(function () {
59264
59740
  /***/ }),
59265
59741
 
59266
59742
  /***/ 8721:
59267
- /***/ (function(module) {
59268
-
59269
- /*
59270
- Language: VHDL
59271
- Author: Igor Kalnitsky <igor@kalnitsky.org>
59272
- Contributors: Daniel C.K. Kho <daniel.kho@tauhop.com>, Guillaume Savaton <guillaume.savaton@eseo.fr>
59273
- Description: VHDL is a hardware description language used in electronic design automation to describe digital and mixed-signal systems.
59274
- Website: https://en.wikipedia.org/wiki/VHDL
59275
- Category: hardware
59276
- */
59277
-
59278
- function vhdl(hljs) {
59279
- // Regular expression for VHDL numeric literals.
59280
-
59281
- // Decimal literal:
59282
- const INTEGER_RE = '\\d(_|\\d)*';
59283
- const EXPONENT_RE = '[eE][-+]?' + INTEGER_RE;
59284
- const DECIMAL_LITERAL_RE = INTEGER_RE + '(\\.' + INTEGER_RE + ')?' + '(' + EXPONENT_RE + ')?';
59285
- // Based literal:
59286
- const BASED_INTEGER_RE = '\\w+';
59287
- const BASED_LITERAL_RE = INTEGER_RE + '#' + BASED_INTEGER_RE + '(\\.' + BASED_INTEGER_RE + ')?' + '#' + '(' + EXPONENT_RE + ')?';
59743
+ /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
59288
59744
 
59289
- const NUMBER_RE = '\\b(' + BASED_LITERAL_RE + '|' + DECIMAL_LITERAL_RE + ')';
59745
+ "use strict";
59290
59746
 
59291
- const KEYWORDS = [
59292
- "abs",
59293
- "access",
59294
- "after",
59295
- "alias",
59296
- "all",
59297
- "and",
59298
- "architecture",
59299
- "array",
59300
- "assert",
59301
- "assume",
59302
- "assume_guarantee",
59303
- "attribute",
59304
- "begin",
59305
- "block",
59306
- "body",
59307
- "buffer",
59308
- "bus",
59309
- "case",
59310
- "component",
59311
- "configuration",
59312
- "constant",
59313
- "context",
59314
- "cover",
59315
- "disconnect",
59316
- "downto",
59317
- "default",
59318
- "else",
59319
- "elsif",
59320
- "end",
59321
- "entity",
59322
- "exit",
59323
- "fairness",
59324
- "file",
59325
- "for",
59326
- "force",
59327
- "function",
59328
- "generate",
59329
- "generic",
59330
- "group",
59331
- "guarded",
59332
- "if",
59333
- "impure",
59334
- "in",
59335
- "inertial",
59336
- "inout",
59337
- "is",
59338
- "label",
59339
- "library",
59340
- "linkage",
59341
- "literal",
59342
- "loop",
59343
- "map",
59344
- "mod",
59345
- "nand",
59346
- "new",
59347
- "next",
59348
- "nor",
59349
- "not",
59350
- "null",
59351
- "of",
59352
- "on",
59353
- "open",
59354
- "or",
59355
- "others",
59356
- "out",
59357
- "package",
59358
- "parameter",
59359
- "port",
59360
- "postponed",
59361
- "procedure",
59362
- "process",
59363
- "property",
59364
- "protected",
59365
- "pure",
59366
- "range",
59367
- "record",
59368
- "register",
59369
- "reject",
59370
- "release",
59371
- "rem",
59372
- "report",
59373
- "restrict",
59374
- "restrict_guarantee",
59375
- "return",
59376
- "rol",
59377
- "ror",
59378
- "select",
59379
- "sequence",
59380
- "severity",
59381
- "shared",
59382
- "signal",
59383
- "sla",
59384
- "sll",
59385
- "sra",
59386
- "srl",
59387
- "strong",
59388
- "subtype",
59389
- "then",
59390
- "to",
59391
- "transport",
59392
- "type",
59393
- "unaffected",
59394
- "units",
59395
- "until",
59396
- "use",
59397
- "variable",
59398
- "view",
59399
- "vmode",
59400
- "vprop",
59401
- "vunit",
59402
- "wait",
59403
- "when",
59404
- "while",
59405
- "with",
59406
- "xnor",
59407
- "xor"
59408
- ];
59409
- const BUILT_INS = [
59410
- "boolean",
59411
- "bit",
59412
- "character",
59413
- "integer",
59414
- "time",
59415
- "delay_length",
59416
- "natural",
59417
- "positive",
59418
- "string",
59419
- "bit_vector",
59420
- "file_open_kind",
59421
- "file_open_status",
59422
- "std_logic",
59423
- "std_logic_vector",
59424
- "unsigned",
59425
- "signed",
59426
- "boolean_vector",
59427
- "integer_vector",
59428
- "std_ulogic",
59429
- "std_ulogic_vector",
59430
- "unresolved_unsigned",
59431
- "u_unsigned",
59432
- "unresolved_signed",
59433
- "u_signed",
59434
- "real_vector",
59435
- "time_vector"
59436
- ];
59437
- const LITERALS = [
59438
- // severity_level
59439
- "false",
59440
- "true",
59441
- "note",
59442
- "warning",
59443
- "error",
59444
- "failure",
59445
- // textio
59446
- "line",
59447
- "text",
59448
- "side",
59449
- "width"
59450
- ];
59747
+ var DESCRIPTORS = __webpack_require__(3724);
59748
+ var uncurryThis = __webpack_require__(9504);
59749
+ var defineBuiltInAccessor = __webpack_require__(2106);
59451
59750
 
59452
- return {
59453
- name: 'VHDL',
59454
- case_insensitive: true,
59455
- keywords: {
59456
- keyword: KEYWORDS,
59457
- built_in: BUILT_INS,
59458
- literal: LITERALS
59751
+ var URLSearchParamsPrototype = URLSearchParams.prototype;
59752
+ var forEach = uncurryThis(URLSearchParamsPrototype.forEach);
59753
+
59754
+ // `URLSearchParams.prototype.size` getter
59755
+ // https://github.com/whatwg/url/pull/734
59756
+ if (DESCRIPTORS && !('size' in URLSearchParamsPrototype)) {
59757
+ defineBuiltInAccessor(URLSearchParamsPrototype, 'size', {
59758
+ get: function size() {
59759
+ var count = 0;
59760
+ forEach(this, function () { count++; });
59761
+ return count;
59459
59762
  },
59460
- illegal: /\{/,
59461
- contains: [
59462
- hljs.C_BLOCK_COMMENT_MODE, // VHDL-2008 block commenting.
59463
- hljs.COMMENT('--', '$'),
59464
- hljs.QUOTE_STRING_MODE,
59465
- {
59466
- className: 'number',
59467
- begin: NUMBER_RE,
59468
- relevance: 0
59469
- },
59470
- {
59471
- className: 'string',
59472
- begin: '\'(U|X|0|1|Z|W|L|H|-)\'',
59473
- contains: [ hljs.BACKSLASH_ESCAPE ]
59474
- },
59475
- {
59476
- className: 'symbol',
59477
- begin: '\'[A-Za-z](_?[A-Za-z0-9])*',
59478
- contains: [ hljs.BACKSLASH_ESCAPE ]
59479
- }
59480
- ]
59481
- };
59763
+ configurable: true,
59764
+ enumerable: true
59765
+ });
59482
59766
  }
59483
59767
 
59484
- module.exports = vhdl;
59485
-
59486
59768
 
59487
59769
  /***/ }),
59488
59770
 
@@ -63301,6 +63583,100 @@ function vala(hljs) {
63301
63583
  module.exports = vala;
63302
63584
 
63303
63585
 
63586
+ /***/ }),
63587
+
63588
+ /***/ 9462:
63589
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
63590
+
63591
+ "use strict";
63592
+
63593
+ var call = __webpack_require__(9565);
63594
+ var create = __webpack_require__(2360);
63595
+ var createNonEnumerableProperty = __webpack_require__(6699);
63596
+ var defineBuiltIns = __webpack_require__(6279);
63597
+ var wellKnownSymbol = __webpack_require__(8227);
63598
+ var InternalStateModule = __webpack_require__(1181);
63599
+ var getMethod = __webpack_require__(5966);
63600
+ var IteratorPrototype = (__webpack_require__(7657).IteratorPrototype);
63601
+ var createIterResultObject = __webpack_require__(2529);
63602
+ var iteratorClose = __webpack_require__(9539);
63603
+ var iteratorCloseAll = __webpack_require__(1385);
63604
+
63605
+ var TO_STRING_TAG = wellKnownSymbol('toStringTag');
63606
+ var ITERATOR_HELPER = 'IteratorHelper';
63607
+ var WRAP_FOR_VALID_ITERATOR = 'WrapForValidIterator';
63608
+ var NORMAL = 'normal';
63609
+ var THROW = 'throw';
63610
+ var setInternalState = InternalStateModule.set;
63611
+
63612
+ var createIteratorProxyPrototype = function (IS_ITERATOR) {
63613
+ var getInternalState = InternalStateModule.getterFor(IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER);
63614
+
63615
+ return defineBuiltIns(create(IteratorPrototype), {
63616
+ next: function next() {
63617
+ var state = getInternalState(this);
63618
+ // for simplification:
63619
+ // for `%WrapForValidIteratorPrototype%.next` or with `state.returnHandlerResult` our `nextHandler` returns `IterResultObject`
63620
+ // for `%IteratorHelperPrototype%.next` - just a value
63621
+ if (IS_ITERATOR) return state.nextHandler();
63622
+ if (state.done) return createIterResultObject(undefined, true);
63623
+ try {
63624
+ var result = state.nextHandler();
63625
+ return state.returnHandlerResult ? result : createIterResultObject(result, state.done);
63626
+ } catch (error) {
63627
+ state.done = true;
63628
+ throw error;
63629
+ }
63630
+ },
63631
+ 'return': function () {
63632
+ var state = getInternalState(this);
63633
+ var iterator = state.iterator;
63634
+ state.done = true;
63635
+ if (IS_ITERATOR) {
63636
+ var returnMethod = getMethod(iterator, 'return');
63637
+ return returnMethod ? call(returnMethod, iterator) : createIterResultObject(undefined, true);
63638
+ }
63639
+ if (state.inner) try {
63640
+ iteratorClose(state.inner.iterator, NORMAL);
63641
+ } catch (error) {
63642
+ return iteratorClose(iterator, THROW, error);
63643
+ }
63644
+ if (state.openIters) try {
63645
+ iteratorCloseAll(state.openIters, NORMAL);
63646
+ } catch (error) {
63647
+ return iteratorClose(iterator, THROW, error);
63648
+ }
63649
+ if (iterator) iteratorClose(iterator, NORMAL);
63650
+ return createIterResultObject(undefined, true);
63651
+ }
63652
+ });
63653
+ };
63654
+
63655
+ var WrapForValidIteratorPrototype = createIteratorProxyPrototype(true);
63656
+ var IteratorHelperPrototype = createIteratorProxyPrototype(false);
63657
+
63658
+ createNonEnumerableProperty(IteratorHelperPrototype, TO_STRING_TAG, 'Iterator Helper');
63659
+
63660
+ module.exports = function (nextHandler, IS_ITERATOR, RETURN_HANDLER_RESULT) {
63661
+ var IteratorProxy = function Iterator(record, state) {
63662
+ if (state) {
63663
+ state.iterator = record.iterator;
63664
+ state.next = record.next;
63665
+ } else state = record;
63666
+ state.type = IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER;
63667
+ state.returnHandlerResult = !!RETURN_HANDLER_RESULT;
63668
+ state.nextHandler = nextHandler;
63669
+ state.counter = 0;
63670
+ state.done = false;
63671
+ setInternalState(this, state);
63672
+ };
63673
+
63674
+ IteratorProxy.prototype = IS_ITERATOR ? WrapForValidIteratorPrototype : IteratorHelperPrototype;
63675
+
63676
+ return IteratorProxy;
63677
+ };
63678
+
63679
+
63304
63680
  /***/ }),
63305
63681
 
63306
63682
  /***/ 9504:
@@ -66464,8 +66840,8 @@ var ChatWindowHeader_component = normalizeComponent(
66464
66840
  )
66465
66841
 
66466
66842
  /* harmony default export */ var ChatWindowHeader = (ChatWindowHeader_component.exports);
66467
- ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.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
66468
- var ChatMessageListvue_type_template_id_1963170c_scoped_true_render = function render() {
66843
+ ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.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
66844
+ var ChatMessageListvue_type_template_id_74195154_scoped_true_render = function render() {
66469
66845
  var _vm = this,
66470
66846
  _c = _vm._self._c;
66471
66847
  return _c('div', {
@@ -66485,17 +66861,14 @@ var ChatMessageListvue_type_template_id_1963170c_scoped_true_render = function r
66485
66861
  attrs: {
66486
66862
  "message": message,
66487
66863
  "think-status": _vm.thinkStatus
66488
- },
66489
- on: {
66490
- "thinking-toggle": function ($event) {
66491
- return _vm.handleThinkingToggle(message);
66492
- }
66493
66864
  }
66494
66865
  })], 1);
66495
66866
  })], 2);
66496
66867
  };
66497
- var ChatMessageListvue_type_template_id_1963170c_scoped_true_staticRenderFns = [];
66868
+ var ChatMessageListvue_type_template_id_74195154_scoped_true_staticRenderFns = [];
66498
66869
 
66870
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.map.js
66871
+ var es_iterator_map = __webpack_require__(1701);
66499
66872
  ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.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
66500
66873
  var UserMessagevue_type_template_id_6a2b6167_scoped_true_render = function render() {
66501
66874
  var _vm = this,
@@ -66546,8 +66919,8 @@ var UserMessage_component = normalizeComponent(
66546
66919
  )
66547
66920
 
66548
66921
  /* harmony default export */ var UserMessage = (UserMessage_component.exports);
66549
- ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.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
66550
- var AiMessagevue_type_template_id_76c8c993_scoped_true_render = function render() {
66922
+ ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.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
66923
+ var AiMessagevue_type_template_id_59354fe3_scoped_true_render = function render() {
66551
66924
  var _vm = this,
66552
66925
  _c = _vm._self._c;
66553
66926
  return _c('div', {
@@ -66567,21 +66940,24 @@ var AiMessagevue_type_template_id_76c8c993_scoped_true_render = function render(
66567
66940
  key: item.id,
66568
66941
  staticClass: "ai-message-item"
66569
66942
  }, [item.type === 'thinking' ? _c('div', {
66570
- staticClass: "ai-thinking",
66943
+ staticClass: "ai-thinking"
66944
+ }, [_c('div', {
66945
+ staticClass: "ai-thinking-time",
66946
+ class: {
66947
+ 'thinking-expanded': !item.thinkingExpanded
66948
+ },
66571
66949
  on: {
66572
66950
  "click": function ($event) {
66573
- return _vm.$emit('thinking-toggle');
66951
+ return _vm.handleThinkingToggle(item);
66574
66952
  }
66575
66953
  }
66576
- }, [_c('div', {
66577
- staticClass: "ai-thinking-time"
66578
- }, [_vm._v(" " + _vm._s(item.duration ? `思考用时 ${item.duration} 秒` : '思考中...') + " ")]), _vm.thinkingExpanded ? _c('div', {
66954
+ }, [_vm._v(" " + _vm._s(item.duration ? `思考用时 ${item.duration} 秒` : '思考中...') + " ")]), item.thinkingExpanded ? _c('div', {
66579
66955
  staticClass: "ai-thinking-content"
66580
66956
  }, [_vm._v(" " + _vm._s(item.content) + " ")]) : _vm._e()]) : item.type === 'tool_call' ? _c('div', {
66581
66957
  staticClass: "ai-tool-call"
66582
66958
  }, [_c('div', {
66583
66959
  staticClass: "tool-title"
66584
- }, [_vm._v("🔧 " + _vm._s(item.content) + _vm._s(item.name))])]) : item.type === 'tool_result' ? _c('div', {
66960
+ }, [_vm._v("🔧 " + _vm._s(item.name))])]) : item.type === 'tool_result' ? _c('div', {
66585
66961
  staticClass: "ai-tool-result"
66586
66962
  }, [_c('div', {
66587
66963
  staticClass: "tool-title"
@@ -66593,8 +66969,14 @@ var AiMessagevue_type_template_id_76c8c993_scoped_true_render = function render(
66593
66969
  }) : _vm._e()]);
66594
66970
  })], 2)]);
66595
66971
  };
66596
- var AiMessagevue_type_template_id_76c8c993_scoped_true_staticRenderFns = [];
66597
-
66972
+ var AiMessagevue_type_template_id_59354fe3_scoped_true_staticRenderFns = [];
66973
+
66974
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.delete.js
66975
+ var web_url_search_params_delete = __webpack_require__(4603);
66976
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.has.js
66977
+ var web_url_search_params_has = __webpack_require__(7566);
66978
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.size.js
66979
+ var web_url_search_params_size = __webpack_require__(8721);
66598
66980
  ;// ./node_modules/marked/lib/marked.esm.js
66599
66981
  /**
66600
66982
  * marked v15.0.12 - a markdown parser
@@ -68782,8 +69164,33 @@ var lib = __webpack_require__(3223);
68782
69164
 
68783
69165
 
68784
69166
 
69167
+
69168
+
69169
+
69170
+
69171
+ // 创建自定义渲染器
69172
+ const renderer = new marked.Renderer();
69173
+
69174
+ // 自定义链接渲染
69175
+ renderer.link = function ({
69176
+ href,
69177
+ text
69178
+ }) {
69179
+ let dataPath = '';
69180
+ const url = new URL(href, window.location.origin);
69181
+ const pathname = url.pathname;
69182
+ const search = url.search;
69183
+ if (pathname.startsWith('/portal/')) {
69184
+ dataPath = pathname.substring('/portal'.length) + search;
69185
+ return `<a href="javascript:void(0)" data-path="${dataPath}" data-text="${text}">${text}</a>`;
69186
+ } else {
69187
+ dataPath = href;
69188
+ return `<a href="${dataPath}" target="_blank">${text}</a>`;
69189
+ }
69190
+ };
68785
69191
  marked.setOptions({
68786
- highlight(code, lang) {
69192
+ renderer: renderer,
69193
+ highlight: function (code, lang) {
68787
69194
  if (lang && es.getLanguage(lang)) {
68788
69195
  return es.highlight(code, {
68789
69196
  language: lang
@@ -68807,15 +69214,18 @@ marked.setOptions({
68807
69214
  methods: {
68808
69215
  renderMarkdown(text) {
68809
69216
  return marked.parse(text || '');
69217
+ },
69218
+ handleThinkingToggle(item) {
69219
+ this.$set(item, 'thinkingExpanded', !item.thinkingExpanded);
68810
69220
  }
68811
69221
  }
68812
69222
  });
68813
69223
  ;// ./components/AiMessage.vue?vue&type=script&lang=js
68814
69224
  /* harmony default export */ var components_AiMessagevue_type_script_lang_js = (AiMessagevue_type_script_lang_js);
68815
- ;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-12.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.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
69225
+ ;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-12.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.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
68816
69226
  // extracted by mini-css-extract-plugin
68817
69227
 
68818
- ;// ./components/AiMessage.vue?vue&type=style&index=0&id=76c8c993&prod&scoped=true&lang=css
69228
+ ;// ./components/AiMessage.vue?vue&type=style&index=0&id=59354fe3&prod&scoped=true&lang=css
68819
69229
 
68820
69230
  ;// ./components/AiMessage.vue
68821
69231
 
@@ -68828,11 +69238,11 @@ marked.setOptions({
68828
69238
 
68829
69239
  var AiMessage_component = normalizeComponent(
68830
69240
  components_AiMessagevue_type_script_lang_js,
68831
- AiMessagevue_type_template_id_76c8c993_scoped_true_render,
68832
- AiMessagevue_type_template_id_76c8c993_scoped_true_staticRenderFns,
69241
+ AiMessagevue_type_template_id_59354fe3_scoped_true_render,
69242
+ AiMessagevue_type_template_id_59354fe3_scoped_true_staticRenderFns,
68833
69243
  false,
68834
69244
  null,
68835
- "76c8c993",
69245
+ "59354fe3",
68836
69246
  null
68837
69247
 
68838
69248
  )
@@ -68841,6 +69251,8 @@ var AiMessage_component = normalizeComponent(
68841
69251
  ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/ChatMessageList.vue?vue&type=script&lang=js
68842
69252
 
68843
69253
 
69254
+
69255
+
68844
69256
  /* harmony default export */ var ChatMessageListvue_type_script_lang_js = ({
68845
69257
  components: {
68846
69258
  UserMessage: UserMessage,
@@ -68853,12 +69265,16 @@ var AiMessage_component = normalizeComponent(
68853
69265
  computed: {
68854
69266
  lastMessageObject() {
68855
69267
  return this.messages[this.messages.length - 1] || null;
69268
+ },
69269
+ timelineContents() {
69270
+ if (!this.lastMessageObject || !this.lastMessageObject.timeline) {
69271
+ return '';
69272
+ }
69273
+ // 将所有 content 拼接成一个字符串用于监听变化
69274
+ return this.lastMessageObject.timeline.map(item => item.content || '').join('');
68856
69275
  }
68857
69276
  },
68858
69277
  methods: {
68859
- handleThinkingToggle(message) {
68860
- this.$set(message, 'thinkingExpanded', !message.thinkingExpanded);
68861
- },
68862
69278
  scrollToBottom() {
68863
69279
  this.$nextTick(() => {
68864
69280
  const el = this.$refs.chatArea;
@@ -68867,7 +69283,7 @@ var AiMessage_component = normalizeComponent(
68867
69283
  }
68868
69284
  },
68869
69285
  watch: {
68870
- lastMessageObject: {
69286
+ timelineContents: {
68871
69287
  handler() {
68872
69288
  this.scrollToBottom();
68873
69289
  },
@@ -68878,10 +69294,10 @@ var AiMessage_component = normalizeComponent(
68878
69294
  });
68879
69295
  ;// ./components/ChatMessageList.vue?vue&type=script&lang=js
68880
69296
  /* harmony default export */ var components_ChatMessageListvue_type_script_lang_js = (ChatMessageListvue_type_script_lang_js);
68881
- ;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-12.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.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
69297
+ ;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-12.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.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
68882
69298
  // extracted by mini-css-extract-plugin
68883
69299
 
68884
- ;// ./components/ChatMessageList.vue?vue&type=style&index=0&id=1963170c&prod&scoped=true&lang=css
69300
+ ;// ./components/ChatMessageList.vue?vue&type=style&index=0&id=74195154&prod&scoped=true&lang=css
68885
69301
 
68886
69302
  ;// ./components/ChatMessageList.vue
68887
69303
 
@@ -68894,11 +69310,11 @@ var AiMessage_component = normalizeComponent(
68894
69310
 
68895
69311
  var ChatMessageList_component = normalizeComponent(
68896
69312
  components_ChatMessageListvue_type_script_lang_js,
68897
- ChatMessageListvue_type_template_id_1963170c_scoped_true_render,
68898
- ChatMessageListvue_type_template_id_1963170c_scoped_true_staticRenderFns,
69313
+ ChatMessageListvue_type_template_id_74195154_scoped_true_render,
69314
+ ChatMessageListvue_type_template_id_74195154_scoped_true_staticRenderFns,
68899
69315
  false,
68900
69316
  null,
68901
- "1963170c",
69317
+ "74195154",
68902
69318
  null
68903
69319
 
68904
69320
  )
@@ -69343,6 +69759,8 @@ const TIME_JUMP_POINTS_URL = '/minio/lingxiaoai/timeJumpPoints.json'; // 语音u
69343
69759
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.json.stringify.js
69344
69760
  var es_json_stringify = __webpack_require__(3110);
69345
69761
  ;// ./components/utils/StreamParser.js
69762
+
69763
+
69346
69764
  class StreamParser {
69347
69765
  constructor(options = {}) {
69348
69766
  this.options = {
@@ -69398,36 +69816,63 @@ class StreamParser {
69398
69816
  }
69399
69817
  this.scheduleFlush(emit);
69400
69818
  }
69819
+ parseTag(tag) {
69820
+ const isClosing = tag.startsWith('</');
69821
+ const content = tag.replace(/^<\/?|>$/g, '').trim();
69822
+ const [tagName, ...attrParts] = content.split(/\s+/);
69823
+ const attrs = {};
69824
+ attrParts.forEach(part => {
69825
+ const [key, rawValue] = part.split('=');
69826
+ if (!key || !rawValue) return;
69827
+ attrs[key] = rawValue.replace(/^['"]|['"]$/g, '');
69828
+ });
69829
+ return {
69830
+ tag: tagName.replace('/', ''),
69831
+ attrs,
69832
+ isClosing
69833
+ };
69834
+ }
69401
69835
  handleTag(tag, emit) {
69402
- const t = tag.toLowerCase().trim();
69403
- if (t.startsWith('<think')) {
69404
- this.startThinking(emit);
69405
- } else if (t.startsWith('</think')) {
69406
- this.closeThinking();
69407
- this.currentType = 'content';
69408
- this.currentEvent = null;
69409
- } else if (t.startsWith('<tool_call')) {
69410
- const attrs = this.parseTagAttributes(tag);
69411
- this.switchType('tool_call', emit, attrs.name);
69412
- } else if (t.startsWith('</tool_call')) {
69413
- this.switchType('content', emit);
69414
- } else if (t.startsWith('<tool_result')) {
69415
- this.switchType('tool_result', emit);
69416
- } else if (t.startsWith('</tool_result')) {
69417
- this.switchType('content', emit);
69836
+ const {
69837
+ tag: tagName,
69838
+ attrs,
69839
+ isClosing
69840
+ } = this.parseTag(tag.toLowerCase());
69841
+ if (tagName === 'think') {
69842
+ if (!isClosing) {
69843
+ this.startThinking(attrs, emit);
69844
+ } else {
69845
+ this.closeThinking();
69846
+ this.currentType = 'content';
69847
+ this.currentEvent = null;
69848
+ }
69849
+ } else if (tagName === 'tool_call') {
69850
+ if (!isClosing) {
69851
+ this.switchType('tool_call', emit, attrs);
69852
+ } else {
69853
+ this.switchType('content', emit);
69854
+ }
69855
+ } else if (tagName === 'tool_result') {
69856
+ if (!isClosing) {
69857
+ this.switchType('tool_result', emit, attrs);
69858
+ } else {
69859
+ this.switchType('content', emit);
69860
+ }
69418
69861
  } else {
69419
69862
  this.append(tag, emit);
69420
69863
  }
69421
69864
  }
69422
- startThinking(emit) {
69865
+ startThinking(attrs = {}, emit) {
69423
69866
  // 如果上一个 thinking 还没结算,先结算
69424
69867
  this.closeThinking();
69425
69868
  this.currentType = 'thinking';
69426
69869
  this.currentEvent = {
69427
69870
  id: this.uuid(),
69428
69871
  type: 'thinking',
69872
+ name: attrs.name || null,
69429
69873
  content: '',
69430
69874
  startTime: Date.now(),
69875
+ thinkingExpanded: true,
69431
69876
  endTime: null,
69432
69877
  duration: null
69433
69878
  };
@@ -69443,13 +69888,22 @@ class StreamParser {
69443
69888
  console.log(this.currentEvent.endTime - this.currentEvent.startTime);
69444
69889
  }
69445
69890
  }
69446
- switchType(type) {
69891
+ switchType(type, emit, attrs = {}) {
69447
69892
  // 如果是从 thinking 切走,结算时间
69448
69893
  if (this.currentEvent?.type === 'thinking') {
69449
69894
  this.closeThinking();
69450
69895
  }
69451
69896
  this.currentType = type;
69452
- this.currentEvent = null;
69897
+ this.currentEvent = {
69898
+ id: this.uuid(),
69899
+ type,
69900
+ name: attrs.name || null,
69901
+ content: ''
69902
+ };
69903
+ emit({
69904
+ type: 'create',
69905
+ event: this.currentEvent
69906
+ });
69453
69907
  }
69454
69908
  append(text, emit) {
69455
69909
  if (!text) return;
@@ -69470,15 +69924,6 @@ class StreamParser {
69470
69924
  event: this.currentEvent
69471
69925
  });
69472
69926
  }
69473
- parseTagAttributes(tag) {
69474
- const attrRegex = /(\w+)=['"]([^'"]+)['"]/g;
69475
- const attrs = {};
69476
- let match;
69477
- while ((match = attrRegex.exec(tag)) !== null) {
69478
- attrs[match[1]] = match[2];
69479
- }
69480
- return attrs;
69481
- }
69482
69927
  scheduleFlush(emit) {
69483
69928
  if (this.updateTimer) return;
69484
69929
  this.updateTimer = setTimeout(() => {
@@ -69519,23 +69964,26 @@ const getCookie = cname => {
69519
69964
  return '';
69520
69965
  };
69521
69966
 
69967
+ ;// ./components/utils/Uuid.js
69968
+ function generateUuid() {
69969
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
69970
+ var r = Math.random() * 16 | 0,
69971
+ v = c === 'x' ? r : r & 0x3 | 0x8;
69972
+ return v.toString(16);
69973
+ });
69974
+ }
69522
69975
  ;// ./components/mixins/messageMixin.js
69523
69976
 
69524
69977
 
69525
69978
 
69526
69979
 
69527
69980
 
69981
+
69528
69982
  /* harmony default export */ var messageMixin = ({
69529
69983
  data() {
69530
69984
  return {
69531
69985
  streamParser: null,
69532
- aiMessage: {
69533
- id: Date.now(),
69534
- type: 'ai',
69535
- timeline: [],
69536
- loading: true,
69537
- thinkingExpanded: true
69538
- }
69986
+ currentMessage: null
69539
69987
  };
69540
69988
  },
69541
69989
  created() {
@@ -69548,13 +69996,21 @@ const getCookie = cname => {
69548
69996
  },
69549
69997
  methods: {
69550
69998
  createAiMessage() {
69551
- this.messages.push(this.aiMessage);
69552
- this.currentMessage = this.aiMessage;
69553
- return this.aiMessage;
69999
+ const aiMessage = {
70000
+ id: generateUuid(),
70001
+ type: 'ai',
70002
+ sender: 'AI',
70003
+ timeline: [],
70004
+ loading: true,
70005
+ thinkingExpanded: true
70006
+ };
70007
+ this.messages.push(aiMessage);
70008
+ this.currentMessage = aiMessage;
70009
+ return aiMessage;
69554
70010
  },
69555
70011
  createUserMessage(content) {
69556
70012
  const message = {
69557
- id: this.messages.length + 1,
70013
+ id: generateUuid(),
69558
70014
  type: 'user',
69559
70015
  sender: '用户',
69560
70016
  time: '',
@@ -69599,7 +70055,6 @@ const getCookie = cname => {
69599
70055
 
69600
70056
  // 完成解析
69601
70057
  this.streamParser.finish(() => {});
69602
- this.aiMessage.loading = false;
69603
70058
 
69604
70059
  // 记录耗时
69605
70060
  const duration = Date.now() - startTime;
@@ -69612,7 +70067,6 @@ const getCookie = cname => {
69612
70067
  console.error('发送消息失败:', error);
69613
70068
  if (this.currentMessage) {
69614
70069
  this.currentMessage.content = '抱歉,发生了错误,请重试。';
69615
- this.$forceUpdate();
69616
70070
  }
69617
70071
  } finally {
69618
70072
  // 确保加载状态关闭
@@ -69641,9 +70095,9 @@ const getCookie = cname => {
69641
70095
  console.log('收到数据块:', chunk);
69642
70096
  // 使用解析器处理数据块,确保this指向正确
69643
70097
  this.streamParser.processChunk(chunk, e => {
69644
- console.log('处理数据块:', e);
70098
+ if (!this.currentMessage) return;
69645
70099
  if (e.type === 'create') {
69646
- this.aiMessage.timeline.push(e.event);
70100
+ this.currentMessage.timeline.push(e.event);
69647
70101
  }
69648
70102
  });
69649
70103
  }
@@ -69684,14 +70138,6 @@ const getCookie = cname => {
69684
70138
  },
69685
70139
  beforeDestroy() {}
69686
70140
  });
69687
- ;// ./components/utils/Uuid.js
69688
- function generateUuid() {
69689
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
69690
- var r = Math.random() * 16 | 0,
69691
- v = c === 'x' ? r : r & 0x3 | 0x8;
69692
- return v.toString(16);
69693
- });
69694
- }
69695
70141
  ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/ChatWindow.vue?vue&type=script&lang=js
69696
70142
 
69697
70143