soma-core 2.2.9 → 2.2.10
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/core/build/compiler/soma-precompile.js +6 -2
- package/core/client/engines/diff/code.ts +205 -0
- package/core/client/engines/diff/index.ts +27 -1
- package/core/client/engines/diff/port.ts +75 -0
- package/core/server/host/source-packages.cjs +3 -0
- package/core/shared/registry-generated/limits.ts +6 -2
- package/dist/browser/runtime-bundle.manifest.json +1 -0
- package/dist/browser/soma-runtime.js +1211 -963
- package/dist/core/index.cjs +1211 -963
- package/dist/host-native/aot-builder.cjs +346 -223
- package/dist/host-native/native-server.cjs +9 -2
- package/dist/lsp/component-tree.cjs +6 -2
- package/dist/types/client/engines/diff/code.d.ts +27 -0
- package/dist/types/client/engines/diff/index.d.ts +2 -1
- package/dist/types/client/engines/diff/port.d.ts +77 -0
- package/dist/types/server/host/source-packages.d.cts +5 -0
- package/dist/types/shared/registry-generated/limits.d.ts +4 -0
- package/host-native/src/aot-builder.ts +147 -91
- package/host-native/src/public-packages.cjs +147 -50
- package/package.json +1 -1
|
@@ -123423,726 +123423,6 @@ function assertDiffAdapter(adapter2) {
|
|
|
123423
123423
|
assertAdapterMethods("diff", adapter2, ["diff"]);
|
|
123424
123424
|
}
|
|
123425
123425
|
|
|
123426
|
-
// core/client/engines/diff/index.ts
|
|
123427
|
-
init_engine_error();
|
|
123428
|
-
|
|
123429
|
-
// core/shared/registry-generated/limits.ts
|
|
123430
|
-
var SOMA_PIPELINE_LIMITS = {
|
|
123431
|
-
"id": "limits",
|
|
123432
|
-
"title": "\u7BA1\u7EBF\u9650\u503C\u8868\uFF1A\u4F53\u79EF\u9884\u7B97\u3001\u6570\u636E\u89C4\u6A21\u4E0A\u9650\u3001data-kit \u7684\u7B5B\u9009\u9632\u6296\u4E0E\u6811\u89C6\u56FE\u9884\u7B97\uFF08dataKit\uFF1B\u89C4\u5219\u6811\u5D4C\u5957\u6DF1\u5EA6\u8BFB window.maxFilterDepth\uFF0C\u4E0E\u6570\u636E\u7A97\u53E3\u58F0\u660E\u671F\u95F8\u95E8\u540C\u4E00\u53E3\u5F84\uFF09\u3001\u5404\u5448\u73B0\u65CF\u7684\u9879\u6570\u4E0A\u9650\u3001\u5199\u5165\u9762\u5B88\u536B\u4E0E\u7EA6\u675F\u5E03\u5C40\u89C4\u6A21\u3001\u7F16\u8BD1\u6DF1\u5EA6\u3001\u89E3\u91CA\u8F93\u51FA\u3001\u6CE8\u518C\u4E2D\u5FC3\u4F53\u79EF\u3001\u7F13\u5B58\u5BB9\u91CF\u3001\u4E50\u89C2\u5E76\u53D1\u91CD\u8BD5\u8F6E\u6570\u3001\u5199\u9501\u65F6\u9650\u3001\u5199\u5165\u9650\u6D41\u9ED8\u8BA4\u3001session / subscribe / window.filter \u89E3\u6790\u4E0A\u9650\uFF08\u542B matches \u8C13\u8BCD\u7684\u6B63\u5219\u6A21\u5F0F / \u88AB\u6D4B\u6587\u672C\u957F\u5EA6\u4E0A\u9650\uFF0C\u6682\u5B9A\uFF0C\u5F85\u88C1\u51B3\uFF09\u3001\u8FD0\u884C\u671F\u9875\u9762\u6CE8\u5165\u53E3\u7684\u5355\u9875\u8F7D\u8377\u5B57\u8282\u4E0A\u9650\uFF08inject\uFF0C\u6682\u5B9A\uFF0C\u5F85\u88C1\u51B3\uFF09\u3001\u6267\u884C\u8BA1\u5212\uFF08execution plan\uFF09\u7684\u8282\u70B9 / \u4F9D\u8D56 / \u5E76\u53D1 / \u91CD\u8BD5 / \u8DEF\u5F84 / \u8F93\u5165\u6DF1\u5EA6\u4E0A\u9650\u3001embed \u8DEF\u5F84\u957F\u5EA6\u3001Host \u6CE8\u5165\u7F3A\u7701\uFF08hostDefaults\uFF1A\u6570\u636E\u7A97\u53E3 block \u7F3A\u7701\u3001\u5BBF\u4E3B\u6A21\u5757\u5206\u7247\u52A0\u8F7D\u91CD\u8BD5\u9000\u907F\u6B65\u957F\u4E0E HTTP \u8BF7\u6C42\u7F3A\u7701\u8D85\u65F6\uFF1BHTTP \u9ED8\u8BA4\u6807\u91CF\u7ECF foundation/values \u8F7B\u91CF\u6295\u5F71\u4F9B core \u4E0E kit \u5171\u7528\uFF09\u3001Server Mock \u7684\u751F\u6210\u53C2\u6570\uFF08mock\uFF09\u3001soma-ai \u7684\u5B57\u8282 / \u6761\u6570 / \u9650\u6D41 / \u4FDD\u7559\u4E0A\u9650\uFF08ai\uFF09\u3001soma-ai \u7684\u65F6\u5EF6 / \u91CD\u8BD5 / \u5E76\u53D1\u7F3A\u7701\uFF08aiRuntime\uFF09\uFF08web \u7F16\u8BD1\u7BA1\u7EBF / \u7EC4\u4EF6\u8FD0\u884C\u65F6\u7684\u4E0A\u9650\uFF0C\u4E0D\u662F\u8BBE\u8BA1\u8BED\u8A00\uFF09",
|
|
123433
|
-
"readBy": [
|
|
123434
|
-
{
|
|
123435
|
-
"module": "soma-ui",
|
|
123436
|
-
"file": "src/compiler/styling/theme/orchestrate/budget.ts",
|
|
123437
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123438
|
-
},
|
|
123439
|
-
{
|
|
123440
|
-
"module": "soma-ui",
|
|
123441
|
-
"file": "src/shared/data-scale.ts",
|
|
123442
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123443
|
-
},
|
|
123444
|
-
{
|
|
123445
|
-
"module": "soma-ui",
|
|
123446
|
-
"file": "src/compiler/need/families/browse-layout.ts",
|
|
123447
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123448
|
-
},
|
|
123449
|
-
{
|
|
123450
|
-
"module": "soma-ui",
|
|
123451
|
-
"file": "src/compiler/need/families/browse-dims.ts",
|
|
123452
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123453
|
-
},
|
|
123454
|
-
{
|
|
123455
|
-
"module": "soma-ui",
|
|
123456
|
-
"file": "src/compiler/need/families/browse-conditions.ts",
|
|
123457
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123458
|
-
},
|
|
123459
|
-
{
|
|
123460
|
-
"module": "soma-ui",
|
|
123461
|
-
"file": "src/compiler/need/families/compare.ts",
|
|
123462
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123463
|
-
},
|
|
123464
|
-
{
|
|
123465
|
-
"module": "soma-ui",
|
|
123466
|
-
"file": "src/compiler/need/families/monitor.ts",
|
|
123467
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123468
|
-
},
|
|
123469
|
-
{
|
|
123470
|
-
"module": "soma-ui",
|
|
123471
|
-
"file": "src/compiler/need/families/inspect-relation.ts",
|
|
123472
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123473
|
-
},
|
|
123474
|
-
{
|
|
123475
|
-
"module": "soma-ui",
|
|
123476
|
-
"file": "src/compiler/trace/trace.types.ts",
|
|
123477
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123478
|
-
},
|
|
123479
|
-
{
|
|
123480
|
-
"module": "soma-ui",
|
|
123481
|
-
"file": "src/units/compose-check.ts",
|
|
123482
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123483
|
-
},
|
|
123484
|
-
{
|
|
123485
|
-
"module": "soma-ui",
|
|
123486
|
-
"file": "src/shared/field-components.ts",
|
|
123487
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123488
|
-
},
|
|
123489
|
-
{
|
|
123490
|
-
"module": "soma-ui",
|
|
123491
|
-
"file": "src/data-kit/filter-model/filter.ts",
|
|
123492
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123493
|
-
},
|
|
123494
|
-
{
|
|
123495
|
-
"module": "soma-ui",
|
|
123496
|
-
"file": "src/data-kit/views/tree.ts",
|
|
123497
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123498
|
-
},
|
|
123499
|
-
{
|
|
123500
|
-
"module": "soma-ui",
|
|
123501
|
-
"file": "src/compiler/certify/certificate.ts",
|
|
123502
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123503
|
-
},
|
|
123504
|
-
{
|
|
123505
|
-
"module": "soma-ui",
|
|
123506
|
-
"file": "src/compiler/certify/explain-format.ts",
|
|
123507
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123508
|
-
},
|
|
123509
|
-
{
|
|
123510
|
-
"module": "soma-ui",
|
|
123511
|
-
"file": "src/compiler/context/compile-context.ts",
|
|
123512
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123513
|
-
},
|
|
123514
|
-
{
|
|
123515
|
-
"module": "soma-ui",
|
|
123516
|
-
"file": "src/compiler/driver/cache/region-cache.ts",
|
|
123517
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123518
|
-
},
|
|
123519
|
-
{
|
|
123520
|
-
"module": "soma-ui",
|
|
123521
|
-
"file": "src/compiler/compose/plan.ts",
|
|
123522
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123523
|
-
},
|
|
123524
|
-
{
|
|
123525
|
-
"module": "soma-ui",
|
|
123526
|
-
"file": "src/app/server.ts",
|
|
123527
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123528
|
-
},
|
|
123529
|
-
{
|
|
123530
|
-
"module": "soma-core",
|
|
123531
|
-
"file": "core/server/registry/api-registry-store.ts",
|
|
123532
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123533
|
-
},
|
|
123534
|
-
{
|
|
123535
|
-
"module": "soma-core",
|
|
123536
|
-
"file": "core/client/engines/diff/index.ts",
|
|
123537
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123538
|
-
},
|
|
123539
|
-
{
|
|
123540
|
-
"module": "soma-core",
|
|
123541
|
-
"file": "core/client/engines/highlight/index.ts",
|
|
123542
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123543
|
-
},
|
|
123544
|
-
{
|
|
123545
|
-
"module": "soma-core",
|
|
123546
|
-
"file": "core/server/registry/page-registry-store.ts",
|
|
123547
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123548
|
-
},
|
|
123549
|
-
{
|
|
123550
|
-
"module": "soma-core",
|
|
123551
|
-
"file": "core/server/registry/asset-store.ts",
|
|
123552
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123553
|
-
},
|
|
123554
|
-
{
|
|
123555
|
-
"module": "soma-core",
|
|
123556
|
-
"file": "core/server/registry/batch-stage.ts",
|
|
123557
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123558
|
-
},
|
|
123559
|
-
{
|
|
123560
|
-
"module": "soma-core",
|
|
123561
|
-
"file": "core/server/registry/request-body-limit.ts",
|
|
123562
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123563
|
-
},
|
|
123564
|
-
{
|
|
123565
|
-
"module": "soma-core",
|
|
123566
|
-
"file": "core/server/registry/registry-file-lock.ts",
|
|
123567
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123568
|
-
},
|
|
123569
|
-
{
|
|
123570
|
-
"module": "soma-core",
|
|
123571
|
-
"file": "core/server/api/paged-list.ts",
|
|
123572
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123573
|
-
},
|
|
123574
|
-
{
|
|
123575
|
-
"module": "soma-core",
|
|
123576
|
-
"file": "core/server/registry/registry-write-pipeline.ts",
|
|
123577
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123578
|
-
},
|
|
123579
|
-
{
|
|
123580
|
-
"module": "soma-core",
|
|
123581
|
-
"file": "core/server/registry/page-registry-repository.ts",
|
|
123582
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123583
|
-
},
|
|
123584
|
-
{
|
|
123585
|
-
"module": "soma-core",
|
|
123586
|
-
"file": "core/server/registry/source/version-store.ts",
|
|
123587
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123588
|
-
},
|
|
123589
|
-
{
|
|
123590
|
-
"module": "soma-core",
|
|
123591
|
-
"file": "core/server/runtime-space/inject.ts",
|
|
123592
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123593
|
-
},
|
|
123594
|
-
{
|
|
123595
|
-
"module": "soma-ui",
|
|
123596
|
-
"file": "src/compiler/bdl/registry/archive.ts",
|
|
123597
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123598
|
-
},
|
|
123599
|
-
{
|
|
123600
|
-
"module": "soma-ui",
|
|
123601
|
-
"file": "src/compiler/bdl/registry/publish.ts",
|
|
123602
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123603
|
-
},
|
|
123604
|
-
{
|
|
123605
|
-
"module": "soma-core",
|
|
123606
|
-
"file": "core/server/host/published-page-artifact-cache.ts",
|
|
123607
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123608
|
-
},
|
|
123609
|
-
{
|
|
123610
|
-
"module": "soma-core",
|
|
123611
|
-
"file": "core/server/runtime-space/store.ts",
|
|
123612
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123613
|
-
},
|
|
123614
|
-
{
|
|
123615
|
-
"module": "soma-core",
|
|
123616
|
-
"file": "core/server/runtime-space/static-source.ts",
|
|
123617
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123618
|
-
},
|
|
123619
|
-
{
|
|
123620
|
-
"module": "soma-core",
|
|
123621
|
-
"file": "core/server/runtime-space/dynamic-pages.ts",
|
|
123622
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123623
|
-
},
|
|
123624
|
-
{
|
|
123625
|
-
"module": "soma-core",
|
|
123626
|
-
"file": "core/server/infra/cache/ServerFileCache.ts",
|
|
123627
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123628
|
-
},
|
|
123629
|
-
{
|
|
123630
|
-
"module": "soma-foundation",
|
|
123631
|
-
"file": "src/predicates/predicates.ts",
|
|
123632
|
-
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
123633
|
-
},
|
|
123634
|
-
{
|
|
123635
|
-
"module": "soma-core",
|
|
123636
|
-
"file": "core/client/base/SomaHttpClient.ts",
|
|
123637
|
-
"symbol": "SOMA_PIPELINE_HOST_HTTP_REQUEST_TIMEOUT_MS"
|
|
123638
|
-
},
|
|
123639
|
-
{
|
|
123640
|
-
"module": "soma-core",
|
|
123641
|
-
"file": "core/client/infra/http/SomaHttpService.ts",
|
|
123642
|
-
"symbol": "SOMA_PIPELINE_HOST_HTTP_REQUEST_TIMEOUT_MS"
|
|
123643
|
-
},
|
|
123644
|
-
{
|
|
123645
|
-
"module": "soma-core",
|
|
123646
|
-
"file": "core/client/runtime/SomaRuntimeServices.ts",
|
|
123647
|
-
"symbol": "SOMA_PIPELINE_HOST_HTTP_REQUEST_TIMEOUT_MS"
|
|
123648
|
-
},
|
|
123649
|
-
{
|
|
123650
|
-
"module": "soma-foundation",
|
|
123651
|
-
"file": "src/layout/flow-editor-geometry.ts",
|
|
123652
|
-
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
123653
|
-
},
|
|
123654
|
-
{
|
|
123655
|
-
"module": "soma-foundation",
|
|
123656
|
-
"file": "src/data/session/session-parser.ts",
|
|
123657
|
-
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
123658
|
-
},
|
|
123659
|
-
{
|
|
123660
|
-
"module": "soma-core",
|
|
123661
|
-
"file": "core/client/parser/subscribe-parser.ts",
|
|
123662
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123663
|
-
},
|
|
123664
|
-
{
|
|
123665
|
-
"module": "soma-foundation",
|
|
123666
|
-
"file": "src/data/declare/window-parser.ts",
|
|
123667
|
-
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
123668
|
-
},
|
|
123669
|
-
{
|
|
123670
|
-
"module": "soma-foundation",
|
|
123671
|
-
"file": "src/data/runtime/region-query-defaults.ts",
|
|
123672
|
-
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
123673
|
-
},
|
|
123674
|
-
{
|
|
123675
|
-
"module": "soma-ui",
|
|
123676
|
-
"file": "src/data-std/execution-parser.ts",
|
|
123677
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123678
|
-
},
|
|
123679
|
-
{
|
|
123680
|
-
"module": "soma-ui",
|
|
123681
|
-
"file": "src/data-std/embed-path.ts",
|
|
123682
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123683
|
-
},
|
|
123684
|
-
{
|
|
123685
|
-
"module": "soma-core",
|
|
123686
|
-
"file": "core/shared/page-envelope.ts",
|
|
123687
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123688
|
-
},
|
|
123689
|
-
{
|
|
123690
|
-
"module": "soma-core",
|
|
123691
|
-
"file": "core/server/runtime-space/nav-catalog.ts",
|
|
123692
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123693
|
-
},
|
|
123694
|
-
{
|
|
123695
|
-
"module": "soma-ui",
|
|
123696
|
-
"file": "src/compiler/contract/tiers.ts",
|
|
123697
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123698
|
-
},
|
|
123699
|
-
{
|
|
123700
|
-
"module": "soma-ui",
|
|
123701
|
-
"file": "src/compiler/compose/families/monitor.ts",
|
|
123702
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123703
|
-
},
|
|
123704
|
-
{
|
|
123705
|
-
"module": "soma-ui",
|
|
123706
|
-
"file": "src/compiler/compose/families/navigate.ts",
|
|
123707
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123708
|
-
},
|
|
123709
|
-
{
|
|
123710
|
-
"module": "soma-ui",
|
|
123711
|
-
"file": "src/compiler/compose/match-unit.ts",
|
|
123712
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123713
|
-
},
|
|
123714
|
-
{
|
|
123715
|
-
"module": "soma-ui",
|
|
123716
|
-
"file": "src/compiler/compose/plan.ts",
|
|
123717
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123718
|
-
},
|
|
123719
|
-
{
|
|
123720
|
-
"module": "soma-ui",
|
|
123721
|
-
"file": "src/compiler/compose/recipe-expand.ts",
|
|
123722
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123723
|
-
},
|
|
123724
|
-
{
|
|
123725
|
-
"module": "soma-ui",
|
|
123726
|
-
"file": "src/compiler/settle/control-form.ts",
|
|
123727
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123728
|
-
},
|
|
123729
|
-
{
|
|
123730
|
-
"module": "soma-ui",
|
|
123731
|
-
"file": "src/compiler/space/spatial.ts",
|
|
123732
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123733
|
-
},
|
|
123734
|
-
{
|
|
123735
|
-
"module": "soma-ui",
|
|
123736
|
-
"file": "src/compiler/contract/generate.types.ts",
|
|
123737
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123738
|
-
},
|
|
123739
|
-
{
|
|
123740
|
-
"module": "soma-ui",
|
|
123741
|
-
"file": "src/data-kit/filter-model/presets.ts",
|
|
123742
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123743
|
-
},
|
|
123744
|
-
{
|
|
123745
|
-
"module": "soma-ui",
|
|
123746
|
-
"file": "src/data-kit/filter-model/url-state.ts",
|
|
123747
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123748
|
-
},
|
|
123749
|
-
{
|
|
123750
|
-
"module": "soma-ui",
|
|
123751
|
-
"file": "src/data-kit/notice.ts",
|
|
123752
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123753
|
-
},
|
|
123754
|
-
{
|
|
123755
|
-
"module": "soma-ui",
|
|
123756
|
-
"file": "src/data-kit/views/records.ts",
|
|
123757
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123758
|
-
},
|
|
123759
|
-
{
|
|
123760
|
-
"module": "soma-foundation",
|
|
123761
|
-
"file": "src/layout/host-defaults.ts",
|
|
123762
|
-
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
123763
|
-
},
|
|
123764
|
-
{
|
|
123765
|
-
"module": "soma-foundation",
|
|
123766
|
-
"file": "src/values/index.ts",
|
|
123767
|
-
"symbol": "SOMA_PIPELINE_HOST_HTTP_REQUEST_TIMEOUT_MS"
|
|
123768
|
-
},
|
|
123769
|
-
{
|
|
123770
|
-
"module": "soma-kit",
|
|
123771
|
-
"file": "src/app/define-kit-actions.ts",
|
|
123772
|
-
"symbol": "SOMA_PIPELINE_HOST_HTTP_REQUEST_TIMEOUT_MS"
|
|
123773
|
-
},
|
|
123774
|
-
{
|
|
123775
|
-
"module": "soma-foundation",
|
|
123776
|
-
"file": "src/style/audit-state-distinct.ts",
|
|
123777
|
-
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
123778
|
-
},
|
|
123779
|
-
{
|
|
123780
|
-
"module": "soma-foundation",
|
|
123781
|
-
"file": "src/style/relative-color.ts",
|
|
123782
|
-
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
123783
|
-
},
|
|
123784
|
-
{
|
|
123785
|
-
"module": "soma-foundation",
|
|
123786
|
-
"file": "src/primitives/guard.ts",
|
|
123787
|
-
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
123788
|
-
},
|
|
123789
|
-
{
|
|
123790
|
-
"module": "soma-foundation",
|
|
123791
|
-
"file": "src/layout/types.ts",
|
|
123792
|
-
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
123793
|
-
},
|
|
123794
|
-
{
|
|
123795
|
-
"module": "soma-foundation",
|
|
123796
|
-
"file": "src/theme/palette.ts",
|
|
123797
|
-
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
123798
|
-
},
|
|
123799
|
-
{
|
|
123800
|
-
"module": "soma-testkit",
|
|
123801
|
-
"file": "src/mock/node/cli.mjs",
|
|
123802
|
-
"symbol": "SOMA_PIPELINE_LIMITS_MOCK"
|
|
123803
|
-
},
|
|
123804
|
-
{
|
|
123805
|
-
"module": "soma-testkit",
|
|
123806
|
-
"file": "src/mock/node/context.mjs",
|
|
123807
|
-
"symbol": "SOMA_PIPELINE_LIMITS_MOCK"
|
|
123808
|
-
},
|
|
123809
|
-
{
|
|
123810
|
-
"module": "soma-testkit",
|
|
123811
|
-
"file": "src/mock/node/process-lifecycle.mjs",
|
|
123812
|
-
"symbol": "SOMA_PIPELINE_LIMITS_MOCK"
|
|
123813
|
-
},
|
|
123814
|
-
{
|
|
123815
|
-
"module": "soma-testkit",
|
|
123816
|
-
"file": "src/mock/node/registry.mjs",
|
|
123817
|
-
"symbol": "SOMA_PIPELINE_LIMITS_MOCK"
|
|
123818
|
-
},
|
|
123819
|
-
{
|
|
123820
|
-
"module": "soma-testkit",
|
|
123821
|
-
"file": "src/mock/node/schema-generator.mjs",
|
|
123822
|
-
"symbol": "SOMA_PIPELINE_LIMITS_MOCK"
|
|
123823
|
-
},
|
|
123824
|
-
{
|
|
123825
|
-
"module": "soma-testkit",
|
|
123826
|
-
"file": "src/mock/testing/host-harness.mjs",
|
|
123827
|
-
"symbol": "SOMA_PIPELINE_LIMITS_MOCK"
|
|
123828
|
-
},
|
|
123829
|
-
{
|
|
123830
|
-
"module": "soma-ai",
|
|
123831
|
-
"file": "src/domain/ai-shared/AiLimits.ts",
|
|
123832
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI"
|
|
123833
|
-
},
|
|
123834
|
-
{
|
|
123835
|
-
"module": "soma-ai",
|
|
123836
|
-
"file": "src/domain/ai-shared/AiRuntimeConfig.ts",
|
|
123837
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI"
|
|
123838
|
-
},
|
|
123839
|
-
{
|
|
123840
|
-
"module": "soma-ai",
|
|
123841
|
-
"file": "src/domain/ai-shared/JsonlRetention.ts",
|
|
123842
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI"
|
|
123843
|
-
},
|
|
123844
|
-
{
|
|
123845
|
-
"module": "soma-ai",
|
|
123846
|
-
"file": "src/server/common/RateLimitBackend.ts",
|
|
123847
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI"
|
|
123848
|
-
},
|
|
123849
|
-
{
|
|
123850
|
-
"module": "soma-ai",
|
|
123851
|
-
"file": "src/server/common/RequestBodyLimit.ts",
|
|
123852
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI"
|
|
123853
|
-
},
|
|
123854
|
-
{
|
|
123855
|
-
"module": "soma-ai",
|
|
123856
|
-
"file": "src/server/services/ai-assistant/Chat.ts",
|
|
123857
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI"
|
|
123858
|
-
},
|
|
123859
|
-
{
|
|
123860
|
-
"module": "soma-ai",
|
|
123861
|
-
"file": "src/domain/ai-assistant/widget/AiChatHistoryStore.ts",
|
|
123862
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI"
|
|
123863
|
-
},
|
|
123864
|
-
{
|
|
123865
|
-
"module": "soma-ai",
|
|
123866
|
-
"file": "src/domain/ai-assistant/toolkit/AssistantToolRegistry.ts",
|
|
123867
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI"
|
|
123868
|
-
},
|
|
123869
|
-
{
|
|
123870
|
-
"module": "soma-ai",
|
|
123871
|
-
"file": "src/domain/ai-shared/TrustedRequestContext.ts",
|
|
123872
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI_RUNTIME"
|
|
123873
|
-
},
|
|
123874
|
-
{
|
|
123875
|
-
"module": "soma-ai",
|
|
123876
|
-
"file": "src/domain/ai-assistant/widget/mountAssistantWidget.ts",
|
|
123877
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI_RUNTIME"
|
|
123878
|
-
},
|
|
123879
|
-
{
|
|
123880
|
-
"module": "soma-ai",
|
|
123881
|
-
"file": "src/domain/ai-assistant/SuggestedPrompts.ts",
|
|
123882
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI_RUNTIME"
|
|
123883
|
-
},
|
|
123884
|
-
{
|
|
123885
|
-
"module": "soma-ai",
|
|
123886
|
-
"file": "src/domain/ai-assistant/page-operate/mountPageOperateEffect.ts",
|
|
123887
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI_RUNTIME"
|
|
123888
|
-
},
|
|
123889
|
-
{
|
|
123890
|
-
"module": "soma-ai",
|
|
123891
|
-
"file": "src/domain/ai-shared/AiRuntimeConfig.ts",
|
|
123892
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI_RUNTIME"
|
|
123893
|
-
},
|
|
123894
|
-
{
|
|
123895
|
-
"module": "soma-ai",
|
|
123896
|
-
"file": "src/domain/ai-shared/AiRunContext.ts",
|
|
123897
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI_RUNTIME"
|
|
123898
|
-
},
|
|
123899
|
-
{
|
|
123900
|
-
"module": "soma-ai-page",
|
|
123901
|
-
"file": "src/versions/limits.ts",
|
|
123902
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI_PAGE"
|
|
123903
|
-
},
|
|
123904
|
-
{
|
|
123905
|
-
"module": "soma-ai-page",
|
|
123906
|
-
"file": "src/GenerateLimits.ts",
|
|
123907
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI_PAGE"
|
|
123908
|
-
},
|
|
123909
|
-
{
|
|
123910
|
-
"module": "soma-ai-page",
|
|
123911
|
-
"file": "src/PageLimits.ts",
|
|
123912
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI_PAGE"
|
|
123913
|
-
},
|
|
123914
|
-
{
|
|
123915
|
-
"module": "soma-ui",
|
|
123916
|
-
"file": "src/app/submit.ts",
|
|
123917
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
123918
|
-
},
|
|
123919
|
-
{
|
|
123920
|
-
"module": "soma-robot",
|
|
123921
|
-
"file": "src/common/limits.ts",
|
|
123922
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI_ROBOT"
|
|
123923
|
-
}
|
|
123924
|
-
],
|
|
123925
|
-
"registry": {
|
|
123926
|
-
"recordMaxBytes": 65536,
|
|
123927
|
-
"declarationMaxBytes": 131072,
|
|
123928
|
-
"assetMaxBytes": 2097152,
|
|
123929
|
-
"batchMaxPages": 200,
|
|
123930
|
-
"writeMaxBytes": 1048576
|
|
123931
|
-
},
|
|
123932
|
-
"cache": {
|
|
123933
|
-
"regionCapacity": 256,
|
|
123934
|
-
"generationCapacity": 256,
|
|
123935
|
-
"apiRecordCapacity": 512,
|
|
123936
|
-
"pageDeclarationCapacity": 64,
|
|
123937
|
-
"sourceAssetCapacity": 64,
|
|
123938
|
-
"publishedArtifactCapacity": 64,
|
|
123939
|
-
"watchFailLimit": 2,
|
|
123940
|
-
"serverFileMaxEntries": 512,
|
|
123941
|
-
"serverFileMaxBytes": 33554432,
|
|
123942
|
-
"serverDirMaxEntries": 256,
|
|
123943
|
-
"sourceRootAliasCapacity": 64
|
|
123944
|
-
},
|
|
123945
|
-
"runtimeCache": {
|
|
123946
|
-
"basis": "runtime \u7A7A\u95F4 L1 \u5185\u5B58 LRU \u7684\u6761\u76EE\u5BB9\u91CF\uFF08\u7F16\u8BD1\u7ED3\u679C\u4E0E\u6807\u51C6\u683C\u5F0F\u4EA7\u7269\u5404\u4E00\u6761\u76EE\uFF09\u4E0E\u9759\u6001\u9875\u5730\u5740\u6E05\u5355\u7684\u5F00\u53D1\u6001\u590D\u6838\u95F4\u9694\uFF1B\u5BB9\u91CF\u4E0D\u5C0F\u4E8E\u53D1\u5E03\u9875\u4EA7\u7269\u7F13\u5B58\u5BB9\u91CF\uFF08cache.publishedArtifactCapacity\uFF09\uFF0C\u56E0\u4E3A L1 \u8981\u5BB9\u5F97\u4E0B\u5DF2\u53D1\u5E03\u9875\u52A0\u4E0A\u8FD0\u884C\u671F\u6309 URL \u6CE8\u5165\u7684\u9875\uFF1B\u590D\u6838\u95F4\u9694\u8BA9\u65B0\u589E\u9759\u6001\u9875\u6700\u8FDF\u8FD9\u4E2A\u6BEB\u79D2\u6570\u540E\u8FDB\u5165\u5199\u5165\u671F\u51B2\u7A81\u5224\u5B9A\uFF08\u751F\u4EA7\u6001\u4E0D\u8FC7\u671F\uFF09\u3002\u8FC1\u5165\u524D\u662F soma-core store.ts \u7684 SOMA_RUNTIME_CACHE_ENTRIES_DEFAULT \u4E0E static-source.ts \u7684 DEV_TTL_MS",
|
|
123947
|
-
"pageCapacity": 256,
|
|
123948
|
-
"staticScanTtlMs": 1e3
|
|
123949
|
-
},
|
|
123950
|
-
"retry": {
|
|
123951
|
-
"casAttempts": 5,
|
|
123952
|
-
"archivePinAttempts": 3,
|
|
123953
|
-
"archiveRounds": 5,
|
|
123954
|
-
"publishRounds": 5
|
|
123955
|
-
},
|
|
123956
|
-
"fileLock": {
|
|
123957
|
-
"staleMs": 1e4,
|
|
123958
|
-
"maxWaitMs": 5e3,
|
|
123959
|
-
"waitSliceMs": 15
|
|
123960
|
-
},
|
|
123961
|
-
"pagedList": {
|
|
123962
|
-
"pageSizeDefault": 10,
|
|
123963
|
-
"pageSizeMax": 500
|
|
123964
|
-
},
|
|
123965
|
-
"writeRate": {
|
|
123966
|
-
"limit": 120,
|
|
123967
|
-
"windowMs": 6e4
|
|
123968
|
-
},
|
|
123969
|
-
"subscribe": {
|
|
123970
|
-
"maxSubscriptions": 8,
|
|
123971
|
-
"maxDebounceMs": 1e4,
|
|
123972
|
-
"defaultDebounceMs": 300
|
|
123973
|
-
},
|
|
123974
|
-
"inject": {
|
|
123975
|
-
"pageMaxBytes": 4194304,
|
|
123976
|
-
"batchFailureMessageMaxChars": 2e3
|
|
123977
|
-
},
|
|
123978
|
-
"execution": {
|
|
123979
|
-
"maxNodes": 128,
|
|
123980
|
-
"maxDeps": 128,
|
|
123981
|
-
"maxEdges": 1024,
|
|
123982
|
-
"maxConcurrency": {
|
|
123983
|
-
"default": 4,
|
|
123984
|
-
"max": 32
|
|
123985
|
-
},
|
|
123986
|
-
"maxAttempts": {
|
|
123987
|
-
"default": 3,
|
|
123988
|
-
"max": 32
|
|
123989
|
-
},
|
|
123990
|
-
"confirmMessageMax": 1e3,
|
|
123991
|
-
"path": {
|
|
123992
|
-
"maxSegments": 24,
|
|
123993
|
-
"segmentMaxLength": 128,
|
|
123994
|
-
"indexBound": 2e4
|
|
123995
|
-
},
|
|
123996
|
-
"inputMaxDepth": 16
|
|
123997
|
-
},
|
|
123998
|
-
"envelope": {
|
|
123999
|
-
"basis": {
|
|
124000
|
-
"titleMaxEm": "\u9875\u9762\u4FE1\u5C01 title \u7684\u663E\u793A\u5BBD\u5EA6\u4E0A\u9650\uFF0C\u5355\u4F4D em\uFF081em = \u4E00\u4E2A\u5168\u89D2\u5B57\uFF1B\u534A\u89D2\u5B57\u6309 content-layout#/contentDemand/charEm \u6298\u7B97\uFF0C\u62C9\u4E01\u7EA6 0.55em\uFF09\uFF0C\u5224\u5B9A\u89C1 reference/envelope-text-width.mjs\u3002\u53D6 32\uFF1A\u6309 16px \u6B63\u6587\u7EA6 512px\uFF0C\u4E0D\u8D85\u8FC7\u641C\u7D22\u7ED3\u679C\u4E0E\u6D4F\u89C8\u5668\u6807\u7B7E\u6807\u9898\u7684\u60EF\u5E38\u663E\u793A\u5BBD\uFF08\u7EA6 600px\uFF0C\u62C9\u4E01\u7EA6 58 \u5B57\u3001\u4E2D\u6587 32 \u5B57\uFF09\uFF0C\u6240\u4EE5\u540C\u4E00\u6761\u89C4\u5219\u5BF9\u4E2D\u82F1\u6587\u4E00\u81F4\u3002\u8FC1\u79FB\u524D\u662F\u300C24 \u4E2A\u7801\u70B9\u300D\uFF08e92f674a \u5F15\u5165\uFF0C\u65E0\u4F9D\u636E\u8BB0\u8F7D\uFF09\uFF0C\u4E2D\u6587 24 \u5B57\u7B49\u4E8E 24em\uFF0C\u653E\u5BBD\u540E\u4E2D\u6587\u4ECD\u901A\u8FC7\u3001\u82F1\u6587\u7531\u7EA6 24 \u5B57\u653E\u5230\u7EA6 58 \u5B57\u3002\u8BC1\u636E\u5F31\uFF1A600px \u6765\u81EA\u5BF9\u4E3B\u6D41\u641C\u7D22\u7ED3\u679C\u4E0E\u6807\u7B7E\u680F\u622A\u65AD\u60EF\u4F8B\u7684\u8BB0\u5FC6\uFF0C\u4ED3\u5E93\u6837\u672C\u53F0\u8D26\u65E0\u9875\u9762\u6807\u9898\u5B57\u6570\u6837\u672C\uFF0C\u672A\u5B9E\u6D4B",
|
|
124001
|
-
"subtitleMaxEm": "\u9875\u9762\u4FE1\u5C01 subtitle \u7684\u663E\u793A\u5BBD\u5EA6\u4E0A\u9650\uFF0C\u5355\u4F4D em\uFF0C\u53E3\u5F84\u540C titleMaxEm\u3002\u53D6 80\uFF1A\u9875\u5934\u526F\u6807\u9898\u5355\u884C\uFF0C80em \u6309 16px \u7EA6 1280px\uFF0C\u662F\u5E38\u89C1\u5185\u5BB9\u533A\u6700\u5927\u5BBD\u7684\u91CF\u7EA7\uFF1B\u4E0E BDL \u533A\u57DF empty \u6587\u6848 80 \u5B57\u4E0A\u9650\u540C\u91CF\u7EA7\u3002\u8FC1\u79FB\u524D\u662F\u300C60 \u4E2A\u7801\u70B9\u300D\uFF08\u540C\u6B21\u5F15\u5165\uFF0C\u65E0\u4F9D\u636E\u8BB0\u8F7D\uFF09\u3002\u8BC1\u636E\u5F31\uFF1A\u672A\u91CF\u8FC7\u771F\u5B9E\u9875\u5934\u526F\u6807\u9898\uFF0C\u53D6\u5355\u884C\u91CF\u7EA7"
|
|
124002
|
-
},
|
|
124003
|
-
"urlMaxLength": 256,
|
|
124004
|
-
"urlMaxSegments": 8,
|
|
124005
|
-
"segmentMaxLength": 63,
|
|
124006
|
-
"labelMaxLength": 32,
|
|
124007
|
-
"paramMaxLen": 200,
|
|
124008
|
-
"paramEnumValuesMax": 32,
|
|
124009
|
-
"intMaxDigits": 15,
|
|
124010
|
-
"queryMaxItems": 12,
|
|
124011
|
-
"titleMaxEm": 32,
|
|
124012
|
-
"subtitleMaxEm": 80,
|
|
124013
|
-
"descriptionMaxCodepoints": 160,
|
|
124014
|
-
"tagsMax": 8,
|
|
124015
|
-
"rolesMax": 16,
|
|
124016
|
-
"navOrderMax": 999,
|
|
124017
|
-
"navOrderDefault": 500,
|
|
124018
|
-
"navGroupMax": 7,
|
|
124019
|
-
"navDefaultGroup": "main",
|
|
124020
|
-
"expiresMaxDays": 30
|
|
124021
|
-
},
|
|
124022
|
-
"provenance": {
|
|
124023
|
-
"basis": {
|
|
124024
|
-
"maxBytes": "\u52A8\u6001\u63D0\u4EA4\u6EAF\u6E90\u6458\u8981\u7684\u5E8F\u5217\u5316\u5B57\u8282\u4E0A\u9650\uFF08JSON\uFF0CUTF-8\uFF09\u3002\u4F30\u7B97\uFF1A15 \u4E2A\u5B57\u6BB5\u540D\u4E0E\u7ED3\u6784\u7B26\u7EA6 0.3 KB\uFF1BrunId / parentRunId / toolCallId / turnId / actor / model \u516D\u4E2A\u6807\u8BC6\u5404\u6309 \u2264 64 \u5B57\u8282\u7EA6 0.4 KB\uFF1B\u4E03\u4E2A\u6458\u8981\uFF08sha256 \u5341\u516D\u8FDB\u5236\u524D\u7F00 16 \u5B57\u7B26\uFF0C\u6309 64 \u5B57\u7B26\u7559\u4F59\u91CF\uFF09\u7EA6 0.5 KB\uFF1BrepairKinds \u2264 16 \u9879 \xD7 \u2264 24 \u5B57\u8282\u3001gates \u2264 8 \u9879 \xD7 \u2264 24 \u5B57\u8282\u7EA6 0.6 KB\uFF1B\u5408\u8BA1\u7EA6 1.8 KB\uFF0C\u53D6 4096 \u7559\u7EA6 2.3 \u500D\u4F59\u91CF\u3002\u8BC1\u636E\u5F31\uFF1A\u6309\u5B57\u6BB5\u5F62\u72B6\u4F30\u7B97\uFF0C\u672A\u91CF\u8FC7\u771F\u5B9E\u8BB0\u5F55",
|
|
124025
|
-
"maxRepairKinds": "repairKinds \u6761\u6570\u4E0A\u9650\u3002\u4E00\u6B21\u751F\u6210\u81F3\u591A aiRuntime.generator.maxAiRequests = 3 \u8F6E\uFF0C\u6BCF\u8F6E\u7684\u4FEE\u590D\u79CD\u7C7B\u53D6\u81EA\u95F8\u95E8\u6BB5\u95ED\u96C6\uFF08output / schema / policy / compile / smoke / drift \u516D\u6BB5\uFF09\u4E0E\u7A7A\u8F93\u51FA\u91CD\u8BD5\uFF0C3 \u8F6E \xD7 6 \u6BB5 = 18\uFF1B\u53D6 16 \u4E3A\u6574\u6570\u6863\uFF0C\u8DB3\u591F\u5BB9\u7EB3\u5B9E\u9645\u51FA\u73B0\u7684\u7EC4\u5408",
|
|
124026
|
-
"maxGates": "gates \u6761\u6570\u4E0A\u9650\u3002\u95F8\u95E8\u73B0\u4E3A\u4E09\u6BB5\uFF08policy / dryRun / renderSmoke\uFF09\uFF0C\u53D6 8 \u7559\u51FA\u65B0\u589E\u95F8\u95E8\u7684\u7A7A\u95F4\uFF0C\u540C\u65F6\u6321\u4F4F\u585E\u5165\u5927\u6620\u5C04\u7684\u5199\u6CD5"
|
|
124027
|
-
},
|
|
124028
|
-
"maxBytes": 4096,
|
|
124029
|
-
"maxRepairKinds": 16,
|
|
124030
|
-
"maxGates": 8
|
|
124031
|
-
},
|
|
124032
|
-
"browserWeight": {
|
|
124033
|
-
"entryGzipBytes": {
|
|
124034
|
-
"soma-core/core/index.ts": 524288,
|
|
124035
|
-
"soma-core/core/client/runtime-entry.ts": 524288,
|
|
124036
|
-
"soma-ui/src/app/index.ts": 524288,
|
|
124037
|
-
"soma-kit/src/app/index.ts": 327680
|
|
124038
|
-
}
|
|
124039
|
-
},
|
|
124040
|
-
"themeBudget": {
|
|
124041
|
-
"tokensBytes": 40960,
|
|
124042
|
-
"componentBytesPerPage": 163840,
|
|
124043
|
-
"overrideBlockBytes": 8192
|
|
124044
|
-
},
|
|
124045
|
-
"contentEngines": {
|
|
124046
|
-
"diff": {
|
|
124047
|
-
"basis": {
|
|
124048
|
-
"maxChars": "\u5355\u4E2A\u5DEE\u5F02\u8BA1\u7B97\u4E24\u4FA7\u5408\u8BA1\u5B57\u6570\u4E0A\u9650\uFF1B\u8D85\u9650\u4E0D\u8BA1\u7B97\u3001\u6574\u6BB5\u66FF\u6362\uFF08\u53C2\u8003\u6587\u672C\u5DEE\u5F02\u7EC4\u4EF6\u7B14\u8BB0 C.5\u300C\u5355\u4E2A\u5DEE\u5F02\u7EC4\u4EF6\u603B\u91CF 200 000 \u5B57\u300D\uFF0C\u5B9E\u6D4B 4\uFF1A\u4E07\u5B57\u7EA7\u9010\u5B57\u6BD4\u8F83\u9700\u8D85\u65F6\u4E0E\u9000\u5316\uFF09",
|
|
124049
|
-
"maxCharsPerCompare": "\u5355\u6B21\u8BCD\u7EA7\u6BD4\u8F83\uFF08\u4E00\u5BF9\u53E5\u5B50 / \u4E00\u6B21 diff \u8C03\u7528\uFF09\u4E24\u4FA7\u5408\u8BA1\u5B57\u6570\u4E0A\u9650\uFF08\u7B14\u8BB0 C.2 BaseOpts maxChars 20 000\uFF09",
|
|
124050
|
-
"timeoutMs": "\u4E00\u6B21 diffProse / diffItems \u7684\u603B\u65F6\u9650\uFF08\u6BEB\u79D2\uFF09\uFF0C\u540C VisualEditor timeout 1000\uFF08\u7B14\u8BB0 C.2\uFF09",
|
|
124051
|
-
"maxItems": "\u6761\u76EE\u5217\u8868\u5355\u4FA7\u6761\u76EE\u6570\u4E0A\u9650\uFF1B\u8D85\u9650\u4E0D\u9010\u6761\u6BD4\u8F83\uFF08\u7B14\u8BB0 C.5\u300C\u6761\u76EE 2 000 \u4E2A\u300D\uFF09",
|
|
124052
|
-
"moveDetectMaxChanged": "\u53D8\u5316\u6761\u76EE\uFF08\u589E + \u5220\uFF09\u8D85\u8FC7\u6B64\u6570\u4E0D\u505A\u79FB\u52A8\u68C0\u6D4B\uFF08\u7B14\u8BB0 C.2\uFF0Cwikidiff2 \u589E\u5220\u5408\u8BA1 > 100 \u4E0D\u68C0\u6D4B\u7684\u653E\u5BBD\u7248\uFF0C\u7ECF\u9A8C\u503C\uFF09",
|
|
124053
|
-
"pairAt": "\u53E5 / \u6BB5\u914D\u5BF9\u9608\u503C\uFF1A\u5B57\u7B26\u591A\u91CD\u96C6 Dice \u2265 \u6B64\u503C\u89C6\u4E3A\u6539\u5199\uFF08VisualEditor diffThreshold 0.5\uFF1B\u5B9E\u6D4B 3 \u7684\u6539\u5199\u53E5\u4E3A 0.84\u20130.89\uFF09",
|
|
124054
|
-
"rewriteBelow": "\u6574\u4F53\u76F8\u4F3C\u5EA6\u4F4E\u4E8E\u6B64\u503C\u6574\u6BB5\u66FF\u6362\uFF08\u7B49\u6548 VE keep < 0.5 \xD7 diff\uFF1B\u5B9E\u6D4B 2 \u7684 C3 \u6574\u53E5\u91CD\u5199\u7EA6 0.16\uFF09",
|
|
124055
|
-
"absorbOrphan": "\u5B64\u5B57\u5438\u6536\uFF1A\u5939\u5728\u4E24\u5904\u6539\u52A8\u95F4\u3001\u957F\u5EA6 \u2264 \u6B64\u503C\uFF08\u5B57\uFF09\u7684\u975E\u6807\u70B9\u76F8\u540C\u7247\u6BB5\u5E76\u5165\u6539\u52A8\uFF08\u5B9E\u6D4B 2 \u7684 C5\u300C\u671F\u300D\uFF09",
|
|
124056
|
-
"absorbOrphanMax": "\u8C03\u7528\u65B9\u53EF\u8C03\u7684\u5B64\u5B57\u5438\u6536\u4E0A\u9650\uFF08\u5B57\uFF09\uFF0C\u9632\u6B62\u628A\u6574\u53E5\u5438\u6210\u6539\u52A8",
|
|
124057
|
-
"titleAt": "\u65E0 key \u6761\u76EE\u6309\u6807\u9898\u914D\u5BF9\u7684\u76F8\u4F3C\u5EA6\u9608\u503C\uFF08\u7B14\u8BB0 C.2 ItemOpts.match.titleAt 0.6\uFF09",
|
|
124058
|
-
"bodyAt": "\u65E0 key \u6761\u76EE\u6309\u6B63\u6587\u914D\u5BF9\u7684\u76F8\u4F3C\u5EA6\u9608\u503C\uFF08\u7B14\u8BB0 C.2 ItemOpts.match.bodyAt 0.5\uFF09",
|
|
124059
|
-
"maxAlignTokens": "\u5E8F\u5217\u5BF9\u9F50\u7684\u4E0D\u540C\u952E\u6570\u4E0A\u9650\uFF08\u6BCF\u4E2A\u952E\u6620\u5C04\u4E3A\u4E00\u4E2A BMP \u79C1\u7528\u533A\u5B57\u7B26\uFF0CU+E000\u2013U+F8FF \u5171 6400 \u4E2A\uFF09",
|
|
124060
|
-
"maxPairMatrix": "\u4E00\u6BB5\u5220\u589E\u533A\u95F4\u5185\u53E5 / \u6BB5\u914D\u5BF9\u7684\u5019\u9009\u77E9\u9635\u4E0A\u9650\uFF08\u5220\u6570 \xD7 \u589E\u6570\uFF09\uFF0C\u8D85\u51FA\u4E0D\u914D\u5BF9\u3001\u6309\u5220 + \u589E\u5448\u73B0\uFF1B\u7ECF\u9A8C\u503C\uFF0C\u8BC1\u636E\u5F31",
|
|
124061
|
-
"maxPairCandidates": "\u65E0 key \u6761\u76EE\u6309\u76F8\u4F3C\u5EA6\u914D\u5BF9\u7684\u5019\u9009\u77E9\u9635\u4E0A\u9650\uFF08\u5269\u4F59\u65E7\u6761\u76EE \xD7 \u5269\u4F59\u65B0\u6761\u76EE\uFF09\uFF1B\u7ECF\u9A8C\u503C\uFF0C\u8BC1\u636E\u5F31"
|
|
124062
|
-
},
|
|
124063
|
-
"maxChars": 2e5,
|
|
124064
|
-
"maxCharsPerCompare": 2e4,
|
|
124065
|
-
"timeoutMs": 1e3,
|
|
124066
|
-
"maxItems": 2e3,
|
|
124067
|
-
"moveDetectMaxChanged": 500,
|
|
124068
|
-
"pairAt": 0.5,
|
|
124069
|
-
"rewriteBelow": 0.4,
|
|
124070
|
-
"absorbOrphan": 1,
|
|
124071
|
-
"absorbOrphanMax": 4,
|
|
124072
|
-
"titleAt": 0.6,
|
|
124073
|
-
"bodyAt": 0.5,
|
|
124074
|
-
"maxAlignTokens": 6400,
|
|
124075
|
-
"maxPairMatrix": 2500,
|
|
124076
|
-
"maxPairCandidates": 25e4
|
|
124077
|
-
},
|
|
124078
|
-
"highlight": {
|
|
124079
|
-
"basis": {
|
|
124080
|
-
"maxLines": "\u9AD8\u4EAE\u7684\u6700\u591A\u884C\u6570\uFF1B\u8D85\u51FA\u90E8\u5206\u6309\u7EAF\u6587\u672C\uFF08\u53C2\u8003\u6587\u672C\u5DEE\u5F02\u7EC4\u4EF6\u7B14\u8BB0 C.2 \u7AEF\u53E3 2 maxLines 5 000\uFF09",
|
|
124081
|
-
"maxLineLength": "\u5355\u884C\u8D85\u8FC7\u6B64\u5B57\u7B26\u6570\u6574\u884C\u6309\u7EAF\u6587\u672C\uFF08\u7B14\u8BB0 C.2 maxLineLength 2 000\uFF0C\u538B\u7F29\u540E\u7684\u5355\u884C JS / JSON \u5E38\u89C1\uFF09",
|
|
124082
|
-
"timeoutMs": "\u4E00\u6B21\u89E3\u6790\u7684\u65F6\u9650\uFF08\u6BEB\u79D2\uFF09\uFF1BLezer \u6309 advance() \u5206\u6B65\u89E3\u6790\uFF0C\u8D85\u65F6\u6574\u6BB5\u6309\u7EAF\u6587\u672C\uFF08\u7ECF\u9A8C\u503C\uFF0C\u4E0E\u5DEE\u5F02\u7AEF\u53E3\u540C\u53D6 1 000\uFF09",
|
|
124083
|
-
"maxChars": "\u6574\u6BB5\u8D85\u8FC7\u6B64\u5B57\u7B26\u6570\u4E0D\u89E3\u6790\u3001\u6309\u7EAF\u6587\u672C\uFF08\u7ECF\u9A8C\u503C\uFF0C\u8BC1\u636E\u5F31\uFF1A\u7EA6 1 MB \u6587\u672C\uFF09",
|
|
124084
|
-
"jsonSniffMaxChars": "\u8BED\u8A00\u63A8\u65AD\u300C\u6574\u4F53\u80FD JSON.parse\u300D\u53EA\u5BF9\u4E0D\u8D85\u8FC7\u6B64\u5B57\u7B26\u6570\u7684\u6837\u672C\u505A\uFF08\u907F\u514D\u5BF9\u5927\u6587\u672C\u53CD\u590D\u89E3\u6790\uFF1B\u7ECF\u9A8C\u503C\uFF09"
|
|
124085
|
-
},
|
|
124086
|
-
"maxLines": 5e3,
|
|
124087
|
-
"maxLineLength": 2e3,
|
|
124088
|
-
"timeoutMs": 1e3,
|
|
124089
|
-
"maxChars": 1e6,
|
|
124090
|
-
"jsonSniffMaxChars": 2e5
|
|
124091
|
-
},
|
|
124092
|
-
"structured": {
|
|
124093
|
-
"basis": {
|
|
124094
|
-
"maxChars": "JSON / YAML \u539F\u6587\u8D85\u8FC7\u6B64\u5B57\u7B26\u6570\u4E0D\u89E3\u6790\u3001\u6309\u539F\u6587\u663E\u793A\uFF08\u4E0E\u4EE3\u7801\u9AD8\u4EAE\u7AEF\u53E3 maxChars \u540C\u53D6\u7EA6 1 MB\uFF1B\u7ECF\u9A8C\u503C\uFF0C\u8BC1\u636E\u5F31\uFF09",
|
|
124095
|
-
"maxNodes": "\u89E3\u6790\u540E\u503C\u7684\u8282\u70B9\u603B\u6570\u4E0A\u9650\uFF08\u5BF9\u8C61 / \u6570\u7EC4 / \u53F6\u5B50\u5404\u8BA1 1\uFF09\uFF1BYAML \u522B\u540D\u5C55\u5F00\u8D85\u9650\u5373\u6309 too-many-nodes \u964D\u7EA7\uFF0C\u9632\u300C\u5341\u4EBF\u7B11\u58F0\u300D\u5F0F\u522B\u540D\u70B8\u5F39\uFF08\u7ECF\u9A8C\u503C\uFF1A20 \u4E07\u8282\u70B9\u7EA6\u4E3A 1 MB \u7D27\u51D1 JSON \u7684\u91CF\u7EA7\uFF09"
|
|
124096
|
-
},
|
|
124097
|
-
"maxChars": 1e6,
|
|
124098
|
-
"maxNodes": 2e5
|
|
124099
|
-
},
|
|
124100
|
-
"markdown": {
|
|
124101
|
-
"basis": {
|
|
124102
|
-
"maxChars": "Markdown \u539F\u6587\u8D85\u8FC7\u6B64\u5B57\u7B26\u6570\u4E0D\u89E3\u6790\u3001\u6309\u7EAF\u6587\u672C\u663E\u793A\uFF08\u53C2\u8003\u6587\u672C\u5DEE\u5F02\u7EC4\u4EF6\u7B14\u8BB0 C.2 \u7AEF\u53E3 1 limits.maxChars 200 000\uFF09",
|
|
124103
|
-
"maxBlocks": "\u5757\u6570\u4E0A\u9650\uFF0C\u8D85\u51FA\u622A\u65AD\u5E76\u6807 truncated\uFF08\u7B14\u8BB0 C.2 maxBlocks 5 000\uFF09",
|
|
124104
|
-
"summaryChars": "meta.summary \u53D6\u53BB\u6807\u8BB0\u5168\u6587\u7684\u524D N \u5B57\uFF08\u7B14\u8BB0 C.2\u300C\u524D 80 \u5B57\u300D\uFF09"
|
|
124105
|
-
},
|
|
124106
|
-
"maxChars": 2e5,
|
|
124107
|
-
"maxBlocks": 5e3,
|
|
124108
|
-
"summaryChars": 80
|
|
124109
|
-
}
|
|
124110
|
-
}
|
|
124111
|
-
};
|
|
124112
|
-
|
|
124113
|
-
// core/client/engines/diff/adapter-jsdiff.ts
|
|
124114
|
-
init_load();
|
|
124115
|
-
var wordSegmenter;
|
|
124116
|
-
function zhWordSegmenter() {
|
|
124117
|
-
if (wordSegmenter !== void 0) return wordSegmenter;
|
|
124118
|
-
const ctor = Intl.Segmenter;
|
|
124119
|
-
wordSegmenter = typeof ctor === "function" ? new ctor("zh", { granularity: "word" }) : null;
|
|
124120
|
-
return wordSegmenter;
|
|
124121
|
-
}
|
|
124122
|
-
function createJsdiffAdapter(adapterOptions = {}) {
|
|
124123
|
-
const load2 = () => loadEngineModule("diff", () => Promise.resolve().then(() => (init_libesm(), libesm_exports)), { telemetry: adapterOptions.telemetry });
|
|
124124
|
-
return {
|
|
124125
|
-
async diff(a2, b2, mode, options) {
|
|
124126
|
-
const lib2 = await load2();
|
|
124127
|
-
const base3 = options?.timeoutMs !== void 0 ? { timeout: options.timeoutMs } : {};
|
|
124128
|
-
let changes;
|
|
124129
|
-
if (mode === "chars") changes = lib2.diffChars(a2, b2, base3);
|
|
124130
|
-
else if (mode === "words") changes = lib2.diffWords(a2, b2, base3);
|
|
124131
|
-
else if (mode === "words-zh") {
|
|
124132
|
-
const seg = zhWordSegmenter();
|
|
124133
|
-
changes = seg === null ? lib2.diffChars(a2, b2, base3) : lib2.diffWords(a2, b2, { ...base3, intlSegmenter: seg });
|
|
124134
|
-
} else changes = lib2.diffLines(a2, b2, options?.ignoreWhitespace === true ? { ...base3, ignoreWhitespace: true } : base3);
|
|
124135
|
-
if (changes === void 0) return null;
|
|
124136
|
-
const parts = [];
|
|
124137
|
-
for (const change of changes) {
|
|
124138
|
-
if (change.value === "") continue;
|
|
124139
|
-
parts.push({ op: change.added === true ? "insert" : change.removed === true ? "delete" : "equal", text: change.value });
|
|
124140
|
-
}
|
|
124141
|
-
return parts;
|
|
124142
|
-
}
|
|
124143
|
-
};
|
|
124144
|
-
}
|
|
124145
|
-
|
|
124146
123426
|
// core/client/engines/diff/prose.ts
|
|
124147
123427
|
var now3 = () => typeof performance !== "undefined" && typeof performance.now === "function" ? performance.now() : Date.now();
|
|
124148
123428
|
var clock = now3;
|
|
@@ -124250,272 +123530,1218 @@ async function safeDiff(run, a2, b2, mode) {
|
|
|
124250
123530
|
run.degraded ??= "timeout";
|
|
124251
123531
|
return null;
|
|
124252
123532
|
}
|
|
124253
|
-
try {
|
|
124254
|
-
const parts = await run.adapter.diff(a2, b2, mode, { timeoutMs: left2 });
|
|
124255
|
-
if (parts === null) run.degraded ??= "timeout";
|
|
124256
|
-
return parts;
|
|
124257
|
-
} catch {
|
|
124258
|
-
run.degraded ??= "timeout";
|
|
124259
|
-
return null;
|
|
123533
|
+
try {
|
|
123534
|
+
const parts = await run.adapter.diff(a2, b2, mode, { timeoutMs: left2 });
|
|
123535
|
+
if (parts === null) run.degraded ??= "timeout";
|
|
123536
|
+
return parts;
|
|
123537
|
+
} catch {
|
|
123538
|
+
run.degraded ??= "timeout";
|
|
123539
|
+
return null;
|
|
123540
|
+
}
|
|
123541
|
+
}
|
|
123542
|
+
function pairRun(dels, inss, at2, maxMatrix) {
|
|
123543
|
+
const pairs2 = /* @__PURE__ */ new Map();
|
|
123544
|
+
if (dels.length === 0 || inss.length === 0 || dels.length * inss.length > maxMatrix) return pairs2;
|
|
123545
|
+
const cand = [];
|
|
123546
|
+
for (let d2 = 0; d2 < dels.length; d2 += 1) {
|
|
123547
|
+
for (let i2 = 0; i2 < inss.length; i2 += 1) {
|
|
123548
|
+
const s2 = diceSimilarity(dels[d2], inss[i2]);
|
|
123549
|
+
if (s2 >= at2) cand.push({ d: d2, i: i2, s: s2 });
|
|
123550
|
+
}
|
|
123551
|
+
}
|
|
123552
|
+
cand.sort((x2, y2) => y2.s - x2.s || x2.d - y2.d || x2.i - y2.i);
|
|
123553
|
+
const usedI = /* @__PURE__ */ new Set();
|
|
123554
|
+
for (const c2 of cand) {
|
|
123555
|
+
if (pairs2.has(c2.d) || usedI.has(c2.i)) continue;
|
|
123556
|
+
let crosses = false;
|
|
123557
|
+
for (const [d2, i2] of pairs2) if (d2 < c2.d && i2 > c2.i || d2 > c2.d && i2 < c2.i) {
|
|
123558
|
+
crosses = true;
|
|
123559
|
+
break;
|
|
123560
|
+
}
|
|
123561
|
+
if (crosses) continue;
|
|
123562
|
+
pairs2.set(c2.d, c2.i);
|
|
123563
|
+
usedI.add(c2.i);
|
|
123564
|
+
}
|
|
123565
|
+
return pairs2;
|
|
123566
|
+
}
|
|
123567
|
+
function pairAligned(ops, aKeys, bKeys, at2, maxMatrix) {
|
|
123568
|
+
const out2 = [];
|
|
123569
|
+
let k2 = 0;
|
|
123570
|
+
while (k2 < ops.length) {
|
|
123571
|
+
const op2 = ops[k2];
|
|
123572
|
+
if (op2.op === "eq") {
|
|
123573
|
+
out2.push(op2);
|
|
123574
|
+
k2 += 1;
|
|
123575
|
+
continue;
|
|
123576
|
+
}
|
|
123577
|
+
const dels = [];
|
|
123578
|
+
const inss = [];
|
|
123579
|
+
while (k2 < ops.length && ops[k2].op !== "eq") {
|
|
123580
|
+
const o2 = ops[k2];
|
|
123581
|
+
if (o2.op === "del") dels.push(o2.a);
|
|
123582
|
+
else if (o2.op === "ins") inss.push(o2.b);
|
|
123583
|
+
k2 += 1;
|
|
123584
|
+
}
|
|
123585
|
+
const pairs2 = pairRun(dels.map((a2) => aKeys[a2]), inss.map((b2) => bKeys[b2]), at2, maxMatrix);
|
|
123586
|
+
let di = 0;
|
|
123587
|
+
let ii = 0;
|
|
123588
|
+
const ordered = [...pairs2.entries()].sort((x2, y2) => x2[0] - y2[0]);
|
|
123589
|
+
for (const [d2, i2] of ordered) {
|
|
123590
|
+
for (; di < d2; di += 1) out2.push({ op: "del", a: dels[di] });
|
|
123591
|
+
for (; ii < i2; ii += 1) out2.push({ op: "ins", b: inss[ii] });
|
|
123592
|
+
out2.push({ op: "mod", a: dels[d2], b: inss[i2] });
|
|
123593
|
+
di = d2 + 1;
|
|
123594
|
+
ii = i2 + 1;
|
|
123595
|
+
}
|
|
123596
|
+
for (; di < dels.length; di += 1) out2.push({ op: "del", a: dels[di] });
|
|
123597
|
+
for (; ii < inss.length; ii += 1) out2.push({ op: "ins", b: inss[ii] });
|
|
123598
|
+
}
|
|
123599
|
+
return out2;
|
|
123600
|
+
}
|
|
123601
|
+
function splitParagraphs(text3) {
|
|
123602
|
+
return text3.split(/\r?\n/u).filter((line) => line.trim() !== "");
|
|
123603
|
+
}
|
|
123604
|
+
var sentenceSeg;
|
|
123605
|
+
function sentenceSegmenter() {
|
|
123606
|
+
if (sentenceSeg !== void 0) return sentenceSeg;
|
|
123607
|
+
const ctor = Intl.Segmenter;
|
|
123608
|
+
sentenceSeg = typeof ctor === "function" ? new ctor("zh", { granularity: "sentence" }) : null;
|
|
123609
|
+
return sentenceSeg;
|
|
123610
|
+
}
|
|
123611
|
+
function hasSegmenter() {
|
|
123612
|
+
return typeof Intl.Segmenter === "function";
|
|
123613
|
+
}
|
|
123614
|
+
function splitSentences(paragraph2) {
|
|
123615
|
+
const seg = sentenceSegmenter();
|
|
123616
|
+
const out2 = [];
|
|
123617
|
+
if (seg !== null) {
|
|
123618
|
+
for (const s2 of seg.segment(paragraph2)) if (s2.segment !== "") out2.push(s2.segment);
|
|
123619
|
+
} else {
|
|
123620
|
+
const re2 = /[^。!?!?;;]*[。!?!?;;]+[”’」』))]*\s*|[^。!?!?;;]+$/gu;
|
|
123621
|
+
for (const m4 of paragraph2.matchAll(re2)) if (m4[0] !== "") out2.push(m4[0]);
|
|
123622
|
+
}
|
|
123623
|
+
return out2.length > 0 ? out2 : [paragraph2];
|
|
123624
|
+
}
|
|
123625
|
+
function tidy(frags) {
|
|
123626
|
+
const out2 = [];
|
|
123627
|
+
let del = "";
|
|
123628
|
+
let ins = "";
|
|
123629
|
+
const flush = () => {
|
|
123630
|
+
if (del !== "") out2.push({ op: "del", v: del });
|
|
123631
|
+
if (ins !== "") out2.push({ op: "ins", v: ins });
|
|
123632
|
+
del = "";
|
|
123633
|
+
ins = "";
|
|
123634
|
+
};
|
|
123635
|
+
for (const f2 of frags) {
|
|
123636
|
+
if (f2.v === "") continue;
|
|
123637
|
+
if (f2.op === "del") del += f2.v;
|
|
123638
|
+
else if (f2.op === "ins") ins += f2.v;
|
|
123639
|
+
else {
|
|
123640
|
+
flush();
|
|
123641
|
+
const last = out2[out2.length - 1];
|
|
123642
|
+
if (last !== void 0 && last.op === "eq") out2[out2.length - 1] = { op: "eq", v: last.v + f2.v };
|
|
123643
|
+
else out2.push(f2);
|
|
123644
|
+
}
|
|
123645
|
+
}
|
|
123646
|
+
flush();
|
|
123647
|
+
return out2;
|
|
123648
|
+
}
|
|
123649
|
+
function absorbOrphans(frags, max6) {
|
|
123650
|
+
if (max6 <= 0) return tidy(frags);
|
|
123651
|
+
const out2 = [];
|
|
123652
|
+
for (let k2 = 0; k2 < frags.length; k2 += 1) {
|
|
123653
|
+
const f2 = frags[k2];
|
|
123654
|
+
const prev = frags[k2 - 1];
|
|
123655
|
+
const next = frags[k2 + 1];
|
|
123656
|
+
if (f2.op === "eq" && prev !== void 0 && next !== void 0 && prev.op !== "eq" && next.op !== "eq" && cpLen(f2.v) <= max6 && !PUNCT.test(f2.v)) {
|
|
123657
|
+
out2.push({ op: "del", v: f2.v }, { op: "ins", v: f2.v });
|
|
123658
|
+
} else out2.push(f2);
|
|
123659
|
+
}
|
|
123660
|
+
return tidy(out2);
|
|
123661
|
+
}
|
|
123662
|
+
function countChanges(frags) {
|
|
123663
|
+
let n2 = 0;
|
|
123664
|
+
let inChange = false;
|
|
123665
|
+
for (const f2 of frags) {
|
|
123666
|
+
if (f2.op === "eq") inChange = false;
|
|
123667
|
+
else if (!inChange) {
|
|
123668
|
+
n2 += 1;
|
|
123669
|
+
inChange = true;
|
|
123670
|
+
}
|
|
123671
|
+
}
|
|
123672
|
+
return n2;
|
|
123673
|
+
}
|
|
123674
|
+
async function diffWordsMapped(run, cfg, a2, b2) {
|
|
123675
|
+
const na = normalizeWithMap(a2, cfg);
|
|
123676
|
+
const nb = normalizeWithMap(b2, cfg);
|
|
123677
|
+
if (na.text === nb.text) return [{ op: "eq", v: b2 }];
|
|
123678
|
+
const whole = [{ op: "del", v: a2 }, { op: "ins", v: b2 }];
|
|
123679
|
+
if (na.text.length + nb.text.length > cfg.maxCharsPerCompare) {
|
|
123680
|
+
run.degraded ??= "too-large";
|
|
123681
|
+
return whole;
|
|
123682
|
+
}
|
|
123683
|
+
const zh = hasHan(na.text) || hasHan(nb.text);
|
|
123684
|
+
let mode = zh ? "words-zh" : "words";
|
|
123685
|
+
if (zh && !hasSegmenter()) {
|
|
123686
|
+
mode = "chars";
|
|
123687
|
+
run.usedChars = true;
|
|
123688
|
+
run.degraded ??= "no-segmenter";
|
|
123689
|
+
}
|
|
123690
|
+
if (zh && mode === "words-zh") run.usedZh = true;
|
|
123691
|
+
let parts = await safeDiff(run, na.text, nb.text, mode);
|
|
123692
|
+
if (parts === null) return whole;
|
|
123693
|
+
let mapped = mapParts(parts, na, nb);
|
|
123694
|
+
if (mapped === null && mode !== "chars") {
|
|
123695
|
+
parts = await safeDiff(run, na.text, nb.text, "chars");
|
|
123696
|
+
mapped = parts === null ? null : mapParts(parts, na, nb);
|
|
123697
|
+
}
|
|
123698
|
+
return mapped ?? whole;
|
|
123699
|
+
}
|
|
123700
|
+
function mapParts(parts, na, nb) {
|
|
123701
|
+
const out2 = [];
|
|
123702
|
+
let ia = 0;
|
|
123703
|
+
let ib = 0;
|
|
123704
|
+
for (const p2 of parts) {
|
|
123705
|
+
const len2 = p2.text.length;
|
|
123706
|
+
if (p2.op === "equal") {
|
|
123707
|
+
if (na.text.slice(ia, ia + len2) !== p2.text || nb.text.slice(ib, ib + len2) !== p2.text) return null;
|
|
123708
|
+
out2.push({ op: "eq", v: originSlice(nb, ib, ib + len2) });
|
|
123709
|
+
ia += len2;
|
|
123710
|
+
ib += len2;
|
|
123711
|
+
} else if (p2.op === "delete") {
|
|
123712
|
+
if (na.text.slice(ia, ia + len2) !== p2.text) return null;
|
|
123713
|
+
out2.push({ op: "del", v: originSlice(na, ia, ia + len2) });
|
|
123714
|
+
ia += len2;
|
|
123715
|
+
} else {
|
|
123716
|
+
if (nb.text.slice(ib, ib + len2) !== p2.text) return null;
|
|
123717
|
+
out2.push({ op: "ins", v: originSlice(nb, ib, ib + len2) });
|
|
123718
|
+
ib += len2;
|
|
123719
|
+
}
|
|
123720
|
+
}
|
|
123721
|
+
if (ia !== na.text.length || ib !== nb.text.length) return null;
|
|
123722
|
+
return out2;
|
|
123723
|
+
}
|
|
123724
|
+
async function diffParagraph(run, cfg, a2, b2) {
|
|
123725
|
+
const sa2 = splitSentences(a2);
|
|
123726
|
+
const sb = splitSentences(b2);
|
|
123727
|
+
const ka2 = sa2.map((s2) => normalizeWithMap(s2, cfg).text);
|
|
123728
|
+
const kb = sb.map((s2) => normalizeWithMap(s2, cfg).text);
|
|
123729
|
+
const aligned = await alignKeys(run, ka2, kb, cfg.maxAlignTokens);
|
|
123730
|
+
if (aligned === null) return [{ op: "del", v: a2 }, { op: "ins", v: b2 }];
|
|
123731
|
+
const units = pairAligned(aligned, ka2, kb, cfg.pairAt, cfg.maxPairMatrix);
|
|
123732
|
+
const frags = [];
|
|
123733
|
+
for (const u2 of units) {
|
|
123734
|
+
if (u2.op === "eq") frags.push({ op: "eq", v: sb[u2.b] });
|
|
123735
|
+
else if (u2.op === "del") frags.push({ op: "del", v: sa2[u2.a] });
|
|
123736
|
+
else if (u2.op === "ins") frags.push({ op: "ins", v: sb[u2.b] });
|
|
123737
|
+
else frags.push(...await diffWordsMapped(run, cfg, sa2[u2.a], sb[u2.b]));
|
|
123738
|
+
}
|
|
123739
|
+
return absorbOrphans(frags, cfg.absorbOrphan);
|
|
123740
|
+
}
|
|
123741
|
+
function statsOf(blocks) {
|
|
123742
|
+
let ins = 0;
|
|
123743
|
+
let del = 0;
|
|
123744
|
+
let changes = 0;
|
|
123745
|
+
for (const blk of blocks) {
|
|
123746
|
+
for (const f2 of blk.fragments) {
|
|
123747
|
+
if (f2.op === "ins") ins += cpLen(f2.v.replace(/\s+/gu, ""));
|
|
123748
|
+
else if (f2.op === "del") del += cpLen(f2.v.replace(/\s+/gu, ""));
|
|
123749
|
+
}
|
|
123750
|
+
if (blk.op === "ins" || blk.op === "del") changes += 1;
|
|
123751
|
+
else if (blk.op === "mod") changes += countChanges(blk.fragments);
|
|
123752
|
+
}
|
|
123753
|
+
return { insChars: ins, delChars: del, changes };
|
|
123754
|
+
}
|
|
123755
|
+
function similarityOf(blocks, aLen, bLen) {
|
|
123756
|
+
if (aLen + bLen === 0) return 1;
|
|
123757
|
+
let eq = 0;
|
|
123758
|
+
for (const blk of blocks) for (const f2 of blk.fragments) if (f2.op === "eq") eq += cpLen(f2.v.replace(/\s+/gu, ""));
|
|
123759
|
+
return Math.min(1, 2 * eq / (aLen + bLen));
|
|
123760
|
+
}
|
|
123761
|
+
var compact2 = (s2) => cpLen(s2.replace(/\s+/gu, ""));
|
|
123762
|
+
function rewriteBlocks(pa2, pb) {
|
|
123763
|
+
return [...pa2.map((v4) => ({ op: "del", fragments: [{ op: "del", v: v4 }] })), ...pb.map((v4) => ({ op: "ins", fragments: [{ op: "ins", v: v4 }] }))];
|
|
123764
|
+
}
|
|
123765
|
+
async function runProse(run, cfg, a2, b2) {
|
|
123766
|
+
const pa2 = splitParagraphs(a2);
|
|
123767
|
+
const pb = splitParagraphs(b2);
|
|
123768
|
+
const granularity = () => run.usedChars ? "chars" : run.usedZh ? "words-zh" : hasHan(a2) || hasHan(b2) ? hasSegmenter() ? "words-zh" : "chars" : "words";
|
|
123769
|
+
const aLen = compact2(a2);
|
|
123770
|
+
const bLen = compact2(b2);
|
|
123771
|
+
const finish = (kind, blocks2, formatOnly = false) => {
|
|
123772
|
+
const stats = statsOf(blocks2);
|
|
123773
|
+
const out2 = { kind, formatOnly, similarity: kind === "same" ? 1 : similarityOf(blocks2, aLen, bLen), blocks: blocks2, stats, granularity: granularity() };
|
|
123774
|
+
return run.degraded !== void 0 ? { ...out2, degraded: run.degraded } : out2;
|
|
123775
|
+
};
|
|
123776
|
+
if (a2.length + b2.length > cfg.maxChars) {
|
|
123777
|
+
run.degraded = "too-large";
|
|
123778
|
+
return finish(pa2.length > 0 && pb.length > 0 ? "rewrite" : "inline", rewriteBlocks(pa2, pb));
|
|
123779
|
+
}
|
|
123780
|
+
const ka2 = pa2.map((p2) => normalizeWithMap(p2, cfg).text);
|
|
123781
|
+
const kb = pb.map((p2) => normalizeWithMap(p2, cfg).text);
|
|
123782
|
+
if (ka2.length === kb.length && ka2.every((k2, i2) => k2 === kb[i2])) {
|
|
123783
|
+
return finish("same", pb.map((v4) => ({ op: "eq", fragments: [{ op: "eq", v: v4 }] })), a2 !== b2);
|
|
123784
|
+
}
|
|
123785
|
+
if (pa2.length === 0 || pb.length === 0) return finish("inline", rewriteBlocks(pa2, pb));
|
|
123786
|
+
const aligned = await alignKeys(run, ka2, kb, cfg.maxAlignTokens);
|
|
123787
|
+
if (aligned === null) return finish("rewrite", rewriteBlocks(pa2, pb));
|
|
123788
|
+
const units = pairAligned(aligned, ka2, kb, cfg.pairAt, cfg.maxPairMatrix);
|
|
123789
|
+
const blocks = [];
|
|
123790
|
+
for (const u2 of units) {
|
|
123791
|
+
if (u2.op === "eq") blocks.push({ op: "eq", fragments: [{ op: "eq", v: pb[u2.b] }] });
|
|
123792
|
+
else if (u2.op === "del") blocks.push({ op: "del", fragments: [{ op: "del", v: pa2[u2.a] }] });
|
|
123793
|
+
else if (u2.op === "ins") blocks.push({ op: "ins", fragments: [{ op: "ins", v: pb[u2.b] }] });
|
|
123794
|
+
else blocks.push({ op: "mod", fragments: await diffParagraph(run, cfg, pa2[u2.a], pb[u2.b]) });
|
|
124260
123795
|
}
|
|
123796
|
+
const sim = similarityOf(blocks, aLen, bLen);
|
|
123797
|
+
if (sim < cfg.rewriteBelow) return finish("rewrite", rewriteBlocks(pa2, pb));
|
|
123798
|
+
return finish("inline", blocks);
|
|
124261
123799
|
}
|
|
124262
|
-
|
|
124263
|
-
|
|
124264
|
-
|
|
124265
|
-
|
|
124266
|
-
|
|
124267
|
-
|
|
124268
|
-
|
|
124269
|
-
|
|
123800
|
+
|
|
123801
|
+
// core/client/engines/diff/code.ts
|
|
123802
|
+
var toFrags = (parts) => tidy(parts.map((p2) => ({ v: p2.text, op: p2.op === "equal" ? "eq" : p2.op === "insert" ? "ins" : "del" })));
|
|
123803
|
+
var linesOf = (s2) => s2 === "" ? [] : s2.replace(/\r\n?/gu, "\n").split("\n");
|
|
123804
|
+
var squash = (s2) => s2.replace(/\s+/gu, "");
|
|
123805
|
+
function hunksOf(lines, context) {
|
|
123806
|
+
const changed = [];
|
|
123807
|
+
lines.forEach((l2, i2) => {
|
|
123808
|
+
if (l2.op !== "eq") changed.push(i2);
|
|
123809
|
+
});
|
|
123810
|
+
if (changed.length === 0) return [];
|
|
123811
|
+
const ranges = [];
|
|
123812
|
+
for (const i2 of changed) {
|
|
123813
|
+
const from = Math.max(0, i2 - context);
|
|
123814
|
+
const to2 = Math.min(lines.length - 1, i2 + context);
|
|
123815
|
+
const last = ranges[ranges.length - 1];
|
|
123816
|
+
if (last && from <= last[1] + 1) last[1] = Math.max(last[1], to2);
|
|
123817
|
+
else ranges.push([from, to2]);
|
|
123818
|
+
}
|
|
123819
|
+
return ranges.map(([from, to2]) => {
|
|
123820
|
+
const slice2 = lines.slice(from, to2 + 1);
|
|
123821
|
+
const firstA = slice2.find((l2) => l2.a !== void 0)?.a ?? 0;
|
|
123822
|
+
const firstB = slice2.find((l2) => l2.b !== void 0)?.b ?? 0;
|
|
123823
|
+
return {
|
|
123824
|
+
aStart: firstA,
|
|
123825
|
+
aLines: slice2.filter((l2) => l2.a !== void 0).length,
|
|
123826
|
+
bStart: firstB,
|
|
123827
|
+
bLines: slice2.filter((l2) => l2.b !== void 0).length,
|
|
123828
|
+
from,
|
|
123829
|
+
to: to2,
|
|
123830
|
+
lines: slice2
|
|
123831
|
+
};
|
|
123832
|
+
});
|
|
123833
|
+
}
|
|
123834
|
+
async function runCode(run, cfg, a2, b2) {
|
|
123835
|
+
const aLines = linesOf(a2);
|
|
123836
|
+
const bLines = linesOf(b2);
|
|
123837
|
+
const whitespaceOnly = a2 !== b2 && squash(a2) === squash(b2);
|
|
123838
|
+
if (a2 === b2) {
|
|
123839
|
+
const lines2 = aLines.map((text3, i2) => ({ op: "eq", a: i2 + 1, b: i2 + 1, text: text3 }));
|
|
123840
|
+
return { kind: "same", lines: lines2, hunks: [], stats: { added: 0, removed: 0, modified: 0 }, whitespaceOnly: false };
|
|
123841
|
+
}
|
|
123842
|
+
const plain2 = (degraded) => {
|
|
123843
|
+
const lines2 = [
|
|
123844
|
+
...aLines.map((text3, i2) => ({ op: "del", a: i2 + 1, text: text3 })),
|
|
123845
|
+
...bLines.map((text3, i2) => ({ op: "ins", b: i2 + 1, text: text3 }))
|
|
123846
|
+
];
|
|
123847
|
+
return { kind: "changed", lines: lines2, hunks: [{ aStart: 1, aLines: aLines.length, bStart: 1, bLines: bLines.length, from: 0, to: lines2.length - 1, lines: lines2 }], stats: { added: bLines.length, removed: aLines.length, modified: 0 }, whitespaceOnly, degraded };
|
|
123848
|
+
};
|
|
123849
|
+
if (a2.length + b2.length > cfg.maxChars) return plain2("too-large");
|
|
123850
|
+
const ops = await alignKeys(run, aLines, bLines, cfg.maxAlignTokens);
|
|
123851
|
+
if (ops === null) return plain2(run.degraded === "timeout" ? "timeout" : "too-large");
|
|
123852
|
+
const units = pairAligned(ops, aLines, bLines, cfg.pairAt, cfg.maxPairMatrix);
|
|
123853
|
+
const lines = [];
|
|
123854
|
+
let added = 0;
|
|
123855
|
+
let removed = 0;
|
|
123856
|
+
let modified = 0;
|
|
123857
|
+
let pendingDel = [];
|
|
123858
|
+
let pendingIns = [];
|
|
123859
|
+
const flush = () => {
|
|
123860
|
+
lines.push(...pendingDel, ...pendingIns);
|
|
123861
|
+
pendingDel = [];
|
|
123862
|
+
pendingIns = [];
|
|
123863
|
+
};
|
|
123864
|
+
for (const u2 of units) {
|
|
123865
|
+
if (u2.op === "eq") {
|
|
123866
|
+
flush();
|
|
123867
|
+
lines.push({ op: "eq", a: u2.a + 1, b: u2.b + 1, text: aLines[u2.a] });
|
|
123868
|
+
continue;
|
|
124270
123869
|
}
|
|
124271
|
-
|
|
124272
|
-
|
|
124273
|
-
|
|
124274
|
-
|
|
124275
|
-
if (pairs2.has(c2.d) || usedI.has(c2.i)) continue;
|
|
124276
|
-
let crosses = false;
|
|
124277
|
-
for (const [d2, i2] of pairs2) if (d2 < c2.d && i2 > c2.i || d2 > c2.d && i2 < c2.i) {
|
|
124278
|
-
crosses = true;
|
|
124279
|
-
break;
|
|
123870
|
+
if (u2.op === "del") {
|
|
123871
|
+
removed += 1;
|
|
123872
|
+
pendingDel.push({ op: "del", a: u2.a + 1, text: aLines[u2.a] });
|
|
123873
|
+
continue;
|
|
124280
123874
|
}
|
|
124281
|
-
if (
|
|
124282
|
-
|
|
124283
|
-
|
|
123875
|
+
if (u2.op === "ins") {
|
|
123876
|
+
added += 1;
|
|
123877
|
+
pendingIns.push({ op: "ins", b: u2.b + 1, text: bLines[u2.b] });
|
|
123878
|
+
continue;
|
|
123879
|
+
}
|
|
123880
|
+
modified += 1;
|
|
123881
|
+
const la = aLines[u2.a];
|
|
123882
|
+
const lb2 = bLines[u2.b];
|
|
123883
|
+
let frags = null;
|
|
123884
|
+
if (la.length <= cfg.intraMaxLine && lb2.length <= cfg.intraMaxLine) {
|
|
123885
|
+
const parts = await safeDiff(run, la, lb2, "chars");
|
|
123886
|
+
if (parts !== null) frags = toFrags(parts);
|
|
123887
|
+
}
|
|
123888
|
+
pendingDel.push({ op: "del", a: u2.a + 1, text: la, pair: u2.b + 1, ...frags ? { fragments: frags.filter((f2) => f2.op !== "ins") } : {} });
|
|
123889
|
+
pendingIns.push({ op: "ins", b: u2.b + 1, text: lb2, pair: u2.a + 1, ...frags ? { fragments: frags.filter((f2) => f2.op !== "del") } : {} });
|
|
124284
123890
|
}
|
|
124285
|
-
|
|
123891
|
+
flush();
|
|
123892
|
+
const out2 = { kind: "changed", lines, hunks: hunksOf(lines, cfg.context), stats: { added, removed, modified }, whitespaceOnly };
|
|
123893
|
+
return run.degraded !== void 0 ? { ...out2, degraded: run.degraded === "timeout" ? "timeout" : "too-large" } : out2;
|
|
124286
123894
|
}
|
|
124287
|
-
function
|
|
123895
|
+
function splitMarkdownBlocks(source) {
|
|
124288
123896
|
const out2 = [];
|
|
124289
|
-
let
|
|
124290
|
-
|
|
124291
|
-
|
|
124292
|
-
|
|
124293
|
-
|
|
124294
|
-
|
|
123897
|
+
let cur = [];
|
|
123898
|
+
let fence2 = null;
|
|
123899
|
+
for (const line of source.replace(/\r\n?/gu, "\n").split("\n")) {
|
|
123900
|
+
const m4 = /^\s{0,3}(`{3,}|~{3,})/u.exec(line);
|
|
123901
|
+
if (fence2 !== null) {
|
|
123902
|
+
cur.push(line);
|
|
123903
|
+
if (m4 && m4[1].startsWith(fence2)) {
|
|
123904
|
+
out2.push(cur.join("\n"));
|
|
123905
|
+
cur = [];
|
|
123906
|
+
fence2 = null;
|
|
123907
|
+
}
|
|
124295
123908
|
continue;
|
|
124296
123909
|
}
|
|
124297
|
-
|
|
124298
|
-
|
|
124299
|
-
|
|
124300
|
-
|
|
124301
|
-
|
|
124302
|
-
else if (o2.op === "ins") inss.push(o2.b);
|
|
124303
|
-
k2 += 1;
|
|
123910
|
+
if (m4) {
|
|
123911
|
+
if (cur.length > 0) out2.push(cur.join("\n"));
|
|
123912
|
+
cur = [line];
|
|
123913
|
+
fence2 = m4[1].slice(0, 3);
|
|
123914
|
+
continue;
|
|
124304
123915
|
}
|
|
124305
|
-
|
|
124306
|
-
|
|
124307
|
-
|
|
124308
|
-
|
|
124309
|
-
for (const [d2, i2] of ordered) {
|
|
124310
|
-
for (; di < d2; di += 1) out2.push({ op: "del", a: dels[di] });
|
|
124311
|
-
for (; ii < i2; ii += 1) out2.push({ op: "ins", b: inss[ii] });
|
|
124312
|
-
out2.push({ op: "mod", a: dels[d2], b: inss[i2] });
|
|
124313
|
-
di = d2 + 1;
|
|
124314
|
-
ii = i2 + 1;
|
|
123916
|
+
if (line.trim() === "") {
|
|
123917
|
+
if (cur.length > 0) out2.push(cur.join("\n"));
|
|
123918
|
+
cur = [];
|
|
123919
|
+
continue;
|
|
124315
123920
|
}
|
|
124316
|
-
|
|
124317
|
-
for (; ii < inss.length; ii += 1) out2.push({ op: "ins", b: inss[ii] });
|
|
123921
|
+
cur.push(line);
|
|
124318
123922
|
}
|
|
123923
|
+
if (cur.length > 0) out2.push(cur.join("\n"));
|
|
124319
123924
|
return out2;
|
|
124320
123925
|
}
|
|
124321
|
-
function
|
|
124322
|
-
|
|
124323
|
-
}
|
|
124324
|
-
|
|
124325
|
-
|
|
124326
|
-
if (
|
|
124327
|
-
|
|
124328
|
-
|
|
124329
|
-
return
|
|
124330
|
-
}
|
|
124331
|
-
|
|
124332
|
-
return
|
|
124333
|
-
}
|
|
124334
|
-
function
|
|
124335
|
-
|
|
124336
|
-
|
|
124337
|
-
|
|
124338
|
-
|
|
124339
|
-
|
|
124340
|
-
const
|
|
124341
|
-
|
|
123926
|
+
function markdownBlockKind(block2) {
|
|
123927
|
+
const first = block2.split("\n", 1)[0].trimStart();
|
|
123928
|
+
const h2 = /^(#{1,6})\s/u.exec(first);
|
|
123929
|
+
if (h2) return { kind: "heading", detail: String(h2[1].length) };
|
|
123930
|
+
const f2 = /^(`{3,}|~{3,})\s*([^\s`]*)/u.exec(first);
|
|
123931
|
+
if (f2) return { kind: "code", detail: f2[2] ?? "" };
|
|
123932
|
+
if (/^>/u.test(first)) return { kind: "quote", detail: "" };
|
|
123933
|
+
if (/^\d+[.)]\s/u.test(first)) return { kind: "list", detail: "ordered" };
|
|
123934
|
+
if (/^[-*+]\s/u.test(first)) return { kind: "list", detail: "bullet" };
|
|
123935
|
+
if (/^\|/u.test(first)) return { kind: "table", detail: "" };
|
|
123936
|
+
if (/^(-{3,}|\*{3,}|_{3,})\s*$/u.test(first)) return { kind: "hr", detail: "" };
|
|
123937
|
+
return { kind: "paragraph", detail: "" };
|
|
123938
|
+
}
|
|
123939
|
+
function markdownBlockText(block2, kind) {
|
|
123940
|
+
if (kind === "code") return block2.split("\n").slice(1).filter((l2, i2, arr) => !(i2 === arr.length - 1 && /^\s*(`{3,}|~{3,})\s*$/u.test(l2))).join("\n");
|
|
123941
|
+
return block2.split("\n").map((l2) => l2.replace(/^\s{0,3}(#{1,6}\s+|>\s?|[-*+]\s+(\[[ xX]\]\s+)?|\d+[.)]\s+)/u, "")).join("\n").trim();
|
|
123942
|
+
}
|
|
123943
|
+
async function runMarkdown(run, cfg, a2, b2) {
|
|
123944
|
+
if (a2 === b2) {
|
|
123945
|
+
const blocks2 = splitMarkdownBlocks(a2).map((s2) => ({ op: "eq", kind: markdownBlockKind(s2).kind, before: s2, after: s2 }));
|
|
123946
|
+
return { kind: "same", blocks: blocks2, stats: { added: 0, removed: 0, modified: 0, same: blocks2.length } };
|
|
123947
|
+
}
|
|
123948
|
+
const aBlocks = splitMarkdownBlocks(a2);
|
|
123949
|
+
const bBlocks = splitMarkdownBlocks(b2);
|
|
123950
|
+
if (a2.length + b2.length > cfg.maxChars || aBlocks.length + bBlocks.length > cfg.maxBlocks) {
|
|
123951
|
+
return { kind: "changed", blocks: [], stats: { added: 0, removed: 0, modified: 0, same: 0 }, degraded: "too-large" };
|
|
123952
|
+
}
|
|
123953
|
+
const meta2 = (s2) => {
|
|
123954
|
+
const k2 = markdownBlockKind(s2);
|
|
123955
|
+
return { ...k2, text: markdownBlockText(s2, k2.kind) };
|
|
123956
|
+
};
|
|
123957
|
+
const am = aBlocks.map(meta2);
|
|
123958
|
+
const bm2 = bBlocks.map(meta2);
|
|
123959
|
+
const key = (m4) => `${m4.kind}\0${m4.text.replace(/\s+/gu, " ")}`;
|
|
123960
|
+
const ops = await alignKeys(run, am.map(key), bm2.map(key), cfg.maxAlignTokens);
|
|
123961
|
+
if (ops === null) return { kind: "changed", blocks: [], stats: { added: 0, removed: 0, modified: 0, same: 0 }, degraded: run.degraded === "timeout" ? "timeout" : "too-large" };
|
|
123962
|
+
const units = pairAligned(ops, am.map((m4) => `${m4.kind}:${m4.text}`), bm2.map((m4) => `${m4.kind}:${m4.text}`), cfg.pairAt, cfg.maxPairMatrix);
|
|
123963
|
+
const blocks = [];
|
|
123964
|
+
let added = 0;
|
|
123965
|
+
let removed = 0;
|
|
123966
|
+
let modified = 0;
|
|
123967
|
+
let same = 0;
|
|
123968
|
+
for (const u2 of units) {
|
|
123969
|
+
if (u2.op === "eq") {
|
|
123970
|
+
const x3 = am[u2.a];
|
|
123971
|
+
const y3 = bm2[u2.b];
|
|
123972
|
+
const notes2 = structureNotes(x3, y3);
|
|
123973
|
+
if (notes2.length === 0 && aBlocks[u2.a] === bBlocks[u2.b]) {
|
|
123974
|
+
same += 1;
|
|
123975
|
+
blocks.push({ op: "eq", kind: y3.kind, before: aBlocks[u2.a], after: bBlocks[u2.b] });
|
|
123976
|
+
continue;
|
|
123977
|
+
}
|
|
123978
|
+
modified += 1;
|
|
123979
|
+
blocks.push({ op: "mod", kind: y3.kind, before: aBlocks[u2.a], after: bBlocks[u2.b], fragments: [{ v: y3.text, op: "eq" }], ...notes2.length > 0 ? { notes: notes2 } : {} });
|
|
123980
|
+
continue;
|
|
123981
|
+
}
|
|
123982
|
+
if (u2.op === "del") {
|
|
123983
|
+
removed += 1;
|
|
123984
|
+
blocks.push({ op: "del", kind: am[u2.a].kind, before: aBlocks[u2.a] });
|
|
123985
|
+
continue;
|
|
123986
|
+
}
|
|
123987
|
+
if (u2.op === "ins") {
|
|
123988
|
+
added += 1;
|
|
123989
|
+
blocks.push({ op: "ins", kind: bm2[u2.b].kind, after: bBlocks[u2.b] });
|
|
123990
|
+
continue;
|
|
123991
|
+
}
|
|
123992
|
+
const x2 = am[u2.a];
|
|
123993
|
+
const y2 = bm2[u2.b];
|
|
123994
|
+
if (x2.kind !== y2.kind) {
|
|
123995
|
+
removed += 1;
|
|
123996
|
+
added += 1;
|
|
123997
|
+
blocks.push({ op: "del", kind: x2.kind, before: aBlocks[u2.a] }, { op: "ins", kind: y2.kind, after: bBlocks[u2.b] });
|
|
123998
|
+
continue;
|
|
123999
|
+
}
|
|
124000
|
+
modified += 1;
|
|
124001
|
+
const mode = hasHan(x2.text) || hasHan(y2.text) ? "words-zh" : "words";
|
|
124002
|
+
const parts = x2.kind === "code" ? null : await safeDiff(run, x2.text, y2.text, mode);
|
|
124003
|
+
const notes = structureNotes(x2, y2);
|
|
124004
|
+
blocks.push({
|
|
124005
|
+
op: "mod",
|
|
124006
|
+
kind: y2.kind,
|
|
124007
|
+
before: aBlocks[u2.a],
|
|
124008
|
+
after: bBlocks[u2.b],
|
|
124009
|
+
...parts !== null ? { fragments: toFrags(parts) } : {},
|
|
124010
|
+
...notes.length > 0 ? { notes } : {},
|
|
124011
|
+
similarity: diceSimilarity(x2.text, y2.text)
|
|
124012
|
+
});
|
|
124342
124013
|
}
|
|
124343
|
-
|
|
124014
|
+
const out2 = { kind: "changed", blocks, stats: { added, removed, modified, same } };
|
|
124015
|
+
return run.degraded !== void 0 ? { ...out2, degraded: run.degraded === "timeout" ? "timeout" : "too-large" } : out2;
|
|
124344
124016
|
}
|
|
124345
|
-
function
|
|
124346
|
-
|
|
124347
|
-
|
|
124348
|
-
|
|
124349
|
-
|
|
124350
|
-
|
|
124351
|
-
|
|
124352
|
-
|
|
124353
|
-
|
|
124354
|
-
|
|
124355
|
-
|
|
124356
|
-
|
|
124357
|
-
|
|
124358
|
-
|
|
124359
|
-
|
|
124360
|
-
|
|
124361
|
-
|
|
124362
|
-
|
|
124363
|
-
|
|
124017
|
+
function structureNotes(x2, y2) {
|
|
124018
|
+
if (x2.kind !== y2.kind || x2.detail === y2.detail) return [];
|
|
124019
|
+
const what = x2.kind === "heading" ? "heading-level" : x2.kind === "list" ? "list-type" : x2.kind === "code" ? "code-language" : null;
|
|
124020
|
+
return what === null ? [] : [{ what, before: x2.detail, after: y2.detail }];
|
|
124021
|
+
}
|
|
124022
|
+
|
|
124023
|
+
// core/client/engines/diff/index.ts
|
|
124024
|
+
init_engine_error();
|
|
124025
|
+
|
|
124026
|
+
// core/shared/registry-generated/limits.ts
|
|
124027
|
+
var SOMA_PIPELINE_LIMITS = {
|
|
124028
|
+
"id": "limits",
|
|
124029
|
+
"title": "\u7BA1\u7EBF\u9650\u503C\u8868\uFF1A\u4F53\u79EF\u9884\u7B97\u3001\u6570\u636E\u89C4\u6A21\u4E0A\u9650\u3001data-kit \u7684\u7B5B\u9009\u9632\u6296\u4E0E\u6811\u89C6\u56FE\u9884\u7B97\uFF08dataKit\uFF1B\u89C4\u5219\u6811\u5D4C\u5957\u6DF1\u5EA6\u8BFB window.maxFilterDepth\uFF0C\u4E0E\u6570\u636E\u7A97\u53E3\u58F0\u660E\u671F\u95F8\u95E8\u540C\u4E00\u53E3\u5F84\uFF09\u3001\u5404\u5448\u73B0\u65CF\u7684\u9879\u6570\u4E0A\u9650\u3001\u5199\u5165\u9762\u5B88\u536B\u4E0E\u7EA6\u675F\u5E03\u5C40\u89C4\u6A21\u3001\u7F16\u8BD1\u6DF1\u5EA6\u3001\u89E3\u91CA\u8F93\u51FA\u3001\u6CE8\u518C\u4E2D\u5FC3\u4F53\u79EF\u3001\u7F13\u5B58\u5BB9\u91CF\u3001\u4E50\u89C2\u5E76\u53D1\u91CD\u8BD5\u8F6E\u6570\u3001\u5199\u9501\u65F6\u9650\u3001\u5199\u5165\u9650\u6D41\u9ED8\u8BA4\u3001session / subscribe / window.filter \u89E3\u6790\u4E0A\u9650\uFF08\u542B matches \u8C13\u8BCD\u7684\u6B63\u5219\u6A21\u5F0F / \u88AB\u6D4B\u6587\u672C\u957F\u5EA6\u4E0A\u9650\uFF0C\u6682\u5B9A\uFF0C\u5F85\u88C1\u51B3\uFF09\u3001\u8FD0\u884C\u671F\u9875\u9762\u6CE8\u5165\u53E3\u7684\u5355\u9875\u8F7D\u8377\u5B57\u8282\u4E0A\u9650\uFF08inject\uFF0C\u6682\u5B9A\uFF0C\u5F85\u88C1\u51B3\uFF09\u3001\u6267\u884C\u8BA1\u5212\uFF08execution plan\uFF09\u7684\u8282\u70B9 / \u4F9D\u8D56 / \u5E76\u53D1 / \u91CD\u8BD5 / \u8DEF\u5F84 / \u8F93\u5165\u6DF1\u5EA6\u4E0A\u9650\u3001embed \u8DEF\u5F84\u957F\u5EA6\u3001Host \u6CE8\u5165\u7F3A\u7701\uFF08hostDefaults\uFF1A\u6570\u636E\u7A97\u53E3 block \u7F3A\u7701\u3001\u5BBF\u4E3B\u6A21\u5757\u5206\u7247\u52A0\u8F7D\u91CD\u8BD5\u9000\u907F\u6B65\u957F\u4E0E HTTP \u8BF7\u6C42\u7F3A\u7701\u8D85\u65F6\uFF1BHTTP \u9ED8\u8BA4\u6807\u91CF\u7ECF foundation/values \u8F7B\u91CF\u6295\u5F71\u4F9B core \u4E0E kit \u5171\u7528\uFF09\u3001Server Mock \u7684\u751F\u6210\u53C2\u6570\uFF08mock\uFF09\u3001soma-ai \u7684\u5B57\u8282 / \u6761\u6570 / \u9650\u6D41 / \u4FDD\u7559\u4E0A\u9650\uFF08ai\uFF09\u3001soma-ai \u7684\u65F6\u5EF6 / \u91CD\u8BD5 / \u5E76\u53D1\u7F3A\u7701\uFF08aiRuntime\uFF09\uFF08web \u7F16\u8BD1\u7BA1\u7EBF / \u7EC4\u4EF6\u8FD0\u884C\u65F6\u7684\u4E0A\u9650\uFF0C\u4E0D\u662F\u8BBE\u8BA1\u8BED\u8A00\uFF09",
|
|
124030
|
+
"readBy": [
|
|
124031
|
+
{
|
|
124032
|
+
"module": "soma-ui",
|
|
124033
|
+
"file": "src/compiler/styling/theme/orchestrate/budget.ts",
|
|
124034
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124035
|
+
},
|
|
124036
|
+
{
|
|
124037
|
+
"module": "soma-ui",
|
|
124038
|
+
"file": "src/shared/data-scale.ts",
|
|
124039
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124040
|
+
},
|
|
124041
|
+
{
|
|
124042
|
+
"module": "soma-ui",
|
|
124043
|
+
"file": "src/compiler/need/families/browse-layout.ts",
|
|
124044
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124045
|
+
},
|
|
124046
|
+
{
|
|
124047
|
+
"module": "soma-ui",
|
|
124048
|
+
"file": "src/compiler/need/families/browse-dims.ts",
|
|
124049
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124050
|
+
},
|
|
124051
|
+
{
|
|
124052
|
+
"module": "soma-ui",
|
|
124053
|
+
"file": "src/compiler/need/families/browse-conditions.ts",
|
|
124054
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124055
|
+
},
|
|
124056
|
+
{
|
|
124057
|
+
"module": "soma-ui",
|
|
124058
|
+
"file": "src/compiler/need/families/compare.ts",
|
|
124059
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124060
|
+
},
|
|
124061
|
+
{
|
|
124062
|
+
"module": "soma-ui",
|
|
124063
|
+
"file": "src/compiler/need/families/monitor.ts",
|
|
124064
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124065
|
+
},
|
|
124066
|
+
{
|
|
124067
|
+
"module": "soma-ui",
|
|
124068
|
+
"file": "src/compiler/need/families/inspect-relation.ts",
|
|
124069
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124070
|
+
},
|
|
124071
|
+
{
|
|
124072
|
+
"module": "soma-ui",
|
|
124073
|
+
"file": "src/compiler/trace/trace.types.ts",
|
|
124074
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124075
|
+
},
|
|
124076
|
+
{
|
|
124077
|
+
"module": "soma-ui",
|
|
124078
|
+
"file": "src/units/compose-check.ts",
|
|
124079
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124080
|
+
},
|
|
124081
|
+
{
|
|
124082
|
+
"module": "soma-ui",
|
|
124083
|
+
"file": "src/shared/field-components.ts",
|
|
124084
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124085
|
+
},
|
|
124086
|
+
{
|
|
124087
|
+
"module": "soma-ui",
|
|
124088
|
+
"file": "src/data-kit/filter-model/filter.ts",
|
|
124089
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124090
|
+
},
|
|
124091
|
+
{
|
|
124092
|
+
"module": "soma-ui",
|
|
124093
|
+
"file": "src/data-kit/views/tree.ts",
|
|
124094
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124095
|
+
},
|
|
124096
|
+
{
|
|
124097
|
+
"module": "soma-ui",
|
|
124098
|
+
"file": "src/compiler/certify/certificate.ts",
|
|
124099
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124100
|
+
},
|
|
124101
|
+
{
|
|
124102
|
+
"module": "soma-ui",
|
|
124103
|
+
"file": "src/compiler/certify/explain-format.ts",
|
|
124104
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124105
|
+
},
|
|
124106
|
+
{
|
|
124107
|
+
"module": "soma-ui",
|
|
124108
|
+
"file": "src/compiler/context/compile-context.ts",
|
|
124109
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124110
|
+
},
|
|
124111
|
+
{
|
|
124112
|
+
"module": "soma-ui",
|
|
124113
|
+
"file": "src/compiler/driver/cache/region-cache.ts",
|
|
124114
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124115
|
+
},
|
|
124116
|
+
{
|
|
124117
|
+
"module": "soma-ui",
|
|
124118
|
+
"file": "src/compiler/compose/plan.ts",
|
|
124119
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124120
|
+
},
|
|
124121
|
+
{
|
|
124122
|
+
"module": "soma-ui",
|
|
124123
|
+
"file": "src/app/server.ts",
|
|
124124
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124125
|
+
},
|
|
124126
|
+
{
|
|
124127
|
+
"module": "soma-core",
|
|
124128
|
+
"file": "core/server/registry/api-registry-store.ts",
|
|
124129
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124130
|
+
},
|
|
124131
|
+
{
|
|
124132
|
+
"module": "soma-core",
|
|
124133
|
+
"file": "core/client/engines/diff/index.ts",
|
|
124134
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124135
|
+
},
|
|
124136
|
+
{
|
|
124137
|
+
"module": "soma-core",
|
|
124138
|
+
"file": "core/client/engines/highlight/index.ts",
|
|
124139
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124140
|
+
},
|
|
124141
|
+
{
|
|
124142
|
+
"module": "soma-core",
|
|
124143
|
+
"file": "core/server/registry/page-registry-store.ts",
|
|
124144
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124145
|
+
},
|
|
124146
|
+
{
|
|
124147
|
+
"module": "soma-core",
|
|
124148
|
+
"file": "core/server/registry/asset-store.ts",
|
|
124149
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124150
|
+
},
|
|
124151
|
+
{
|
|
124152
|
+
"module": "soma-core",
|
|
124153
|
+
"file": "core/server/registry/batch-stage.ts",
|
|
124154
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124155
|
+
},
|
|
124156
|
+
{
|
|
124157
|
+
"module": "soma-core",
|
|
124158
|
+
"file": "core/server/registry/request-body-limit.ts",
|
|
124159
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124160
|
+
},
|
|
124161
|
+
{
|
|
124162
|
+
"module": "soma-core",
|
|
124163
|
+
"file": "core/server/registry/registry-file-lock.ts",
|
|
124164
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124165
|
+
},
|
|
124166
|
+
{
|
|
124167
|
+
"module": "soma-core",
|
|
124168
|
+
"file": "core/server/api/paged-list.ts",
|
|
124169
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124170
|
+
},
|
|
124171
|
+
{
|
|
124172
|
+
"module": "soma-core",
|
|
124173
|
+
"file": "core/server/registry/registry-write-pipeline.ts",
|
|
124174
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124175
|
+
},
|
|
124176
|
+
{
|
|
124177
|
+
"module": "soma-core",
|
|
124178
|
+
"file": "core/server/registry/page-registry-repository.ts",
|
|
124179
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124180
|
+
},
|
|
124181
|
+
{
|
|
124182
|
+
"module": "soma-core",
|
|
124183
|
+
"file": "core/server/registry/source/version-store.ts",
|
|
124184
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124185
|
+
},
|
|
124186
|
+
{
|
|
124187
|
+
"module": "soma-core",
|
|
124188
|
+
"file": "core/server/runtime-space/inject.ts",
|
|
124189
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124190
|
+
},
|
|
124191
|
+
{
|
|
124192
|
+
"module": "soma-ui",
|
|
124193
|
+
"file": "src/compiler/bdl/registry/archive.ts",
|
|
124194
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124195
|
+
},
|
|
124196
|
+
{
|
|
124197
|
+
"module": "soma-ui",
|
|
124198
|
+
"file": "src/compiler/bdl/registry/publish.ts",
|
|
124199
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124200
|
+
},
|
|
124201
|
+
{
|
|
124202
|
+
"module": "soma-core",
|
|
124203
|
+
"file": "core/server/host/published-page-artifact-cache.ts",
|
|
124204
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124205
|
+
},
|
|
124206
|
+
{
|
|
124207
|
+
"module": "soma-core",
|
|
124208
|
+
"file": "core/server/runtime-space/store.ts",
|
|
124209
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124210
|
+
},
|
|
124211
|
+
{
|
|
124212
|
+
"module": "soma-core",
|
|
124213
|
+
"file": "core/server/runtime-space/static-source.ts",
|
|
124214
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124215
|
+
},
|
|
124216
|
+
{
|
|
124217
|
+
"module": "soma-core",
|
|
124218
|
+
"file": "core/server/runtime-space/dynamic-pages.ts",
|
|
124219
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124220
|
+
},
|
|
124221
|
+
{
|
|
124222
|
+
"module": "soma-core",
|
|
124223
|
+
"file": "core/server/infra/cache/ServerFileCache.ts",
|
|
124224
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124225
|
+
},
|
|
124226
|
+
{
|
|
124227
|
+
"module": "soma-foundation",
|
|
124228
|
+
"file": "src/predicates/predicates.ts",
|
|
124229
|
+
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
124230
|
+
},
|
|
124231
|
+
{
|
|
124232
|
+
"module": "soma-core",
|
|
124233
|
+
"file": "core/client/base/SomaHttpClient.ts",
|
|
124234
|
+
"symbol": "SOMA_PIPELINE_HOST_HTTP_REQUEST_TIMEOUT_MS"
|
|
124235
|
+
},
|
|
124236
|
+
{
|
|
124237
|
+
"module": "soma-core",
|
|
124238
|
+
"file": "core/client/infra/http/SomaHttpService.ts",
|
|
124239
|
+
"symbol": "SOMA_PIPELINE_HOST_HTTP_REQUEST_TIMEOUT_MS"
|
|
124240
|
+
},
|
|
124241
|
+
{
|
|
124242
|
+
"module": "soma-core",
|
|
124243
|
+
"file": "core/client/runtime/SomaRuntimeServices.ts",
|
|
124244
|
+
"symbol": "SOMA_PIPELINE_HOST_HTTP_REQUEST_TIMEOUT_MS"
|
|
124245
|
+
},
|
|
124246
|
+
{
|
|
124247
|
+
"module": "soma-foundation",
|
|
124248
|
+
"file": "src/layout/flow-editor-geometry.ts",
|
|
124249
|
+
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
124250
|
+
},
|
|
124251
|
+
{
|
|
124252
|
+
"module": "soma-foundation",
|
|
124253
|
+
"file": "src/data/session/session-parser.ts",
|
|
124254
|
+
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
124255
|
+
},
|
|
124256
|
+
{
|
|
124257
|
+
"module": "soma-core",
|
|
124258
|
+
"file": "core/client/parser/subscribe-parser.ts",
|
|
124259
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124260
|
+
},
|
|
124261
|
+
{
|
|
124262
|
+
"module": "soma-foundation",
|
|
124263
|
+
"file": "src/data/declare/window-parser.ts",
|
|
124264
|
+
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
124265
|
+
},
|
|
124266
|
+
{
|
|
124267
|
+
"module": "soma-foundation",
|
|
124268
|
+
"file": "src/data/runtime/region-query-defaults.ts",
|
|
124269
|
+
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
124270
|
+
},
|
|
124271
|
+
{
|
|
124272
|
+
"module": "soma-ui",
|
|
124273
|
+
"file": "src/data-std/execution-parser.ts",
|
|
124274
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124275
|
+
},
|
|
124276
|
+
{
|
|
124277
|
+
"module": "soma-ui",
|
|
124278
|
+
"file": "src/data-std/embed-path.ts",
|
|
124279
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124280
|
+
},
|
|
124281
|
+
{
|
|
124282
|
+
"module": "soma-core",
|
|
124283
|
+
"file": "core/shared/page-envelope.ts",
|
|
124284
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124285
|
+
},
|
|
124286
|
+
{
|
|
124287
|
+
"module": "soma-core",
|
|
124288
|
+
"file": "core/server/runtime-space/nav-catalog.ts",
|
|
124289
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124290
|
+
},
|
|
124291
|
+
{
|
|
124292
|
+
"module": "soma-ui",
|
|
124293
|
+
"file": "src/compiler/contract/tiers.ts",
|
|
124294
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124295
|
+
},
|
|
124296
|
+
{
|
|
124297
|
+
"module": "soma-ui",
|
|
124298
|
+
"file": "src/compiler/compose/families/monitor.ts",
|
|
124299
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124300
|
+
},
|
|
124301
|
+
{
|
|
124302
|
+
"module": "soma-ui",
|
|
124303
|
+
"file": "src/compiler/compose/families/navigate.ts",
|
|
124304
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124305
|
+
},
|
|
124306
|
+
{
|
|
124307
|
+
"module": "soma-ui",
|
|
124308
|
+
"file": "src/compiler/compose/match-unit.ts",
|
|
124309
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124310
|
+
},
|
|
124311
|
+
{
|
|
124312
|
+
"module": "soma-ui",
|
|
124313
|
+
"file": "src/compiler/compose/plan.ts",
|
|
124314
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124315
|
+
},
|
|
124316
|
+
{
|
|
124317
|
+
"module": "soma-ui",
|
|
124318
|
+
"file": "src/compiler/compose/recipe-expand.ts",
|
|
124319
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124320
|
+
},
|
|
124321
|
+
{
|
|
124322
|
+
"module": "soma-ui",
|
|
124323
|
+
"file": "src/compiler/settle/control-form.ts",
|
|
124324
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124325
|
+
},
|
|
124326
|
+
{
|
|
124327
|
+
"module": "soma-ui",
|
|
124328
|
+
"file": "src/compiler/space/spatial.ts",
|
|
124329
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124330
|
+
},
|
|
124331
|
+
{
|
|
124332
|
+
"module": "soma-ui",
|
|
124333
|
+
"file": "src/compiler/contract/generate.types.ts",
|
|
124334
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124335
|
+
},
|
|
124336
|
+
{
|
|
124337
|
+
"module": "soma-ui",
|
|
124338
|
+
"file": "src/data-kit/filter-model/presets.ts",
|
|
124339
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124340
|
+
},
|
|
124341
|
+
{
|
|
124342
|
+
"module": "soma-ui",
|
|
124343
|
+
"file": "src/data-kit/filter-model/url-state.ts",
|
|
124344
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124345
|
+
},
|
|
124346
|
+
{
|
|
124347
|
+
"module": "soma-ui",
|
|
124348
|
+
"file": "src/data-kit/notice.ts",
|
|
124349
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124350
|
+
},
|
|
124351
|
+
{
|
|
124352
|
+
"module": "soma-ui",
|
|
124353
|
+
"file": "src/data-kit/views/records.ts",
|
|
124354
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124355
|
+
},
|
|
124356
|
+
{
|
|
124357
|
+
"module": "soma-foundation",
|
|
124358
|
+
"file": "src/layout/host-defaults.ts",
|
|
124359
|
+
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
124360
|
+
},
|
|
124361
|
+
{
|
|
124362
|
+
"module": "soma-foundation",
|
|
124363
|
+
"file": "src/values/index.ts",
|
|
124364
|
+
"symbol": "SOMA_PIPELINE_HOST_HTTP_REQUEST_TIMEOUT_MS"
|
|
124365
|
+
},
|
|
124366
|
+
{
|
|
124367
|
+
"module": "soma-kit",
|
|
124368
|
+
"file": "src/app/define-kit-actions.ts",
|
|
124369
|
+
"symbol": "SOMA_PIPELINE_HOST_HTTP_REQUEST_TIMEOUT_MS"
|
|
124370
|
+
},
|
|
124371
|
+
{
|
|
124372
|
+
"module": "soma-foundation",
|
|
124373
|
+
"file": "src/style/audit-state-distinct.ts",
|
|
124374
|
+
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
124375
|
+
},
|
|
124376
|
+
{
|
|
124377
|
+
"module": "soma-foundation",
|
|
124378
|
+
"file": "src/style/relative-color.ts",
|
|
124379
|
+
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
124380
|
+
},
|
|
124381
|
+
{
|
|
124382
|
+
"module": "soma-foundation",
|
|
124383
|
+
"file": "src/primitives/guard.ts",
|
|
124384
|
+
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
124385
|
+
},
|
|
124386
|
+
{
|
|
124387
|
+
"module": "soma-foundation",
|
|
124388
|
+
"file": "src/layout/types.ts",
|
|
124389
|
+
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
124390
|
+
},
|
|
124391
|
+
{
|
|
124392
|
+
"module": "soma-foundation",
|
|
124393
|
+
"file": "src/theme/palette.ts",
|
|
124394
|
+
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
124395
|
+
},
|
|
124396
|
+
{
|
|
124397
|
+
"module": "soma-testkit",
|
|
124398
|
+
"file": "src/mock/node/cli.mjs",
|
|
124399
|
+
"symbol": "SOMA_PIPELINE_LIMITS_MOCK"
|
|
124400
|
+
},
|
|
124401
|
+
{
|
|
124402
|
+
"module": "soma-testkit",
|
|
124403
|
+
"file": "src/mock/node/context.mjs",
|
|
124404
|
+
"symbol": "SOMA_PIPELINE_LIMITS_MOCK"
|
|
124405
|
+
},
|
|
124406
|
+
{
|
|
124407
|
+
"module": "soma-testkit",
|
|
124408
|
+
"file": "src/mock/node/process-lifecycle.mjs",
|
|
124409
|
+
"symbol": "SOMA_PIPELINE_LIMITS_MOCK"
|
|
124410
|
+
},
|
|
124411
|
+
{
|
|
124412
|
+
"module": "soma-testkit",
|
|
124413
|
+
"file": "src/mock/node/registry.mjs",
|
|
124414
|
+
"symbol": "SOMA_PIPELINE_LIMITS_MOCK"
|
|
124415
|
+
},
|
|
124416
|
+
{
|
|
124417
|
+
"module": "soma-testkit",
|
|
124418
|
+
"file": "src/mock/node/schema-generator.mjs",
|
|
124419
|
+
"symbol": "SOMA_PIPELINE_LIMITS_MOCK"
|
|
124420
|
+
},
|
|
124421
|
+
{
|
|
124422
|
+
"module": "soma-testkit",
|
|
124423
|
+
"file": "src/mock/testing/host-harness.mjs",
|
|
124424
|
+
"symbol": "SOMA_PIPELINE_LIMITS_MOCK"
|
|
124425
|
+
},
|
|
124426
|
+
{
|
|
124427
|
+
"module": "soma-ai",
|
|
124428
|
+
"file": "src/domain/ai-shared/AiLimits.ts",
|
|
124429
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI"
|
|
124430
|
+
},
|
|
124431
|
+
{
|
|
124432
|
+
"module": "soma-ai",
|
|
124433
|
+
"file": "src/domain/ai-shared/AiRuntimeConfig.ts",
|
|
124434
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI"
|
|
124435
|
+
},
|
|
124436
|
+
{
|
|
124437
|
+
"module": "soma-ai",
|
|
124438
|
+
"file": "src/domain/ai-shared/JsonlRetention.ts",
|
|
124439
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI"
|
|
124440
|
+
},
|
|
124441
|
+
{
|
|
124442
|
+
"module": "soma-ai",
|
|
124443
|
+
"file": "src/server/common/RateLimitBackend.ts",
|
|
124444
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI"
|
|
124445
|
+
},
|
|
124446
|
+
{
|
|
124447
|
+
"module": "soma-ai",
|
|
124448
|
+
"file": "src/server/common/RequestBodyLimit.ts",
|
|
124449
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI"
|
|
124450
|
+
},
|
|
124451
|
+
{
|
|
124452
|
+
"module": "soma-ai",
|
|
124453
|
+
"file": "src/server/services/ai-assistant/Chat.ts",
|
|
124454
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI"
|
|
124455
|
+
},
|
|
124456
|
+
{
|
|
124457
|
+
"module": "soma-ai",
|
|
124458
|
+
"file": "src/domain/ai-assistant/widget/AiChatHistoryStore.ts",
|
|
124459
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI"
|
|
124460
|
+
},
|
|
124461
|
+
{
|
|
124462
|
+
"module": "soma-ai",
|
|
124463
|
+
"file": "src/domain/ai-assistant/toolkit/AssistantToolRegistry.ts",
|
|
124464
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI"
|
|
124465
|
+
},
|
|
124466
|
+
{
|
|
124467
|
+
"module": "soma-ai",
|
|
124468
|
+
"file": "src/domain/ai-shared/TrustedRequestContext.ts",
|
|
124469
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI_RUNTIME"
|
|
124470
|
+
},
|
|
124471
|
+
{
|
|
124472
|
+
"module": "soma-ai",
|
|
124473
|
+
"file": "src/domain/ai-assistant/widget/mountAssistantWidget.ts",
|
|
124474
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI_RUNTIME"
|
|
124475
|
+
},
|
|
124476
|
+
{
|
|
124477
|
+
"module": "soma-ai",
|
|
124478
|
+
"file": "src/domain/ai-assistant/SuggestedPrompts.ts",
|
|
124479
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI_RUNTIME"
|
|
124480
|
+
},
|
|
124481
|
+
{
|
|
124482
|
+
"module": "soma-ai",
|
|
124483
|
+
"file": "src/domain/ai-assistant/page-operate/mountPageOperateEffect.ts",
|
|
124484
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI_RUNTIME"
|
|
124485
|
+
},
|
|
124486
|
+
{
|
|
124487
|
+
"module": "soma-ai",
|
|
124488
|
+
"file": "src/domain/ai-shared/AiRuntimeConfig.ts",
|
|
124489
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI_RUNTIME"
|
|
124490
|
+
},
|
|
124491
|
+
{
|
|
124492
|
+
"module": "soma-ai",
|
|
124493
|
+
"file": "src/domain/ai-shared/AiRunContext.ts",
|
|
124494
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI_RUNTIME"
|
|
124495
|
+
},
|
|
124496
|
+
{
|
|
124497
|
+
"module": "soma-ai-page",
|
|
124498
|
+
"file": "src/versions/limits.ts",
|
|
124499
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI_PAGE"
|
|
124500
|
+
},
|
|
124501
|
+
{
|
|
124502
|
+
"module": "soma-ai-page",
|
|
124503
|
+
"file": "src/GenerateLimits.ts",
|
|
124504
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI_PAGE"
|
|
124505
|
+
},
|
|
124506
|
+
{
|
|
124507
|
+
"module": "soma-ai-page",
|
|
124508
|
+
"file": "src/PageLimits.ts",
|
|
124509
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI_PAGE"
|
|
124510
|
+
},
|
|
124511
|
+
{
|
|
124512
|
+
"module": "soma-ui",
|
|
124513
|
+
"file": "src/app/submit.ts",
|
|
124514
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124515
|
+
},
|
|
124516
|
+
{
|
|
124517
|
+
"module": "soma-robot",
|
|
124518
|
+
"file": "src/common/limits.ts",
|
|
124519
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI_ROBOT"
|
|
124364
124520
|
}
|
|
124365
|
-
|
|
124366
|
-
|
|
124367
|
-
|
|
124368
|
-
|
|
124369
|
-
|
|
124370
|
-
|
|
124371
|
-
|
|
124372
|
-
|
|
124373
|
-
|
|
124374
|
-
|
|
124375
|
-
|
|
124376
|
-
|
|
124377
|
-
|
|
124378
|
-
|
|
124379
|
-
|
|
124380
|
-
|
|
124381
|
-
|
|
124382
|
-
|
|
124383
|
-
|
|
124384
|
-
|
|
124385
|
-
|
|
124386
|
-
|
|
124387
|
-
|
|
124388
|
-
|
|
124389
|
-
|
|
124521
|
+
],
|
|
124522
|
+
"registry": {
|
|
124523
|
+
"recordMaxBytes": 65536,
|
|
124524
|
+
"declarationMaxBytes": 131072,
|
|
124525
|
+
"assetMaxBytes": 2097152,
|
|
124526
|
+
"batchMaxPages": 200,
|
|
124527
|
+
"writeMaxBytes": 1048576
|
|
124528
|
+
},
|
|
124529
|
+
"cache": {
|
|
124530
|
+
"regionCapacity": 256,
|
|
124531
|
+
"generationCapacity": 256,
|
|
124532
|
+
"apiRecordCapacity": 512,
|
|
124533
|
+
"pageDeclarationCapacity": 64,
|
|
124534
|
+
"sourceAssetCapacity": 64,
|
|
124535
|
+
"publishedArtifactCapacity": 64,
|
|
124536
|
+
"watchFailLimit": 2,
|
|
124537
|
+
"serverFileMaxEntries": 512,
|
|
124538
|
+
"serverFileMaxBytes": 33554432,
|
|
124539
|
+
"serverDirMaxEntries": 256,
|
|
124540
|
+
"sourceRootAliasCapacity": 64
|
|
124541
|
+
},
|
|
124542
|
+
"runtimeCache": {
|
|
124543
|
+
"basis": "runtime \u7A7A\u95F4 L1 \u5185\u5B58 LRU \u7684\u6761\u76EE\u5BB9\u91CF\uFF08\u7F16\u8BD1\u7ED3\u679C\u4E0E\u6807\u51C6\u683C\u5F0F\u4EA7\u7269\u5404\u4E00\u6761\u76EE\uFF09\u4E0E\u9759\u6001\u9875\u5730\u5740\u6E05\u5355\u7684\u5F00\u53D1\u6001\u590D\u6838\u95F4\u9694\uFF1B\u5BB9\u91CF\u4E0D\u5C0F\u4E8E\u53D1\u5E03\u9875\u4EA7\u7269\u7F13\u5B58\u5BB9\u91CF\uFF08cache.publishedArtifactCapacity\uFF09\uFF0C\u56E0\u4E3A L1 \u8981\u5BB9\u5F97\u4E0B\u5DF2\u53D1\u5E03\u9875\u52A0\u4E0A\u8FD0\u884C\u671F\u6309 URL \u6CE8\u5165\u7684\u9875\uFF1B\u590D\u6838\u95F4\u9694\u8BA9\u65B0\u589E\u9759\u6001\u9875\u6700\u8FDF\u8FD9\u4E2A\u6BEB\u79D2\u6570\u540E\u8FDB\u5165\u5199\u5165\u671F\u51B2\u7A81\u5224\u5B9A\uFF08\u751F\u4EA7\u6001\u4E0D\u8FC7\u671F\uFF09\u3002\u8FC1\u5165\u524D\u662F soma-core store.ts \u7684 SOMA_RUNTIME_CACHE_ENTRIES_DEFAULT \u4E0E static-source.ts \u7684 DEV_TTL_MS",
|
|
124544
|
+
"pageCapacity": 256,
|
|
124545
|
+
"staticScanTtlMs": 1e3
|
|
124546
|
+
},
|
|
124547
|
+
"retry": {
|
|
124548
|
+
"casAttempts": 5,
|
|
124549
|
+
"archivePinAttempts": 3,
|
|
124550
|
+
"archiveRounds": 5,
|
|
124551
|
+
"publishRounds": 5
|
|
124552
|
+
},
|
|
124553
|
+
"fileLock": {
|
|
124554
|
+
"staleMs": 1e4,
|
|
124555
|
+
"maxWaitMs": 5e3,
|
|
124556
|
+
"waitSliceMs": 15
|
|
124557
|
+
},
|
|
124558
|
+
"pagedList": {
|
|
124559
|
+
"pageSizeDefault": 10,
|
|
124560
|
+
"pageSizeMax": 500
|
|
124561
|
+
},
|
|
124562
|
+
"writeRate": {
|
|
124563
|
+
"limit": 120,
|
|
124564
|
+
"windowMs": 6e4
|
|
124565
|
+
},
|
|
124566
|
+
"subscribe": {
|
|
124567
|
+
"maxSubscriptions": 8,
|
|
124568
|
+
"maxDebounceMs": 1e4,
|
|
124569
|
+
"defaultDebounceMs": 300
|
|
124570
|
+
},
|
|
124571
|
+
"inject": {
|
|
124572
|
+
"pageMaxBytes": 4194304,
|
|
124573
|
+
"batchFailureMessageMaxChars": 2e3
|
|
124574
|
+
},
|
|
124575
|
+
"execution": {
|
|
124576
|
+
"maxNodes": 128,
|
|
124577
|
+
"maxDeps": 128,
|
|
124578
|
+
"maxEdges": 1024,
|
|
124579
|
+
"maxConcurrency": {
|
|
124580
|
+
"default": 4,
|
|
124581
|
+
"max": 32
|
|
124582
|
+
},
|
|
124583
|
+
"maxAttempts": {
|
|
124584
|
+
"default": 3,
|
|
124585
|
+
"max": 32
|
|
124586
|
+
},
|
|
124587
|
+
"confirmMessageMax": 1e3,
|
|
124588
|
+
"path": {
|
|
124589
|
+
"maxSegments": 24,
|
|
124590
|
+
"segmentMaxLength": 128,
|
|
124591
|
+
"indexBound": 2e4
|
|
124592
|
+
},
|
|
124593
|
+
"inputMaxDepth": 16
|
|
124594
|
+
},
|
|
124595
|
+
"envelope": {
|
|
124596
|
+
"basis": {
|
|
124597
|
+
"titleMaxEm": "\u9875\u9762\u4FE1\u5C01 title \u7684\u663E\u793A\u5BBD\u5EA6\u4E0A\u9650\uFF0C\u5355\u4F4D em\uFF081em = \u4E00\u4E2A\u5168\u89D2\u5B57\uFF1B\u534A\u89D2\u5B57\u6309 content-layout#/contentDemand/charEm \u6298\u7B97\uFF0C\u62C9\u4E01\u7EA6 0.55em\uFF09\uFF0C\u5224\u5B9A\u89C1 reference/envelope-text-width.mjs\u3002\u53D6 32\uFF1A\u6309 16px \u6B63\u6587\u7EA6 512px\uFF0C\u4E0D\u8D85\u8FC7\u641C\u7D22\u7ED3\u679C\u4E0E\u6D4F\u89C8\u5668\u6807\u7B7E\u6807\u9898\u7684\u60EF\u5E38\u663E\u793A\u5BBD\uFF08\u7EA6 600px\uFF0C\u62C9\u4E01\u7EA6 58 \u5B57\u3001\u4E2D\u6587 32 \u5B57\uFF09\uFF0C\u6240\u4EE5\u540C\u4E00\u6761\u89C4\u5219\u5BF9\u4E2D\u82F1\u6587\u4E00\u81F4\u3002\u8FC1\u79FB\u524D\u662F\u300C24 \u4E2A\u7801\u70B9\u300D\uFF08e92f674a \u5F15\u5165\uFF0C\u65E0\u4F9D\u636E\u8BB0\u8F7D\uFF09\uFF0C\u4E2D\u6587 24 \u5B57\u7B49\u4E8E 24em\uFF0C\u653E\u5BBD\u540E\u4E2D\u6587\u4ECD\u901A\u8FC7\u3001\u82F1\u6587\u7531\u7EA6 24 \u5B57\u653E\u5230\u7EA6 58 \u5B57\u3002\u8BC1\u636E\u5F31\uFF1A600px \u6765\u81EA\u5BF9\u4E3B\u6D41\u641C\u7D22\u7ED3\u679C\u4E0E\u6807\u7B7E\u680F\u622A\u65AD\u60EF\u4F8B\u7684\u8BB0\u5FC6\uFF0C\u4ED3\u5E93\u6837\u672C\u53F0\u8D26\u65E0\u9875\u9762\u6807\u9898\u5B57\u6570\u6837\u672C\uFF0C\u672A\u5B9E\u6D4B",
|
|
124598
|
+
"subtitleMaxEm": "\u9875\u9762\u4FE1\u5C01 subtitle \u7684\u663E\u793A\u5BBD\u5EA6\u4E0A\u9650\uFF0C\u5355\u4F4D em\uFF0C\u53E3\u5F84\u540C titleMaxEm\u3002\u53D6 80\uFF1A\u9875\u5934\u526F\u6807\u9898\u5355\u884C\uFF0C80em \u6309 16px \u7EA6 1280px\uFF0C\u662F\u5E38\u89C1\u5185\u5BB9\u533A\u6700\u5927\u5BBD\u7684\u91CF\u7EA7\uFF1B\u4E0E BDL \u533A\u57DF empty \u6587\u6848 80 \u5B57\u4E0A\u9650\u540C\u91CF\u7EA7\u3002\u8FC1\u79FB\u524D\u662F\u300C60 \u4E2A\u7801\u70B9\u300D\uFF08\u540C\u6B21\u5F15\u5165\uFF0C\u65E0\u4F9D\u636E\u8BB0\u8F7D\uFF09\u3002\u8BC1\u636E\u5F31\uFF1A\u672A\u91CF\u8FC7\u771F\u5B9E\u9875\u5934\u526F\u6807\u9898\uFF0C\u53D6\u5355\u884C\u91CF\u7EA7"
|
|
124599
|
+
},
|
|
124600
|
+
"urlMaxLength": 256,
|
|
124601
|
+
"urlMaxSegments": 8,
|
|
124602
|
+
"segmentMaxLength": 63,
|
|
124603
|
+
"labelMaxLength": 32,
|
|
124604
|
+
"paramMaxLen": 200,
|
|
124605
|
+
"paramEnumValuesMax": 32,
|
|
124606
|
+
"intMaxDigits": 15,
|
|
124607
|
+
"queryMaxItems": 12,
|
|
124608
|
+
"titleMaxEm": 32,
|
|
124609
|
+
"subtitleMaxEm": 80,
|
|
124610
|
+
"descriptionMaxCodepoints": 160,
|
|
124611
|
+
"tagsMax": 8,
|
|
124612
|
+
"rolesMax": 16,
|
|
124613
|
+
"navOrderMax": 999,
|
|
124614
|
+
"navOrderDefault": 500,
|
|
124615
|
+
"navGroupMax": 7,
|
|
124616
|
+
"navDefaultGroup": "main",
|
|
124617
|
+
"expiresMaxDays": 30
|
|
124618
|
+
},
|
|
124619
|
+
"provenance": {
|
|
124620
|
+
"basis": {
|
|
124621
|
+
"maxBytes": "\u52A8\u6001\u63D0\u4EA4\u6EAF\u6E90\u6458\u8981\u7684\u5E8F\u5217\u5316\u5B57\u8282\u4E0A\u9650\uFF08JSON\uFF0CUTF-8\uFF09\u3002\u4F30\u7B97\uFF1A15 \u4E2A\u5B57\u6BB5\u540D\u4E0E\u7ED3\u6784\u7B26\u7EA6 0.3 KB\uFF1BrunId / parentRunId / toolCallId / turnId / actor / model \u516D\u4E2A\u6807\u8BC6\u5404\u6309 \u2264 64 \u5B57\u8282\u7EA6 0.4 KB\uFF1B\u4E03\u4E2A\u6458\u8981\uFF08sha256 \u5341\u516D\u8FDB\u5236\u524D\u7F00 16 \u5B57\u7B26\uFF0C\u6309 64 \u5B57\u7B26\u7559\u4F59\u91CF\uFF09\u7EA6 0.5 KB\uFF1BrepairKinds \u2264 16 \u9879 \xD7 \u2264 24 \u5B57\u8282\u3001gates \u2264 8 \u9879 \xD7 \u2264 24 \u5B57\u8282\u7EA6 0.6 KB\uFF1B\u5408\u8BA1\u7EA6 1.8 KB\uFF0C\u53D6 4096 \u7559\u7EA6 2.3 \u500D\u4F59\u91CF\u3002\u8BC1\u636E\u5F31\uFF1A\u6309\u5B57\u6BB5\u5F62\u72B6\u4F30\u7B97\uFF0C\u672A\u91CF\u8FC7\u771F\u5B9E\u8BB0\u5F55",
|
|
124622
|
+
"maxRepairKinds": "repairKinds \u6761\u6570\u4E0A\u9650\u3002\u4E00\u6B21\u751F\u6210\u81F3\u591A aiRuntime.generator.maxAiRequests = 3 \u8F6E\uFF0C\u6BCF\u8F6E\u7684\u4FEE\u590D\u79CD\u7C7B\u53D6\u81EA\u95F8\u95E8\u6BB5\u95ED\u96C6\uFF08output / schema / policy / compile / smoke / drift \u516D\u6BB5\uFF09\u4E0E\u7A7A\u8F93\u51FA\u91CD\u8BD5\uFF0C3 \u8F6E \xD7 6 \u6BB5 = 18\uFF1B\u53D6 16 \u4E3A\u6574\u6570\u6863\uFF0C\u8DB3\u591F\u5BB9\u7EB3\u5B9E\u9645\u51FA\u73B0\u7684\u7EC4\u5408",
|
|
124623
|
+
"maxGates": "gates \u6761\u6570\u4E0A\u9650\u3002\u95F8\u95E8\u73B0\u4E3A\u4E09\u6BB5\uFF08policy / dryRun / renderSmoke\uFF09\uFF0C\u53D6 8 \u7559\u51FA\u65B0\u589E\u95F8\u95E8\u7684\u7A7A\u95F4\uFF0C\u540C\u65F6\u6321\u4F4F\u585E\u5165\u5927\u6620\u5C04\u7684\u5199\u6CD5"
|
|
124624
|
+
},
|
|
124625
|
+
"maxBytes": 4096,
|
|
124626
|
+
"maxRepairKinds": 16,
|
|
124627
|
+
"maxGates": 8
|
|
124628
|
+
},
|
|
124629
|
+
"browserWeight": {
|
|
124630
|
+
"entryGzipBytes": {
|
|
124631
|
+
"soma-core/core/index.ts": 524288,
|
|
124632
|
+
"soma-core/core/client/runtime-entry.ts": 524288,
|
|
124633
|
+
"soma-ui/src/app/index.ts": 524288,
|
|
124634
|
+
"soma-kit/src/app/index.ts": 327680
|
|
124390
124635
|
}
|
|
124391
|
-
}
|
|
124392
|
-
|
|
124393
|
-
|
|
124394
|
-
|
|
124395
|
-
|
|
124396
|
-
|
|
124397
|
-
|
|
124398
|
-
|
|
124399
|
-
|
|
124400
|
-
|
|
124401
|
-
|
|
124402
|
-
|
|
124403
|
-
|
|
124404
|
-
|
|
124405
|
-
|
|
124406
|
-
|
|
124407
|
-
|
|
124408
|
-
|
|
124409
|
-
|
|
124410
|
-
|
|
124411
|
-
|
|
124412
|
-
|
|
124413
|
-
|
|
124414
|
-
|
|
124415
|
-
|
|
124416
|
-
|
|
124417
|
-
|
|
124418
|
-
|
|
124419
|
-
|
|
124420
|
-
|
|
124421
|
-
|
|
124422
|
-
|
|
124423
|
-
|
|
124424
|
-
|
|
124425
|
-
|
|
124426
|
-
|
|
124427
|
-
|
|
124428
|
-
|
|
124429
|
-
|
|
124430
|
-
|
|
124431
|
-
|
|
124432
|
-
|
|
124433
|
-
|
|
124434
|
-
|
|
124435
|
-
|
|
124436
|
-
|
|
124437
|
-
|
|
124438
|
-
|
|
124636
|
+
},
|
|
124637
|
+
"themeBudget": {
|
|
124638
|
+
"tokensBytes": 40960,
|
|
124639
|
+
"componentBytesPerPage": 163840,
|
|
124640
|
+
"overrideBlockBytes": 8192
|
|
124641
|
+
},
|
|
124642
|
+
"contentEngines": {
|
|
124643
|
+
"diff": {
|
|
124644
|
+
"basis": {
|
|
124645
|
+
"maxChars": "\u5355\u4E2A\u5DEE\u5F02\u8BA1\u7B97\u4E24\u4FA7\u5408\u8BA1\u5B57\u6570\u4E0A\u9650\uFF1B\u8D85\u9650\u4E0D\u8BA1\u7B97\u3001\u6574\u6BB5\u66FF\u6362\uFF08\u53C2\u8003\u6587\u672C\u5DEE\u5F02\u7EC4\u4EF6\u7B14\u8BB0 C.5\u300C\u5355\u4E2A\u5DEE\u5F02\u7EC4\u4EF6\u603B\u91CF 200 000 \u5B57\u300D\uFF0C\u5B9E\u6D4B 4\uFF1A\u4E07\u5B57\u7EA7\u9010\u5B57\u6BD4\u8F83\u9700\u8D85\u65F6\u4E0E\u9000\u5316\uFF09",
|
|
124646
|
+
"maxCharsPerCompare": "\u5355\u6B21\u8BCD\u7EA7\u6BD4\u8F83\uFF08\u4E00\u5BF9\u53E5\u5B50 / \u4E00\u6B21 diff \u8C03\u7528\uFF09\u4E24\u4FA7\u5408\u8BA1\u5B57\u6570\u4E0A\u9650\uFF08\u7B14\u8BB0 C.2 BaseOpts maxChars 20 000\uFF09",
|
|
124647
|
+
"timeoutMs": "\u4E00\u6B21 diffProse / diffItems \u7684\u603B\u65F6\u9650\uFF08\u6BEB\u79D2\uFF09\uFF0C\u540C VisualEditor timeout 1000\uFF08\u7B14\u8BB0 C.2\uFF09",
|
|
124648
|
+
"maxItems": "\u6761\u76EE\u5217\u8868\u5355\u4FA7\u6761\u76EE\u6570\u4E0A\u9650\uFF1B\u8D85\u9650\u4E0D\u9010\u6761\u6BD4\u8F83\uFF08\u7B14\u8BB0 C.5\u300C\u6761\u76EE 2 000 \u4E2A\u300D\uFF09",
|
|
124649
|
+
"moveDetectMaxChanged": "\u53D8\u5316\u6761\u76EE\uFF08\u589E + \u5220\uFF09\u8D85\u8FC7\u6B64\u6570\u4E0D\u505A\u79FB\u52A8\u68C0\u6D4B\uFF08\u7B14\u8BB0 C.2\uFF0Cwikidiff2 \u589E\u5220\u5408\u8BA1 > 100 \u4E0D\u68C0\u6D4B\u7684\u653E\u5BBD\u7248\uFF0C\u7ECF\u9A8C\u503C\uFF09",
|
|
124650
|
+
"pairAt": "\u53E5 / \u6BB5\u914D\u5BF9\u9608\u503C\uFF1A\u5B57\u7B26\u591A\u91CD\u96C6 Dice \u2265 \u6B64\u503C\u89C6\u4E3A\u6539\u5199\uFF08VisualEditor diffThreshold 0.5\uFF1B\u5B9E\u6D4B 3 \u7684\u6539\u5199\u53E5\u4E3A 0.84\u20130.89\uFF09",
|
|
124651
|
+
"rewriteBelow": "\u6574\u4F53\u76F8\u4F3C\u5EA6\u4F4E\u4E8E\u6B64\u503C\u6574\u6BB5\u66FF\u6362\uFF08\u7B49\u6548 VE keep < 0.5 \xD7 diff\uFF1B\u5B9E\u6D4B 2 \u7684 C3 \u6574\u53E5\u91CD\u5199\u7EA6 0.16\uFF09",
|
|
124652
|
+
"absorbOrphan": "\u5B64\u5B57\u5438\u6536\uFF1A\u5939\u5728\u4E24\u5904\u6539\u52A8\u95F4\u3001\u957F\u5EA6 \u2264 \u6B64\u503C\uFF08\u5B57\uFF09\u7684\u975E\u6807\u70B9\u76F8\u540C\u7247\u6BB5\u5E76\u5165\u6539\u52A8\uFF08\u5B9E\u6D4B 2 \u7684 C5\u300C\u671F\u300D\uFF09",
|
|
124653
|
+
"absorbOrphanMax": "\u8C03\u7528\u65B9\u53EF\u8C03\u7684\u5B64\u5B57\u5438\u6536\u4E0A\u9650\uFF08\u5B57\uFF09\uFF0C\u9632\u6B62\u628A\u6574\u53E5\u5438\u6210\u6539\u52A8",
|
|
124654
|
+
"titleAt": "\u65E0 key \u6761\u76EE\u6309\u6807\u9898\u914D\u5BF9\u7684\u76F8\u4F3C\u5EA6\u9608\u503C\uFF08\u7B14\u8BB0 C.2 ItemOpts.match.titleAt 0.6\uFF09",
|
|
124655
|
+
"bodyAt": "\u65E0 key \u6761\u76EE\u6309\u6B63\u6587\u914D\u5BF9\u7684\u76F8\u4F3C\u5EA6\u9608\u503C\uFF08\u7B14\u8BB0 C.2 ItemOpts.match.bodyAt 0.5\uFF09",
|
|
124656
|
+
"maxAlignTokens": "\u5E8F\u5217\u5BF9\u9F50\u7684\u4E0D\u540C\u952E\u6570\u4E0A\u9650\uFF08\u6BCF\u4E2A\u952E\u6620\u5C04\u4E3A\u4E00\u4E2A BMP \u79C1\u7528\u533A\u5B57\u7B26\uFF0CU+E000\u2013U+F8FF \u5171 6400 \u4E2A\uFF09",
|
|
124657
|
+
"maxPairMatrix": "\u4E00\u6BB5\u5220\u589E\u533A\u95F4\u5185\u53E5 / \u6BB5\u914D\u5BF9\u7684\u5019\u9009\u77E9\u9635\u4E0A\u9650\uFF08\u5220\u6570 \xD7 \u589E\u6570\uFF09\uFF0C\u8D85\u51FA\u4E0D\u914D\u5BF9\u3001\u6309\u5220 + \u589E\u5448\u73B0\uFF1B\u7ECF\u9A8C\u503C\uFF0C\u8BC1\u636E\u5F31",
|
|
124658
|
+
"maxPairCandidates": "\u65E0 key \u6761\u76EE\u6309\u76F8\u4F3C\u5EA6\u914D\u5BF9\u7684\u5019\u9009\u77E9\u9635\u4E0A\u9650\uFF08\u5269\u4F59\u65E7\u6761\u76EE \xD7 \u5269\u4F59\u65B0\u6761\u76EE\uFF09\uFF1B\u7ECF\u9A8C\u503C\uFF0C\u8BC1\u636E\u5F31",
|
|
124659
|
+
"codeContext": "\u4EE3\u7801\u5DEE\u5F02\u6BCF\u5757\u7684\u4E0A\u4E0B\u6587\u884C\u6570\uFF08\u7B14\u8BB0 C.5\u300C\u4E0A\u4E0B\u6587 3 \u884C\u300D\uFF0C\u540C git diff -U3 / VS Code\uFF09",
|
|
124660
|
+
"codeIntraMaxLine": "\u4EE3\u7801\u6539\u884C\u505A\u884C\u5185\u5B57\u7B26\u5DEE\u5F02\u7684\u5355\u884C\u957F\u5EA6\u4E0A\u9650\uFF08\u5B57\u7B26\uFF09\uFF1B\u66F4\u957F\u7684\u884C\u53EA\u6807\u6574\u884C\u589E\u5220\uFF08\u7ECF\u9A8C\u503C\uFF1A\u538B\u7F29\u540E\u7684\u957F\u884C\u9010\u5B57\u6BD4\u8F83\u65E0\u610F\u4E49\u4E14\u8017\u65F6\uFF09"
|
|
124661
|
+
},
|
|
124662
|
+
"maxChars": 2e5,
|
|
124663
|
+
"maxCharsPerCompare": 2e4,
|
|
124664
|
+
"timeoutMs": 1e3,
|
|
124665
|
+
"maxItems": 2e3,
|
|
124666
|
+
"moveDetectMaxChanged": 500,
|
|
124667
|
+
"pairAt": 0.5,
|
|
124668
|
+
"rewriteBelow": 0.4,
|
|
124669
|
+
"absorbOrphan": 1,
|
|
124670
|
+
"absorbOrphanMax": 4,
|
|
124671
|
+
"titleAt": 0.6,
|
|
124672
|
+
"bodyAt": 0.5,
|
|
124673
|
+
"maxAlignTokens": 6400,
|
|
124674
|
+
"maxPairMatrix": 2500,
|
|
124675
|
+
"maxPairCandidates": 25e4,
|
|
124676
|
+
"codeContext": 3,
|
|
124677
|
+
"codeIntraMaxLine": 500
|
|
124678
|
+
},
|
|
124679
|
+
"highlight": {
|
|
124680
|
+
"basis": {
|
|
124681
|
+
"maxLines": "\u9AD8\u4EAE\u7684\u6700\u591A\u884C\u6570\uFF1B\u8D85\u51FA\u90E8\u5206\u6309\u7EAF\u6587\u672C\uFF08\u53C2\u8003\u6587\u672C\u5DEE\u5F02\u7EC4\u4EF6\u7B14\u8BB0 C.2 \u7AEF\u53E3 2 maxLines 5 000\uFF09",
|
|
124682
|
+
"maxLineLength": "\u5355\u884C\u8D85\u8FC7\u6B64\u5B57\u7B26\u6570\u6574\u884C\u6309\u7EAF\u6587\u672C\uFF08\u7B14\u8BB0 C.2 maxLineLength 2 000\uFF0C\u538B\u7F29\u540E\u7684\u5355\u884C JS / JSON \u5E38\u89C1\uFF09",
|
|
124683
|
+
"timeoutMs": "\u4E00\u6B21\u89E3\u6790\u7684\u65F6\u9650\uFF08\u6BEB\u79D2\uFF09\uFF1BLezer \u6309 advance() \u5206\u6B65\u89E3\u6790\uFF0C\u8D85\u65F6\u6574\u6BB5\u6309\u7EAF\u6587\u672C\uFF08\u7ECF\u9A8C\u503C\uFF0C\u4E0E\u5DEE\u5F02\u7AEF\u53E3\u540C\u53D6 1 000\uFF09",
|
|
124684
|
+
"maxChars": "\u6574\u6BB5\u8D85\u8FC7\u6B64\u5B57\u7B26\u6570\u4E0D\u89E3\u6790\u3001\u6309\u7EAF\u6587\u672C\uFF08\u7ECF\u9A8C\u503C\uFF0C\u8BC1\u636E\u5F31\uFF1A\u7EA6 1 MB \u6587\u672C\uFF09",
|
|
124685
|
+
"jsonSniffMaxChars": "\u8BED\u8A00\u63A8\u65AD\u300C\u6574\u4F53\u80FD JSON.parse\u300D\u53EA\u5BF9\u4E0D\u8D85\u8FC7\u6B64\u5B57\u7B26\u6570\u7684\u6837\u672C\u505A\uFF08\u907F\u514D\u5BF9\u5927\u6587\u672C\u53CD\u590D\u89E3\u6790\uFF1B\u7ECF\u9A8C\u503C\uFF09"
|
|
124686
|
+
},
|
|
124687
|
+
"maxLines": 5e3,
|
|
124688
|
+
"maxLineLength": 2e3,
|
|
124689
|
+
"timeoutMs": 1e3,
|
|
124690
|
+
"maxChars": 1e6,
|
|
124691
|
+
"jsonSniffMaxChars": 2e5
|
|
124692
|
+
},
|
|
124693
|
+
"structured": {
|
|
124694
|
+
"basis": {
|
|
124695
|
+
"maxChars": "JSON / YAML \u539F\u6587\u8D85\u8FC7\u6B64\u5B57\u7B26\u6570\u4E0D\u89E3\u6790\u3001\u6309\u539F\u6587\u663E\u793A\uFF08\u4E0E\u4EE3\u7801\u9AD8\u4EAE\u7AEF\u53E3 maxChars \u540C\u53D6\u7EA6 1 MB\uFF1B\u7ECF\u9A8C\u503C\uFF0C\u8BC1\u636E\u5F31\uFF09",
|
|
124696
|
+
"maxNodes": "\u89E3\u6790\u540E\u503C\u7684\u8282\u70B9\u603B\u6570\u4E0A\u9650\uFF08\u5BF9\u8C61 / \u6570\u7EC4 / \u53F6\u5B50\u5404\u8BA1 1\uFF09\uFF1BYAML \u522B\u540D\u5C55\u5F00\u8D85\u9650\u5373\u6309 too-many-nodes \u964D\u7EA7\uFF0C\u9632\u300C\u5341\u4EBF\u7B11\u58F0\u300D\u5F0F\u522B\u540D\u70B8\u5F39\uFF08\u7ECF\u9A8C\u503C\uFF1A20 \u4E07\u8282\u70B9\u7EA6\u4E3A 1 MB \u7D27\u51D1 JSON \u7684\u91CF\u7EA7\uFF09"
|
|
124697
|
+
},
|
|
124698
|
+
"maxChars": 1e6,
|
|
124699
|
+
"maxNodes": 2e5
|
|
124700
|
+
},
|
|
124701
|
+
"markdown": {
|
|
124702
|
+
"basis": {
|
|
124703
|
+
"maxChars": "Markdown \u539F\u6587\u8D85\u8FC7\u6B64\u5B57\u7B26\u6570\u4E0D\u89E3\u6790\u3001\u6309\u7EAF\u6587\u672C\u663E\u793A\uFF08\u53C2\u8003\u6587\u672C\u5DEE\u5F02\u7EC4\u4EF6\u7B14\u8BB0 C.2 \u7AEF\u53E3 1 limits.maxChars 200 000\uFF09",
|
|
124704
|
+
"maxBlocks": "\u5757\u6570\u4E0A\u9650\uFF0C\u8D85\u51FA\u622A\u65AD\u5E76\u6807 truncated\uFF08\u7B14\u8BB0 C.2 maxBlocks 5 000\uFF09",
|
|
124705
|
+
"summaryChars": "meta.summary \u53D6\u53BB\u6807\u8BB0\u5168\u6587\u7684\u524D N \u5B57\uFF08\u7B14\u8BB0 C.2\u300C\u524D 80 \u5B57\u300D\uFF09"
|
|
124706
|
+
},
|
|
124707
|
+
"maxChars": 2e5,
|
|
124708
|
+
"maxBlocks": 5e3,
|
|
124709
|
+
"summaryChars": 80
|
|
124439
124710
|
}
|
|
124440
124711
|
}
|
|
124441
|
-
|
|
124442
|
-
|
|
124443
|
-
|
|
124444
|
-
|
|
124445
|
-
|
|
124446
|
-
|
|
124447
|
-
|
|
124448
|
-
const
|
|
124449
|
-
|
|
124450
|
-
|
|
124451
|
-
const units = pairAligned(aligned, ka2, kb, cfg.pairAt, cfg.maxPairMatrix);
|
|
124452
|
-
const frags = [];
|
|
124453
|
-
for (const u2 of units) {
|
|
124454
|
-
if (u2.op === "eq") frags.push({ op: "eq", v: sb[u2.b] });
|
|
124455
|
-
else if (u2.op === "del") frags.push({ op: "del", v: sa2[u2.a] });
|
|
124456
|
-
else if (u2.op === "ins") frags.push({ op: "ins", v: sb[u2.b] });
|
|
124457
|
-
else frags.push(...await diffWordsMapped(run, cfg, sa2[u2.a], sb[u2.b]));
|
|
124458
|
-
}
|
|
124459
|
-
return absorbOrphans(frags, cfg.absorbOrphan);
|
|
124712
|
+
};
|
|
124713
|
+
|
|
124714
|
+
// core/client/engines/diff/adapter-jsdiff.ts
|
|
124715
|
+
init_load();
|
|
124716
|
+
var wordSegmenter;
|
|
124717
|
+
function zhWordSegmenter() {
|
|
124718
|
+
if (wordSegmenter !== void 0) return wordSegmenter;
|
|
124719
|
+
const ctor = Intl.Segmenter;
|
|
124720
|
+
wordSegmenter = typeof ctor === "function" ? new ctor("zh", { granularity: "word" }) : null;
|
|
124721
|
+
return wordSegmenter;
|
|
124460
124722
|
}
|
|
124461
|
-
function
|
|
124462
|
-
|
|
124463
|
-
|
|
124464
|
-
|
|
124465
|
-
|
|
124466
|
-
|
|
124467
|
-
|
|
124468
|
-
|
|
124723
|
+
function createJsdiffAdapter(adapterOptions = {}) {
|
|
124724
|
+
const load2 = () => loadEngineModule("diff", () => Promise.resolve().then(() => (init_libesm(), libesm_exports)), { telemetry: adapterOptions.telemetry });
|
|
124725
|
+
return {
|
|
124726
|
+
async diff(a2, b2, mode, options) {
|
|
124727
|
+
const lib2 = await load2();
|
|
124728
|
+
const base3 = options?.timeoutMs !== void 0 ? { timeout: options.timeoutMs } : {};
|
|
124729
|
+
let changes;
|
|
124730
|
+
if (mode === "chars") changes = lib2.diffChars(a2, b2, base3);
|
|
124731
|
+
else if (mode === "words") changes = lib2.diffWords(a2, b2, base3);
|
|
124732
|
+
else if (mode === "words-zh") {
|
|
124733
|
+
const seg = zhWordSegmenter();
|
|
124734
|
+
changes = seg === null ? lib2.diffChars(a2, b2, base3) : lib2.diffWords(a2, b2, { ...base3, intlSegmenter: seg });
|
|
124735
|
+
} else changes = lib2.diffLines(a2, b2, options?.ignoreWhitespace === true ? { ...base3, ignoreWhitespace: true } : base3);
|
|
124736
|
+
if (changes === void 0) return null;
|
|
124737
|
+
const parts = [];
|
|
124738
|
+
for (const change of changes) {
|
|
124739
|
+
if (change.value === "") continue;
|
|
124740
|
+
parts.push({ op: change.added === true ? "insert" : change.removed === true ? "delete" : "equal", text: change.value });
|
|
124741
|
+
}
|
|
124742
|
+
return parts;
|
|
124469
124743
|
}
|
|
124470
|
-
if (blk.op === "ins" || blk.op === "del") changes += 1;
|
|
124471
|
-
else if (blk.op === "mod") changes += countChanges(blk.fragments);
|
|
124472
|
-
}
|
|
124473
|
-
return { insChars: ins, delChars: del, changes };
|
|
124474
|
-
}
|
|
124475
|
-
function similarityOf(blocks, aLen, bLen) {
|
|
124476
|
-
if (aLen + bLen === 0) return 1;
|
|
124477
|
-
let eq = 0;
|
|
124478
|
-
for (const blk of blocks) for (const f2 of blk.fragments) if (f2.op === "eq") eq += cpLen(f2.v.replace(/\s+/gu, ""));
|
|
124479
|
-
return Math.min(1, 2 * eq / (aLen + bLen));
|
|
124480
|
-
}
|
|
124481
|
-
var compact2 = (s2) => cpLen(s2.replace(/\s+/gu, ""));
|
|
124482
|
-
function rewriteBlocks(pa2, pb) {
|
|
124483
|
-
return [...pa2.map((v4) => ({ op: "del", fragments: [{ op: "del", v: v4 }] })), ...pb.map((v4) => ({ op: "ins", fragments: [{ op: "ins", v: v4 }] }))];
|
|
124484
|
-
}
|
|
124485
|
-
async function runProse(run, cfg, a2, b2) {
|
|
124486
|
-
const pa2 = splitParagraphs(a2);
|
|
124487
|
-
const pb = splitParagraphs(b2);
|
|
124488
|
-
const granularity = () => run.usedChars ? "chars" : run.usedZh ? "words-zh" : hasHan(a2) || hasHan(b2) ? hasSegmenter() ? "words-zh" : "chars" : "words";
|
|
124489
|
-
const aLen = compact2(a2);
|
|
124490
|
-
const bLen = compact2(b2);
|
|
124491
|
-
const finish = (kind, blocks2, formatOnly = false) => {
|
|
124492
|
-
const stats = statsOf(blocks2);
|
|
124493
|
-
const out2 = { kind, formatOnly, similarity: kind === "same" ? 1 : similarityOf(blocks2, aLen, bLen), blocks: blocks2, stats, granularity: granularity() };
|
|
124494
|
-
return run.degraded !== void 0 ? { ...out2, degraded: run.degraded } : out2;
|
|
124495
124744
|
};
|
|
124496
|
-
if (a2.length + b2.length > cfg.maxChars) {
|
|
124497
|
-
run.degraded = "too-large";
|
|
124498
|
-
return finish(pa2.length > 0 && pb.length > 0 ? "rewrite" : "inline", rewriteBlocks(pa2, pb));
|
|
124499
|
-
}
|
|
124500
|
-
const ka2 = pa2.map((p2) => normalizeWithMap(p2, cfg).text);
|
|
124501
|
-
const kb = pb.map((p2) => normalizeWithMap(p2, cfg).text);
|
|
124502
|
-
if (ka2.length === kb.length && ka2.every((k2, i2) => k2 === kb[i2])) {
|
|
124503
|
-
return finish("same", pb.map((v4) => ({ op: "eq", fragments: [{ op: "eq", v: v4 }] })), a2 !== b2);
|
|
124504
|
-
}
|
|
124505
|
-
if (pa2.length === 0 || pb.length === 0) return finish("inline", rewriteBlocks(pa2, pb));
|
|
124506
|
-
const aligned = await alignKeys(run, ka2, kb, cfg.maxAlignTokens);
|
|
124507
|
-
if (aligned === null) return finish("rewrite", rewriteBlocks(pa2, pb));
|
|
124508
|
-
const units = pairAligned(aligned, ka2, kb, cfg.pairAt, cfg.maxPairMatrix);
|
|
124509
|
-
const blocks = [];
|
|
124510
|
-
for (const u2 of units) {
|
|
124511
|
-
if (u2.op === "eq") blocks.push({ op: "eq", fragments: [{ op: "eq", v: pb[u2.b] }] });
|
|
124512
|
-
else if (u2.op === "del") blocks.push({ op: "del", fragments: [{ op: "del", v: pa2[u2.a] }] });
|
|
124513
|
-
else if (u2.op === "ins") blocks.push({ op: "ins", fragments: [{ op: "ins", v: pb[u2.b] }] });
|
|
124514
|
-
else blocks.push({ op: "mod", fragments: await diffParagraph(run, cfg, pa2[u2.a], pb[u2.b]) });
|
|
124515
|
-
}
|
|
124516
|
-
const sim = similarityOf(blocks, aLen, bLen);
|
|
124517
|
-
if (sim < cfg.rewriteBelow) return finish("rewrite", rewriteBlocks(pa2, pb));
|
|
124518
|
-
return finish("inline", blocks);
|
|
124519
124745
|
}
|
|
124520
124746
|
|
|
124521
124747
|
// core/client/engines/diff/items.ts
|
|
@@ -124745,6 +124971,16 @@ function configOf(o2) {
|
|
|
124745
124971
|
maxPairCandidates: LIMITS.maxPairCandidates
|
|
124746
124972
|
};
|
|
124747
124973
|
}
|
|
124974
|
+
function codeConfigOf(o2) {
|
|
124975
|
+
return {
|
|
124976
|
+
maxChars: LIMITS.maxChars,
|
|
124977
|
+
maxAlignTokens: LIMITS.maxAlignTokens,
|
|
124978
|
+
maxPairMatrix: LIMITS.maxPairMatrix,
|
|
124979
|
+
pairAt: LIMITS.pairAt,
|
|
124980
|
+
context: typeof o2?.context === "number" && Number.isInteger(o2.context) && o2.context >= 0 ? Math.min(o2.context, LIMITS.codeContext) : LIMITS.codeContext,
|
|
124981
|
+
intraMaxLine: LIMITS.codeIntraMaxLine
|
|
124982
|
+
};
|
|
124983
|
+
}
|
|
124748
124984
|
function wholeReplace(a2, b2) {
|
|
124749
124985
|
if (a2 === b2) return a2 === "" ? [] : [{ op: "equal", text: a2 }];
|
|
124750
124986
|
const parts = [];
|
|
@@ -124793,6 +125029,18 @@ function createDiffPort(adapter2, options = {}) {
|
|
|
124793
125029
|
});
|
|
124794
125030
|
record2("items", started);
|
|
124795
125031
|
return out2;
|
|
125032
|
+
},
|
|
125033
|
+
async diffCode(a2, b2, codeOptions) {
|
|
125034
|
+
const started = clock();
|
|
125035
|
+
const out2 = await runCode(newRun(codeOptions?.timeoutMs), codeConfigOf(codeOptions), textOrEmpty(a2), textOrEmpty(b2));
|
|
125036
|
+
record2("code", started);
|
|
125037
|
+
return out2;
|
|
125038
|
+
},
|
|
125039
|
+
async diffMarkdown(a2, b2, mdOptions) {
|
|
125040
|
+
const started = clock();
|
|
125041
|
+
const out2 = await runMarkdown(newRun(mdOptions?.timeoutMs), { ...codeConfigOf(mdOptions), maxBlocks: LIMITS.maxItems }, textOrEmpty(a2), textOrEmpty(b2));
|
|
125042
|
+
record2("markdown", started);
|
|
125043
|
+
return out2;
|
|
124796
125044
|
}
|
|
124797
125045
|
};
|
|
124798
125046
|
}
|