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
package/dist/core/index.cjs
CHANGED
|
@@ -124861,726 +124861,6 @@ function assertDiffAdapter(adapter) {
|
|
|
124861
124861
|
assertAdapterMethods("diff", adapter, ["diff"]);
|
|
124862
124862
|
}
|
|
124863
124863
|
|
|
124864
|
-
// core/client/engines/diff/index.ts
|
|
124865
|
-
init_engine_error();
|
|
124866
|
-
|
|
124867
|
-
// core/shared/registry-generated/limits.ts
|
|
124868
|
-
var SOMA_PIPELINE_LIMITS = {
|
|
124869
|
-
"id": "limits",
|
|
124870
|
-
"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",
|
|
124871
|
-
"readBy": [
|
|
124872
|
-
{
|
|
124873
|
-
"module": "soma-ui",
|
|
124874
|
-
"file": "src/compiler/styling/theme/orchestrate/budget.ts",
|
|
124875
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124876
|
-
},
|
|
124877
|
-
{
|
|
124878
|
-
"module": "soma-ui",
|
|
124879
|
-
"file": "src/shared/data-scale.ts",
|
|
124880
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124881
|
-
},
|
|
124882
|
-
{
|
|
124883
|
-
"module": "soma-ui",
|
|
124884
|
-
"file": "src/compiler/need/families/browse-layout.ts",
|
|
124885
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124886
|
-
},
|
|
124887
|
-
{
|
|
124888
|
-
"module": "soma-ui",
|
|
124889
|
-
"file": "src/compiler/need/families/browse-dims.ts",
|
|
124890
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124891
|
-
},
|
|
124892
|
-
{
|
|
124893
|
-
"module": "soma-ui",
|
|
124894
|
-
"file": "src/compiler/need/families/browse-conditions.ts",
|
|
124895
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124896
|
-
},
|
|
124897
|
-
{
|
|
124898
|
-
"module": "soma-ui",
|
|
124899
|
-
"file": "src/compiler/need/families/compare.ts",
|
|
124900
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124901
|
-
},
|
|
124902
|
-
{
|
|
124903
|
-
"module": "soma-ui",
|
|
124904
|
-
"file": "src/compiler/need/families/monitor.ts",
|
|
124905
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124906
|
-
},
|
|
124907
|
-
{
|
|
124908
|
-
"module": "soma-ui",
|
|
124909
|
-
"file": "src/compiler/need/families/inspect-relation.ts",
|
|
124910
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124911
|
-
},
|
|
124912
|
-
{
|
|
124913
|
-
"module": "soma-ui",
|
|
124914
|
-
"file": "src/compiler/trace/trace.types.ts",
|
|
124915
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124916
|
-
},
|
|
124917
|
-
{
|
|
124918
|
-
"module": "soma-ui",
|
|
124919
|
-
"file": "src/units/compose-check.ts",
|
|
124920
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124921
|
-
},
|
|
124922
|
-
{
|
|
124923
|
-
"module": "soma-ui",
|
|
124924
|
-
"file": "src/shared/field-components.ts",
|
|
124925
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124926
|
-
},
|
|
124927
|
-
{
|
|
124928
|
-
"module": "soma-ui",
|
|
124929
|
-
"file": "src/data-kit/filter-model/filter.ts",
|
|
124930
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124931
|
-
},
|
|
124932
|
-
{
|
|
124933
|
-
"module": "soma-ui",
|
|
124934
|
-
"file": "src/data-kit/views/tree.ts",
|
|
124935
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124936
|
-
},
|
|
124937
|
-
{
|
|
124938
|
-
"module": "soma-ui",
|
|
124939
|
-
"file": "src/compiler/certify/certificate.ts",
|
|
124940
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124941
|
-
},
|
|
124942
|
-
{
|
|
124943
|
-
"module": "soma-ui",
|
|
124944
|
-
"file": "src/compiler/certify/explain-format.ts",
|
|
124945
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124946
|
-
},
|
|
124947
|
-
{
|
|
124948
|
-
"module": "soma-ui",
|
|
124949
|
-
"file": "src/compiler/context/compile-context.ts",
|
|
124950
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124951
|
-
},
|
|
124952
|
-
{
|
|
124953
|
-
"module": "soma-ui",
|
|
124954
|
-
"file": "src/compiler/driver/cache/region-cache.ts",
|
|
124955
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124956
|
-
},
|
|
124957
|
-
{
|
|
124958
|
-
"module": "soma-ui",
|
|
124959
|
-
"file": "src/compiler/compose/plan.ts",
|
|
124960
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124961
|
-
},
|
|
124962
|
-
{
|
|
124963
|
-
"module": "soma-ui",
|
|
124964
|
-
"file": "src/app/server.ts",
|
|
124965
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124966
|
-
},
|
|
124967
|
-
{
|
|
124968
|
-
"module": "soma-core",
|
|
124969
|
-
"file": "core/server/registry/api-registry-store.ts",
|
|
124970
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124971
|
-
},
|
|
124972
|
-
{
|
|
124973
|
-
"module": "soma-core",
|
|
124974
|
-
"file": "core/client/engines/diff/index.ts",
|
|
124975
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124976
|
-
},
|
|
124977
|
-
{
|
|
124978
|
-
"module": "soma-core",
|
|
124979
|
-
"file": "core/client/engines/highlight/index.ts",
|
|
124980
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124981
|
-
},
|
|
124982
|
-
{
|
|
124983
|
-
"module": "soma-core",
|
|
124984
|
-
"file": "core/server/registry/page-registry-store.ts",
|
|
124985
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124986
|
-
},
|
|
124987
|
-
{
|
|
124988
|
-
"module": "soma-core",
|
|
124989
|
-
"file": "core/server/registry/asset-store.ts",
|
|
124990
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124991
|
-
},
|
|
124992
|
-
{
|
|
124993
|
-
"module": "soma-core",
|
|
124994
|
-
"file": "core/server/registry/batch-stage.ts",
|
|
124995
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
124996
|
-
},
|
|
124997
|
-
{
|
|
124998
|
-
"module": "soma-core",
|
|
124999
|
-
"file": "core/server/registry/request-body-limit.ts",
|
|
125000
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125001
|
-
},
|
|
125002
|
-
{
|
|
125003
|
-
"module": "soma-core",
|
|
125004
|
-
"file": "core/server/registry/registry-file-lock.ts",
|
|
125005
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125006
|
-
},
|
|
125007
|
-
{
|
|
125008
|
-
"module": "soma-core",
|
|
125009
|
-
"file": "core/server/api/paged-list.ts",
|
|
125010
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125011
|
-
},
|
|
125012
|
-
{
|
|
125013
|
-
"module": "soma-core",
|
|
125014
|
-
"file": "core/server/registry/registry-write-pipeline.ts",
|
|
125015
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125016
|
-
},
|
|
125017
|
-
{
|
|
125018
|
-
"module": "soma-core",
|
|
125019
|
-
"file": "core/server/registry/page-registry-repository.ts",
|
|
125020
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125021
|
-
},
|
|
125022
|
-
{
|
|
125023
|
-
"module": "soma-core",
|
|
125024
|
-
"file": "core/server/registry/source/version-store.ts",
|
|
125025
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125026
|
-
},
|
|
125027
|
-
{
|
|
125028
|
-
"module": "soma-core",
|
|
125029
|
-
"file": "core/server/runtime-space/inject.ts",
|
|
125030
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125031
|
-
},
|
|
125032
|
-
{
|
|
125033
|
-
"module": "soma-ui",
|
|
125034
|
-
"file": "src/compiler/bdl/registry/archive.ts",
|
|
125035
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125036
|
-
},
|
|
125037
|
-
{
|
|
125038
|
-
"module": "soma-ui",
|
|
125039
|
-
"file": "src/compiler/bdl/registry/publish.ts",
|
|
125040
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125041
|
-
},
|
|
125042
|
-
{
|
|
125043
|
-
"module": "soma-core",
|
|
125044
|
-
"file": "core/server/host/published-page-artifact-cache.ts",
|
|
125045
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125046
|
-
},
|
|
125047
|
-
{
|
|
125048
|
-
"module": "soma-core",
|
|
125049
|
-
"file": "core/server/runtime-space/store.ts",
|
|
125050
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125051
|
-
},
|
|
125052
|
-
{
|
|
125053
|
-
"module": "soma-core",
|
|
125054
|
-
"file": "core/server/runtime-space/static-source.ts",
|
|
125055
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125056
|
-
},
|
|
125057
|
-
{
|
|
125058
|
-
"module": "soma-core",
|
|
125059
|
-
"file": "core/server/runtime-space/dynamic-pages.ts",
|
|
125060
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125061
|
-
},
|
|
125062
|
-
{
|
|
125063
|
-
"module": "soma-core",
|
|
125064
|
-
"file": "core/server/infra/cache/ServerFileCache.ts",
|
|
125065
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125066
|
-
},
|
|
125067
|
-
{
|
|
125068
|
-
"module": "soma-foundation",
|
|
125069
|
-
"file": "src/predicates/predicates.ts",
|
|
125070
|
-
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
125071
|
-
},
|
|
125072
|
-
{
|
|
125073
|
-
"module": "soma-core",
|
|
125074
|
-
"file": "core/client/base/SomaHttpClient.ts",
|
|
125075
|
-
"symbol": "SOMA_PIPELINE_HOST_HTTP_REQUEST_TIMEOUT_MS"
|
|
125076
|
-
},
|
|
125077
|
-
{
|
|
125078
|
-
"module": "soma-core",
|
|
125079
|
-
"file": "core/client/infra/http/SomaHttpService.ts",
|
|
125080
|
-
"symbol": "SOMA_PIPELINE_HOST_HTTP_REQUEST_TIMEOUT_MS"
|
|
125081
|
-
},
|
|
125082
|
-
{
|
|
125083
|
-
"module": "soma-core",
|
|
125084
|
-
"file": "core/client/runtime/SomaRuntimeServices.ts",
|
|
125085
|
-
"symbol": "SOMA_PIPELINE_HOST_HTTP_REQUEST_TIMEOUT_MS"
|
|
125086
|
-
},
|
|
125087
|
-
{
|
|
125088
|
-
"module": "soma-foundation",
|
|
125089
|
-
"file": "src/layout/flow-editor-geometry.ts",
|
|
125090
|
-
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
125091
|
-
},
|
|
125092
|
-
{
|
|
125093
|
-
"module": "soma-foundation",
|
|
125094
|
-
"file": "src/data/session/session-parser.ts",
|
|
125095
|
-
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
125096
|
-
},
|
|
125097
|
-
{
|
|
125098
|
-
"module": "soma-core",
|
|
125099
|
-
"file": "core/client/parser/subscribe-parser.ts",
|
|
125100
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125101
|
-
},
|
|
125102
|
-
{
|
|
125103
|
-
"module": "soma-foundation",
|
|
125104
|
-
"file": "src/data/declare/window-parser.ts",
|
|
125105
|
-
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
125106
|
-
},
|
|
125107
|
-
{
|
|
125108
|
-
"module": "soma-foundation",
|
|
125109
|
-
"file": "src/data/runtime/region-query-defaults.ts",
|
|
125110
|
-
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
125111
|
-
},
|
|
125112
|
-
{
|
|
125113
|
-
"module": "soma-ui",
|
|
125114
|
-
"file": "src/data-std/execution-parser.ts",
|
|
125115
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125116
|
-
},
|
|
125117
|
-
{
|
|
125118
|
-
"module": "soma-ui",
|
|
125119
|
-
"file": "src/data-std/embed-path.ts",
|
|
125120
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125121
|
-
},
|
|
125122
|
-
{
|
|
125123
|
-
"module": "soma-core",
|
|
125124
|
-
"file": "core/shared/page-envelope.ts",
|
|
125125
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125126
|
-
},
|
|
125127
|
-
{
|
|
125128
|
-
"module": "soma-core",
|
|
125129
|
-
"file": "core/server/runtime-space/nav-catalog.ts",
|
|
125130
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125131
|
-
},
|
|
125132
|
-
{
|
|
125133
|
-
"module": "soma-ui",
|
|
125134
|
-
"file": "src/compiler/contract/tiers.ts",
|
|
125135
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125136
|
-
},
|
|
125137
|
-
{
|
|
125138
|
-
"module": "soma-ui",
|
|
125139
|
-
"file": "src/compiler/compose/families/monitor.ts",
|
|
125140
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125141
|
-
},
|
|
125142
|
-
{
|
|
125143
|
-
"module": "soma-ui",
|
|
125144
|
-
"file": "src/compiler/compose/families/navigate.ts",
|
|
125145
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125146
|
-
},
|
|
125147
|
-
{
|
|
125148
|
-
"module": "soma-ui",
|
|
125149
|
-
"file": "src/compiler/compose/match-unit.ts",
|
|
125150
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125151
|
-
},
|
|
125152
|
-
{
|
|
125153
|
-
"module": "soma-ui",
|
|
125154
|
-
"file": "src/compiler/compose/plan.ts",
|
|
125155
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125156
|
-
},
|
|
125157
|
-
{
|
|
125158
|
-
"module": "soma-ui",
|
|
125159
|
-
"file": "src/compiler/compose/recipe-expand.ts",
|
|
125160
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125161
|
-
},
|
|
125162
|
-
{
|
|
125163
|
-
"module": "soma-ui",
|
|
125164
|
-
"file": "src/compiler/settle/control-form.ts",
|
|
125165
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125166
|
-
},
|
|
125167
|
-
{
|
|
125168
|
-
"module": "soma-ui",
|
|
125169
|
-
"file": "src/compiler/space/spatial.ts",
|
|
125170
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125171
|
-
},
|
|
125172
|
-
{
|
|
125173
|
-
"module": "soma-ui",
|
|
125174
|
-
"file": "src/compiler/contract/generate.types.ts",
|
|
125175
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125176
|
-
},
|
|
125177
|
-
{
|
|
125178
|
-
"module": "soma-ui",
|
|
125179
|
-
"file": "src/data-kit/filter-model/presets.ts",
|
|
125180
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125181
|
-
},
|
|
125182
|
-
{
|
|
125183
|
-
"module": "soma-ui",
|
|
125184
|
-
"file": "src/data-kit/filter-model/url-state.ts",
|
|
125185
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125186
|
-
},
|
|
125187
|
-
{
|
|
125188
|
-
"module": "soma-ui",
|
|
125189
|
-
"file": "src/data-kit/notice.ts",
|
|
125190
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125191
|
-
},
|
|
125192
|
-
{
|
|
125193
|
-
"module": "soma-ui",
|
|
125194
|
-
"file": "src/data-kit/views/records.ts",
|
|
125195
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125196
|
-
},
|
|
125197
|
-
{
|
|
125198
|
-
"module": "soma-foundation",
|
|
125199
|
-
"file": "src/layout/host-defaults.ts",
|
|
125200
|
-
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
125201
|
-
},
|
|
125202
|
-
{
|
|
125203
|
-
"module": "soma-foundation",
|
|
125204
|
-
"file": "src/values/index.ts",
|
|
125205
|
-
"symbol": "SOMA_PIPELINE_HOST_HTTP_REQUEST_TIMEOUT_MS"
|
|
125206
|
-
},
|
|
125207
|
-
{
|
|
125208
|
-
"module": "soma-kit",
|
|
125209
|
-
"file": "src/app/define-kit-actions.ts",
|
|
125210
|
-
"symbol": "SOMA_PIPELINE_HOST_HTTP_REQUEST_TIMEOUT_MS"
|
|
125211
|
-
},
|
|
125212
|
-
{
|
|
125213
|
-
"module": "soma-foundation",
|
|
125214
|
-
"file": "src/style/audit-state-distinct.ts",
|
|
125215
|
-
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
125216
|
-
},
|
|
125217
|
-
{
|
|
125218
|
-
"module": "soma-foundation",
|
|
125219
|
-
"file": "src/style/relative-color.ts",
|
|
125220
|
-
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
125221
|
-
},
|
|
125222
|
-
{
|
|
125223
|
-
"module": "soma-foundation",
|
|
125224
|
-
"file": "src/primitives/guard.ts",
|
|
125225
|
-
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
125226
|
-
},
|
|
125227
|
-
{
|
|
125228
|
-
"module": "soma-foundation",
|
|
125229
|
-
"file": "src/layout/types.ts",
|
|
125230
|
-
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
125231
|
-
},
|
|
125232
|
-
{
|
|
125233
|
-
"module": "soma-foundation",
|
|
125234
|
-
"file": "src/theme/palette.ts",
|
|
125235
|
-
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
125236
|
-
},
|
|
125237
|
-
{
|
|
125238
|
-
"module": "soma-testkit",
|
|
125239
|
-
"file": "src/mock/node/cli.mjs",
|
|
125240
|
-
"symbol": "SOMA_PIPELINE_LIMITS_MOCK"
|
|
125241
|
-
},
|
|
125242
|
-
{
|
|
125243
|
-
"module": "soma-testkit",
|
|
125244
|
-
"file": "src/mock/node/context.mjs",
|
|
125245
|
-
"symbol": "SOMA_PIPELINE_LIMITS_MOCK"
|
|
125246
|
-
},
|
|
125247
|
-
{
|
|
125248
|
-
"module": "soma-testkit",
|
|
125249
|
-
"file": "src/mock/node/process-lifecycle.mjs",
|
|
125250
|
-
"symbol": "SOMA_PIPELINE_LIMITS_MOCK"
|
|
125251
|
-
},
|
|
125252
|
-
{
|
|
125253
|
-
"module": "soma-testkit",
|
|
125254
|
-
"file": "src/mock/node/registry.mjs",
|
|
125255
|
-
"symbol": "SOMA_PIPELINE_LIMITS_MOCK"
|
|
125256
|
-
},
|
|
125257
|
-
{
|
|
125258
|
-
"module": "soma-testkit",
|
|
125259
|
-
"file": "src/mock/node/schema-generator.mjs",
|
|
125260
|
-
"symbol": "SOMA_PIPELINE_LIMITS_MOCK"
|
|
125261
|
-
},
|
|
125262
|
-
{
|
|
125263
|
-
"module": "soma-testkit",
|
|
125264
|
-
"file": "src/mock/testing/host-harness.mjs",
|
|
125265
|
-
"symbol": "SOMA_PIPELINE_LIMITS_MOCK"
|
|
125266
|
-
},
|
|
125267
|
-
{
|
|
125268
|
-
"module": "soma-ai",
|
|
125269
|
-
"file": "src/domain/ai-shared/AiLimits.ts",
|
|
125270
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI"
|
|
125271
|
-
},
|
|
125272
|
-
{
|
|
125273
|
-
"module": "soma-ai",
|
|
125274
|
-
"file": "src/domain/ai-shared/AiRuntimeConfig.ts",
|
|
125275
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI"
|
|
125276
|
-
},
|
|
125277
|
-
{
|
|
125278
|
-
"module": "soma-ai",
|
|
125279
|
-
"file": "src/domain/ai-shared/JsonlRetention.ts",
|
|
125280
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI"
|
|
125281
|
-
},
|
|
125282
|
-
{
|
|
125283
|
-
"module": "soma-ai",
|
|
125284
|
-
"file": "src/server/common/RateLimitBackend.ts",
|
|
125285
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI"
|
|
125286
|
-
},
|
|
125287
|
-
{
|
|
125288
|
-
"module": "soma-ai",
|
|
125289
|
-
"file": "src/server/common/RequestBodyLimit.ts",
|
|
125290
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI"
|
|
125291
|
-
},
|
|
125292
|
-
{
|
|
125293
|
-
"module": "soma-ai",
|
|
125294
|
-
"file": "src/server/services/ai-assistant/Chat.ts",
|
|
125295
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI"
|
|
125296
|
-
},
|
|
125297
|
-
{
|
|
125298
|
-
"module": "soma-ai",
|
|
125299
|
-
"file": "src/domain/ai-assistant/widget/AiChatHistoryStore.ts",
|
|
125300
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI"
|
|
125301
|
-
},
|
|
125302
|
-
{
|
|
125303
|
-
"module": "soma-ai",
|
|
125304
|
-
"file": "src/domain/ai-assistant/toolkit/AssistantToolRegistry.ts",
|
|
125305
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI"
|
|
125306
|
-
},
|
|
125307
|
-
{
|
|
125308
|
-
"module": "soma-ai",
|
|
125309
|
-
"file": "src/domain/ai-shared/TrustedRequestContext.ts",
|
|
125310
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI_RUNTIME"
|
|
125311
|
-
},
|
|
125312
|
-
{
|
|
125313
|
-
"module": "soma-ai",
|
|
125314
|
-
"file": "src/domain/ai-assistant/widget/mountAssistantWidget.ts",
|
|
125315
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI_RUNTIME"
|
|
125316
|
-
},
|
|
125317
|
-
{
|
|
125318
|
-
"module": "soma-ai",
|
|
125319
|
-
"file": "src/domain/ai-assistant/SuggestedPrompts.ts",
|
|
125320
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI_RUNTIME"
|
|
125321
|
-
},
|
|
125322
|
-
{
|
|
125323
|
-
"module": "soma-ai",
|
|
125324
|
-
"file": "src/domain/ai-assistant/page-operate/mountPageOperateEffect.ts",
|
|
125325
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI_RUNTIME"
|
|
125326
|
-
},
|
|
125327
|
-
{
|
|
125328
|
-
"module": "soma-ai",
|
|
125329
|
-
"file": "src/domain/ai-shared/AiRuntimeConfig.ts",
|
|
125330
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI_RUNTIME"
|
|
125331
|
-
},
|
|
125332
|
-
{
|
|
125333
|
-
"module": "soma-ai",
|
|
125334
|
-
"file": "src/domain/ai-shared/AiRunContext.ts",
|
|
125335
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI_RUNTIME"
|
|
125336
|
-
},
|
|
125337
|
-
{
|
|
125338
|
-
"module": "soma-ai-page",
|
|
125339
|
-
"file": "src/versions/limits.ts",
|
|
125340
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI_PAGE"
|
|
125341
|
-
},
|
|
125342
|
-
{
|
|
125343
|
-
"module": "soma-ai-page",
|
|
125344
|
-
"file": "src/GenerateLimits.ts",
|
|
125345
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI_PAGE"
|
|
125346
|
-
},
|
|
125347
|
-
{
|
|
125348
|
-
"module": "soma-ai-page",
|
|
125349
|
-
"file": "src/PageLimits.ts",
|
|
125350
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI_PAGE"
|
|
125351
|
-
},
|
|
125352
|
-
{
|
|
125353
|
-
"module": "soma-ui",
|
|
125354
|
-
"file": "src/app/submit.ts",
|
|
125355
|
-
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125356
|
-
},
|
|
125357
|
-
{
|
|
125358
|
-
"module": "soma-robot",
|
|
125359
|
-
"file": "src/common/limits.ts",
|
|
125360
|
-
"symbol": "SOMA_PIPELINE_LIMITS_AI_ROBOT"
|
|
125361
|
-
}
|
|
125362
|
-
],
|
|
125363
|
-
"registry": {
|
|
125364
|
-
"recordMaxBytes": 65536,
|
|
125365
|
-
"declarationMaxBytes": 131072,
|
|
125366
|
-
"assetMaxBytes": 2097152,
|
|
125367
|
-
"batchMaxPages": 200,
|
|
125368
|
-
"writeMaxBytes": 1048576
|
|
125369
|
-
},
|
|
125370
|
-
"cache": {
|
|
125371
|
-
"regionCapacity": 256,
|
|
125372
|
-
"generationCapacity": 256,
|
|
125373
|
-
"apiRecordCapacity": 512,
|
|
125374
|
-
"pageDeclarationCapacity": 64,
|
|
125375
|
-
"sourceAssetCapacity": 64,
|
|
125376
|
-
"publishedArtifactCapacity": 64,
|
|
125377
|
-
"watchFailLimit": 2,
|
|
125378
|
-
"serverFileMaxEntries": 512,
|
|
125379
|
-
"serverFileMaxBytes": 33554432,
|
|
125380
|
-
"serverDirMaxEntries": 256,
|
|
125381
|
-
"sourceRootAliasCapacity": 64
|
|
125382
|
-
},
|
|
125383
|
-
"runtimeCache": {
|
|
125384
|
-
"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",
|
|
125385
|
-
"pageCapacity": 256,
|
|
125386
|
-
"staticScanTtlMs": 1e3
|
|
125387
|
-
},
|
|
125388
|
-
"retry": {
|
|
125389
|
-
"casAttempts": 5,
|
|
125390
|
-
"archivePinAttempts": 3,
|
|
125391
|
-
"archiveRounds": 5,
|
|
125392
|
-
"publishRounds": 5
|
|
125393
|
-
},
|
|
125394
|
-
"fileLock": {
|
|
125395
|
-
"staleMs": 1e4,
|
|
125396
|
-
"maxWaitMs": 5e3,
|
|
125397
|
-
"waitSliceMs": 15
|
|
125398
|
-
},
|
|
125399
|
-
"pagedList": {
|
|
125400
|
-
"pageSizeDefault": 10,
|
|
125401
|
-
"pageSizeMax": 500
|
|
125402
|
-
},
|
|
125403
|
-
"writeRate": {
|
|
125404
|
-
"limit": 120,
|
|
125405
|
-
"windowMs": 6e4
|
|
125406
|
-
},
|
|
125407
|
-
"subscribe": {
|
|
125408
|
-
"maxSubscriptions": 8,
|
|
125409
|
-
"maxDebounceMs": 1e4,
|
|
125410
|
-
"defaultDebounceMs": 300
|
|
125411
|
-
},
|
|
125412
|
-
"inject": {
|
|
125413
|
-
"pageMaxBytes": 4194304,
|
|
125414
|
-
"batchFailureMessageMaxChars": 2e3
|
|
125415
|
-
},
|
|
125416
|
-
"execution": {
|
|
125417
|
-
"maxNodes": 128,
|
|
125418
|
-
"maxDeps": 128,
|
|
125419
|
-
"maxEdges": 1024,
|
|
125420
|
-
"maxConcurrency": {
|
|
125421
|
-
"default": 4,
|
|
125422
|
-
"max": 32
|
|
125423
|
-
},
|
|
125424
|
-
"maxAttempts": {
|
|
125425
|
-
"default": 3,
|
|
125426
|
-
"max": 32
|
|
125427
|
-
},
|
|
125428
|
-
"confirmMessageMax": 1e3,
|
|
125429
|
-
"path": {
|
|
125430
|
-
"maxSegments": 24,
|
|
125431
|
-
"segmentMaxLength": 128,
|
|
125432
|
-
"indexBound": 2e4
|
|
125433
|
-
},
|
|
125434
|
-
"inputMaxDepth": 16
|
|
125435
|
-
},
|
|
125436
|
-
"envelope": {
|
|
125437
|
-
"basis": {
|
|
125438
|
-
"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",
|
|
125439
|
-
"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"
|
|
125440
|
-
},
|
|
125441
|
-
"urlMaxLength": 256,
|
|
125442
|
-
"urlMaxSegments": 8,
|
|
125443
|
-
"segmentMaxLength": 63,
|
|
125444
|
-
"labelMaxLength": 32,
|
|
125445
|
-
"paramMaxLen": 200,
|
|
125446
|
-
"paramEnumValuesMax": 32,
|
|
125447
|
-
"intMaxDigits": 15,
|
|
125448
|
-
"queryMaxItems": 12,
|
|
125449
|
-
"titleMaxEm": 32,
|
|
125450
|
-
"subtitleMaxEm": 80,
|
|
125451
|
-
"descriptionMaxCodepoints": 160,
|
|
125452
|
-
"tagsMax": 8,
|
|
125453
|
-
"rolesMax": 16,
|
|
125454
|
-
"navOrderMax": 999,
|
|
125455
|
-
"navOrderDefault": 500,
|
|
125456
|
-
"navGroupMax": 7,
|
|
125457
|
-
"navDefaultGroup": "main",
|
|
125458
|
-
"expiresMaxDays": 30
|
|
125459
|
-
},
|
|
125460
|
-
"provenance": {
|
|
125461
|
-
"basis": {
|
|
125462
|
-
"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",
|
|
125463
|
-
"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",
|
|
125464
|
-
"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"
|
|
125465
|
-
},
|
|
125466
|
-
"maxBytes": 4096,
|
|
125467
|
-
"maxRepairKinds": 16,
|
|
125468
|
-
"maxGates": 8
|
|
125469
|
-
},
|
|
125470
|
-
"browserWeight": {
|
|
125471
|
-
"entryGzipBytes": {
|
|
125472
|
-
"soma-core/core/index.ts": 524288,
|
|
125473
|
-
"soma-core/core/client/runtime-entry.ts": 524288,
|
|
125474
|
-
"soma-ui/src/app/index.ts": 524288,
|
|
125475
|
-
"soma-kit/src/app/index.ts": 327680
|
|
125476
|
-
}
|
|
125477
|
-
},
|
|
125478
|
-
"themeBudget": {
|
|
125479
|
-
"tokensBytes": 40960,
|
|
125480
|
-
"componentBytesPerPage": 163840,
|
|
125481
|
-
"overrideBlockBytes": 8192
|
|
125482
|
-
},
|
|
125483
|
-
"contentEngines": {
|
|
125484
|
-
"diff": {
|
|
125485
|
-
"basis": {
|
|
125486
|
-
"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",
|
|
125487
|
-
"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",
|
|
125488
|
-
"timeoutMs": "\u4E00\u6B21 diffProse / diffItems \u7684\u603B\u65F6\u9650\uFF08\u6BEB\u79D2\uFF09\uFF0C\u540C VisualEditor timeout 1000\uFF08\u7B14\u8BB0 C.2\uFF09",
|
|
125489
|
-
"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",
|
|
125490
|
-
"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",
|
|
125491
|
-
"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",
|
|
125492
|
-
"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",
|
|
125493
|
-
"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",
|
|
125494
|
-
"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",
|
|
125495
|
-
"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",
|
|
125496
|
-
"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",
|
|
125497
|
-
"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",
|
|
125498
|
-
"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",
|
|
125499
|
-
"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"
|
|
125500
|
-
},
|
|
125501
|
-
"maxChars": 2e5,
|
|
125502
|
-
"maxCharsPerCompare": 2e4,
|
|
125503
|
-
"timeoutMs": 1e3,
|
|
125504
|
-
"maxItems": 2e3,
|
|
125505
|
-
"moveDetectMaxChanged": 500,
|
|
125506
|
-
"pairAt": 0.5,
|
|
125507
|
-
"rewriteBelow": 0.4,
|
|
125508
|
-
"absorbOrphan": 1,
|
|
125509
|
-
"absorbOrphanMax": 4,
|
|
125510
|
-
"titleAt": 0.6,
|
|
125511
|
-
"bodyAt": 0.5,
|
|
125512
|
-
"maxAlignTokens": 6400,
|
|
125513
|
-
"maxPairMatrix": 2500,
|
|
125514
|
-
"maxPairCandidates": 25e4
|
|
125515
|
-
},
|
|
125516
|
-
"highlight": {
|
|
125517
|
-
"basis": {
|
|
125518
|
-
"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",
|
|
125519
|
-
"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",
|
|
125520
|
-
"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",
|
|
125521
|
-
"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",
|
|
125522
|
-
"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"
|
|
125523
|
-
},
|
|
125524
|
-
"maxLines": 5e3,
|
|
125525
|
-
"maxLineLength": 2e3,
|
|
125526
|
-
"timeoutMs": 1e3,
|
|
125527
|
-
"maxChars": 1e6,
|
|
125528
|
-
"jsonSniffMaxChars": 2e5
|
|
125529
|
-
},
|
|
125530
|
-
"structured": {
|
|
125531
|
-
"basis": {
|
|
125532
|
-
"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",
|
|
125533
|
-
"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"
|
|
125534
|
-
},
|
|
125535
|
-
"maxChars": 1e6,
|
|
125536
|
-
"maxNodes": 2e5
|
|
125537
|
-
},
|
|
125538
|
-
"markdown": {
|
|
125539
|
-
"basis": {
|
|
125540
|
-
"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",
|
|
125541
|
-
"maxBlocks": "\u5757\u6570\u4E0A\u9650\uFF0C\u8D85\u51FA\u622A\u65AD\u5E76\u6807 truncated\uFF08\u7B14\u8BB0 C.2 maxBlocks 5 000\uFF09",
|
|
125542
|
-
"summaryChars": "meta.summary \u53D6\u53BB\u6807\u8BB0\u5168\u6587\u7684\u524D N \u5B57\uFF08\u7B14\u8BB0 C.2\u300C\u524D 80 \u5B57\u300D\uFF09"
|
|
125543
|
-
},
|
|
125544
|
-
"maxChars": 2e5,
|
|
125545
|
-
"maxBlocks": 5e3,
|
|
125546
|
-
"summaryChars": 80
|
|
125547
|
-
}
|
|
125548
|
-
}
|
|
125549
|
-
};
|
|
125550
|
-
|
|
125551
|
-
// core/client/engines/diff/adapter-jsdiff.ts
|
|
125552
|
-
init_load();
|
|
125553
|
-
var wordSegmenter;
|
|
125554
|
-
function zhWordSegmenter() {
|
|
125555
|
-
if (wordSegmenter !== void 0) return wordSegmenter;
|
|
125556
|
-
const ctor = Intl.Segmenter;
|
|
125557
|
-
wordSegmenter = typeof ctor === "function" ? new ctor("zh", { granularity: "word" }) : null;
|
|
125558
|
-
return wordSegmenter;
|
|
125559
|
-
}
|
|
125560
|
-
function createJsdiffAdapter(adapterOptions = {}) {
|
|
125561
|
-
const load2 = () => loadEngineModule("diff", () => Promise.resolve().then(() => (init_libesm(), libesm_exports)), { telemetry: adapterOptions.telemetry });
|
|
125562
|
-
return {
|
|
125563
|
-
async diff(a2, b2, mode, options) {
|
|
125564
|
-
const lib2 = await load2();
|
|
125565
|
-
const base2 = options?.timeoutMs !== void 0 ? { timeout: options.timeoutMs } : {};
|
|
125566
|
-
let changes;
|
|
125567
|
-
if (mode === "chars") changes = lib2.diffChars(a2, b2, base2);
|
|
125568
|
-
else if (mode === "words") changes = lib2.diffWords(a2, b2, base2);
|
|
125569
|
-
else if (mode === "words-zh") {
|
|
125570
|
-
const seg = zhWordSegmenter();
|
|
125571
|
-
changes = seg === null ? lib2.diffChars(a2, b2, base2) : lib2.diffWords(a2, b2, { ...base2, intlSegmenter: seg });
|
|
125572
|
-
} else changes = lib2.diffLines(a2, b2, options?.ignoreWhitespace === true ? { ...base2, ignoreWhitespace: true } : base2);
|
|
125573
|
-
if (changes === void 0) return null;
|
|
125574
|
-
const parts = [];
|
|
125575
|
-
for (const change of changes) {
|
|
125576
|
-
if (change.value === "") continue;
|
|
125577
|
-
parts.push({ op: change.added === true ? "insert" : change.removed === true ? "delete" : "equal", text: change.value });
|
|
125578
|
-
}
|
|
125579
|
-
return parts;
|
|
125580
|
-
}
|
|
125581
|
-
};
|
|
125582
|
-
}
|
|
125583
|
-
|
|
125584
124864
|
// core/client/engines/diff/prose.ts
|
|
125585
124865
|
var now3 = () => typeof performance !== "undefined" && typeof performance.now === "function" ? performance.now() : Date.now();
|
|
125586
124866
|
var clock = now3;
|
|
@@ -125688,272 +124968,1218 @@ async function safeDiff(run, a2, b2, mode) {
|
|
|
125688
124968
|
run.degraded ??= "timeout";
|
|
125689
124969
|
return null;
|
|
125690
124970
|
}
|
|
125691
|
-
try {
|
|
125692
|
-
const parts = await run.adapter.diff(a2, b2, mode, { timeoutMs: left });
|
|
125693
|
-
if (parts === null) run.degraded ??= "timeout";
|
|
125694
|
-
return parts;
|
|
125695
|
-
} catch {
|
|
125696
|
-
run.degraded ??= "timeout";
|
|
125697
|
-
return null;
|
|
124971
|
+
try {
|
|
124972
|
+
const parts = await run.adapter.diff(a2, b2, mode, { timeoutMs: left });
|
|
124973
|
+
if (parts === null) run.degraded ??= "timeout";
|
|
124974
|
+
return parts;
|
|
124975
|
+
} catch {
|
|
124976
|
+
run.degraded ??= "timeout";
|
|
124977
|
+
return null;
|
|
124978
|
+
}
|
|
124979
|
+
}
|
|
124980
|
+
function pairRun(dels, inss, at2, maxMatrix) {
|
|
124981
|
+
const pairs2 = /* @__PURE__ */ new Map();
|
|
124982
|
+
if (dels.length === 0 || inss.length === 0 || dels.length * inss.length > maxMatrix) return pairs2;
|
|
124983
|
+
const cand = [];
|
|
124984
|
+
for (let d2 = 0; d2 < dels.length; d2 += 1) {
|
|
124985
|
+
for (let i2 = 0; i2 < inss.length; i2 += 1) {
|
|
124986
|
+
const s2 = diceSimilarity(dels[d2], inss[i2]);
|
|
124987
|
+
if (s2 >= at2) cand.push({ d: d2, i: i2, s: s2 });
|
|
124988
|
+
}
|
|
124989
|
+
}
|
|
124990
|
+
cand.sort((x2, y2) => y2.s - x2.s || x2.d - y2.d || x2.i - y2.i);
|
|
124991
|
+
const usedI = /* @__PURE__ */ new Set();
|
|
124992
|
+
for (const c2 of cand) {
|
|
124993
|
+
if (pairs2.has(c2.d) || usedI.has(c2.i)) continue;
|
|
124994
|
+
let crosses = false;
|
|
124995
|
+
for (const [d2, i2] of pairs2) if (d2 < c2.d && i2 > c2.i || d2 > c2.d && i2 < c2.i) {
|
|
124996
|
+
crosses = true;
|
|
124997
|
+
break;
|
|
124998
|
+
}
|
|
124999
|
+
if (crosses) continue;
|
|
125000
|
+
pairs2.set(c2.d, c2.i);
|
|
125001
|
+
usedI.add(c2.i);
|
|
125002
|
+
}
|
|
125003
|
+
return pairs2;
|
|
125004
|
+
}
|
|
125005
|
+
function pairAligned(ops, aKeys, bKeys, at2, maxMatrix) {
|
|
125006
|
+
const out2 = [];
|
|
125007
|
+
let k2 = 0;
|
|
125008
|
+
while (k2 < ops.length) {
|
|
125009
|
+
const op2 = ops[k2];
|
|
125010
|
+
if (op2.op === "eq") {
|
|
125011
|
+
out2.push(op2);
|
|
125012
|
+
k2 += 1;
|
|
125013
|
+
continue;
|
|
125014
|
+
}
|
|
125015
|
+
const dels = [];
|
|
125016
|
+
const inss = [];
|
|
125017
|
+
while (k2 < ops.length && ops[k2].op !== "eq") {
|
|
125018
|
+
const o2 = ops[k2];
|
|
125019
|
+
if (o2.op === "del") dels.push(o2.a);
|
|
125020
|
+
else if (o2.op === "ins") inss.push(o2.b);
|
|
125021
|
+
k2 += 1;
|
|
125022
|
+
}
|
|
125023
|
+
const pairs2 = pairRun(dels.map((a2) => aKeys[a2]), inss.map((b2) => bKeys[b2]), at2, maxMatrix);
|
|
125024
|
+
let di = 0;
|
|
125025
|
+
let ii = 0;
|
|
125026
|
+
const ordered = [...pairs2.entries()].sort((x2, y2) => x2[0] - y2[0]);
|
|
125027
|
+
for (const [d2, i2] of ordered) {
|
|
125028
|
+
for (; di < d2; di += 1) out2.push({ op: "del", a: dels[di] });
|
|
125029
|
+
for (; ii < i2; ii += 1) out2.push({ op: "ins", b: inss[ii] });
|
|
125030
|
+
out2.push({ op: "mod", a: dels[d2], b: inss[i2] });
|
|
125031
|
+
di = d2 + 1;
|
|
125032
|
+
ii = i2 + 1;
|
|
125033
|
+
}
|
|
125034
|
+
for (; di < dels.length; di += 1) out2.push({ op: "del", a: dels[di] });
|
|
125035
|
+
for (; ii < inss.length; ii += 1) out2.push({ op: "ins", b: inss[ii] });
|
|
125036
|
+
}
|
|
125037
|
+
return out2;
|
|
125038
|
+
}
|
|
125039
|
+
function splitParagraphs(text3) {
|
|
125040
|
+
return text3.split(/\r?\n/u).filter((line) => line.trim() !== "");
|
|
125041
|
+
}
|
|
125042
|
+
var sentenceSeg;
|
|
125043
|
+
function sentenceSegmenter() {
|
|
125044
|
+
if (sentenceSeg !== void 0) return sentenceSeg;
|
|
125045
|
+
const ctor = Intl.Segmenter;
|
|
125046
|
+
sentenceSeg = typeof ctor === "function" ? new ctor("zh", { granularity: "sentence" }) : null;
|
|
125047
|
+
return sentenceSeg;
|
|
125048
|
+
}
|
|
125049
|
+
function hasSegmenter() {
|
|
125050
|
+
return typeof Intl.Segmenter === "function";
|
|
125051
|
+
}
|
|
125052
|
+
function splitSentences(paragraph2) {
|
|
125053
|
+
const seg = sentenceSegmenter();
|
|
125054
|
+
const out2 = [];
|
|
125055
|
+
if (seg !== null) {
|
|
125056
|
+
for (const s2 of seg.segment(paragraph2)) if (s2.segment !== "") out2.push(s2.segment);
|
|
125057
|
+
} else {
|
|
125058
|
+
const re2 = /[^。!?!?;;]*[。!?!?;;]+[”’」』))]*\s*|[^。!?!?;;]+$/gu;
|
|
125059
|
+
for (const m4 of paragraph2.matchAll(re2)) if (m4[0] !== "") out2.push(m4[0]);
|
|
125060
|
+
}
|
|
125061
|
+
return out2.length > 0 ? out2 : [paragraph2];
|
|
125062
|
+
}
|
|
125063
|
+
function tidy(frags) {
|
|
125064
|
+
const out2 = [];
|
|
125065
|
+
let del = "";
|
|
125066
|
+
let ins = "";
|
|
125067
|
+
const flush2 = () => {
|
|
125068
|
+
if (del !== "") out2.push({ op: "del", v: del });
|
|
125069
|
+
if (ins !== "") out2.push({ op: "ins", v: ins });
|
|
125070
|
+
del = "";
|
|
125071
|
+
ins = "";
|
|
125072
|
+
};
|
|
125073
|
+
for (const f2 of frags) {
|
|
125074
|
+
if (f2.v === "") continue;
|
|
125075
|
+
if (f2.op === "del") del += f2.v;
|
|
125076
|
+
else if (f2.op === "ins") ins += f2.v;
|
|
125077
|
+
else {
|
|
125078
|
+
flush2();
|
|
125079
|
+
const last = out2[out2.length - 1];
|
|
125080
|
+
if (last !== void 0 && last.op === "eq") out2[out2.length - 1] = { op: "eq", v: last.v + f2.v };
|
|
125081
|
+
else out2.push(f2);
|
|
125082
|
+
}
|
|
125083
|
+
}
|
|
125084
|
+
flush2();
|
|
125085
|
+
return out2;
|
|
125086
|
+
}
|
|
125087
|
+
function absorbOrphans(frags, max6) {
|
|
125088
|
+
if (max6 <= 0) return tidy(frags);
|
|
125089
|
+
const out2 = [];
|
|
125090
|
+
for (let k2 = 0; k2 < frags.length; k2 += 1) {
|
|
125091
|
+
const f2 = frags[k2];
|
|
125092
|
+
const prev = frags[k2 - 1];
|
|
125093
|
+
const next = frags[k2 + 1];
|
|
125094
|
+
if (f2.op === "eq" && prev !== void 0 && next !== void 0 && prev.op !== "eq" && next.op !== "eq" && cpLen(f2.v) <= max6 && !PUNCT.test(f2.v)) {
|
|
125095
|
+
out2.push({ op: "del", v: f2.v }, { op: "ins", v: f2.v });
|
|
125096
|
+
} else out2.push(f2);
|
|
125097
|
+
}
|
|
125098
|
+
return tidy(out2);
|
|
125099
|
+
}
|
|
125100
|
+
function countChanges(frags) {
|
|
125101
|
+
let n2 = 0;
|
|
125102
|
+
let inChange = false;
|
|
125103
|
+
for (const f2 of frags) {
|
|
125104
|
+
if (f2.op === "eq") inChange = false;
|
|
125105
|
+
else if (!inChange) {
|
|
125106
|
+
n2 += 1;
|
|
125107
|
+
inChange = true;
|
|
125108
|
+
}
|
|
125109
|
+
}
|
|
125110
|
+
return n2;
|
|
125111
|
+
}
|
|
125112
|
+
async function diffWordsMapped(run, cfg, a2, b2) {
|
|
125113
|
+
const na = normalizeWithMap(a2, cfg);
|
|
125114
|
+
const nb = normalizeWithMap(b2, cfg);
|
|
125115
|
+
if (na.text === nb.text) return [{ op: "eq", v: b2 }];
|
|
125116
|
+
const whole = [{ op: "del", v: a2 }, { op: "ins", v: b2 }];
|
|
125117
|
+
if (na.text.length + nb.text.length > cfg.maxCharsPerCompare) {
|
|
125118
|
+
run.degraded ??= "too-large";
|
|
125119
|
+
return whole;
|
|
125120
|
+
}
|
|
125121
|
+
const zh = hasHan(na.text) || hasHan(nb.text);
|
|
125122
|
+
let mode = zh ? "words-zh" : "words";
|
|
125123
|
+
if (zh && !hasSegmenter()) {
|
|
125124
|
+
mode = "chars";
|
|
125125
|
+
run.usedChars = true;
|
|
125126
|
+
run.degraded ??= "no-segmenter";
|
|
125127
|
+
}
|
|
125128
|
+
if (zh && mode === "words-zh") run.usedZh = true;
|
|
125129
|
+
let parts = await safeDiff(run, na.text, nb.text, mode);
|
|
125130
|
+
if (parts === null) return whole;
|
|
125131
|
+
let mapped = mapParts(parts, na, nb);
|
|
125132
|
+
if (mapped === null && mode !== "chars") {
|
|
125133
|
+
parts = await safeDiff(run, na.text, nb.text, "chars");
|
|
125134
|
+
mapped = parts === null ? null : mapParts(parts, na, nb);
|
|
125135
|
+
}
|
|
125136
|
+
return mapped ?? whole;
|
|
125137
|
+
}
|
|
125138
|
+
function mapParts(parts, na, nb) {
|
|
125139
|
+
const out2 = [];
|
|
125140
|
+
let ia = 0;
|
|
125141
|
+
let ib = 0;
|
|
125142
|
+
for (const p2 of parts) {
|
|
125143
|
+
const len2 = p2.text.length;
|
|
125144
|
+
if (p2.op === "equal") {
|
|
125145
|
+
if (na.text.slice(ia, ia + len2) !== p2.text || nb.text.slice(ib, ib + len2) !== p2.text) return null;
|
|
125146
|
+
out2.push({ op: "eq", v: originSlice(nb, ib, ib + len2) });
|
|
125147
|
+
ia += len2;
|
|
125148
|
+
ib += len2;
|
|
125149
|
+
} else if (p2.op === "delete") {
|
|
125150
|
+
if (na.text.slice(ia, ia + len2) !== p2.text) return null;
|
|
125151
|
+
out2.push({ op: "del", v: originSlice(na, ia, ia + len2) });
|
|
125152
|
+
ia += len2;
|
|
125153
|
+
} else {
|
|
125154
|
+
if (nb.text.slice(ib, ib + len2) !== p2.text) return null;
|
|
125155
|
+
out2.push({ op: "ins", v: originSlice(nb, ib, ib + len2) });
|
|
125156
|
+
ib += len2;
|
|
125157
|
+
}
|
|
125158
|
+
}
|
|
125159
|
+
if (ia !== na.text.length || ib !== nb.text.length) return null;
|
|
125160
|
+
return out2;
|
|
125161
|
+
}
|
|
125162
|
+
async function diffParagraph(run, cfg, a2, b2) {
|
|
125163
|
+
const sa2 = splitSentences(a2);
|
|
125164
|
+
const sb = splitSentences(b2);
|
|
125165
|
+
const ka2 = sa2.map((s2) => normalizeWithMap(s2, cfg).text);
|
|
125166
|
+
const kb = sb.map((s2) => normalizeWithMap(s2, cfg).text);
|
|
125167
|
+
const aligned = await alignKeys(run, ka2, kb, cfg.maxAlignTokens);
|
|
125168
|
+
if (aligned === null) return [{ op: "del", v: a2 }, { op: "ins", v: b2 }];
|
|
125169
|
+
const units = pairAligned(aligned, ka2, kb, cfg.pairAt, cfg.maxPairMatrix);
|
|
125170
|
+
const frags = [];
|
|
125171
|
+
for (const u2 of units) {
|
|
125172
|
+
if (u2.op === "eq") frags.push({ op: "eq", v: sb[u2.b] });
|
|
125173
|
+
else if (u2.op === "del") frags.push({ op: "del", v: sa2[u2.a] });
|
|
125174
|
+
else if (u2.op === "ins") frags.push({ op: "ins", v: sb[u2.b] });
|
|
125175
|
+
else frags.push(...await diffWordsMapped(run, cfg, sa2[u2.a], sb[u2.b]));
|
|
125176
|
+
}
|
|
125177
|
+
return absorbOrphans(frags, cfg.absorbOrphan);
|
|
125178
|
+
}
|
|
125179
|
+
function statsOf(blocks) {
|
|
125180
|
+
let ins = 0;
|
|
125181
|
+
let del = 0;
|
|
125182
|
+
let changes = 0;
|
|
125183
|
+
for (const blk of blocks) {
|
|
125184
|
+
for (const f2 of blk.fragments) {
|
|
125185
|
+
if (f2.op === "ins") ins += cpLen(f2.v.replace(/\s+/gu, ""));
|
|
125186
|
+
else if (f2.op === "del") del += cpLen(f2.v.replace(/\s+/gu, ""));
|
|
125187
|
+
}
|
|
125188
|
+
if (blk.op === "ins" || blk.op === "del") changes += 1;
|
|
125189
|
+
else if (blk.op === "mod") changes += countChanges(blk.fragments);
|
|
125190
|
+
}
|
|
125191
|
+
return { insChars: ins, delChars: del, changes };
|
|
125192
|
+
}
|
|
125193
|
+
function similarityOf(blocks, aLen, bLen) {
|
|
125194
|
+
if (aLen + bLen === 0) return 1;
|
|
125195
|
+
let eq = 0;
|
|
125196
|
+
for (const blk of blocks) for (const f2 of blk.fragments) if (f2.op === "eq") eq += cpLen(f2.v.replace(/\s+/gu, ""));
|
|
125197
|
+
return Math.min(1, 2 * eq / (aLen + bLen));
|
|
125198
|
+
}
|
|
125199
|
+
var compact2 = (s2) => cpLen(s2.replace(/\s+/gu, ""));
|
|
125200
|
+
function rewriteBlocks(pa2, pb) {
|
|
125201
|
+
return [...pa2.map((v4) => ({ op: "del", fragments: [{ op: "del", v: v4 }] })), ...pb.map((v4) => ({ op: "ins", fragments: [{ op: "ins", v: v4 }] }))];
|
|
125202
|
+
}
|
|
125203
|
+
async function runProse(run, cfg, a2, b2) {
|
|
125204
|
+
const pa2 = splitParagraphs(a2);
|
|
125205
|
+
const pb = splitParagraphs(b2);
|
|
125206
|
+
const granularity = () => run.usedChars ? "chars" : run.usedZh ? "words-zh" : hasHan(a2) || hasHan(b2) ? hasSegmenter() ? "words-zh" : "chars" : "words";
|
|
125207
|
+
const aLen = compact2(a2);
|
|
125208
|
+
const bLen = compact2(b2);
|
|
125209
|
+
const finish = (kind, blocks2, formatOnly = false) => {
|
|
125210
|
+
const stats = statsOf(blocks2);
|
|
125211
|
+
const out2 = { kind, formatOnly, similarity: kind === "same" ? 1 : similarityOf(blocks2, aLen, bLen), blocks: blocks2, stats, granularity: granularity() };
|
|
125212
|
+
return run.degraded !== void 0 ? { ...out2, degraded: run.degraded } : out2;
|
|
125213
|
+
};
|
|
125214
|
+
if (a2.length + b2.length > cfg.maxChars) {
|
|
125215
|
+
run.degraded = "too-large";
|
|
125216
|
+
return finish(pa2.length > 0 && pb.length > 0 ? "rewrite" : "inline", rewriteBlocks(pa2, pb));
|
|
125217
|
+
}
|
|
125218
|
+
const ka2 = pa2.map((p2) => normalizeWithMap(p2, cfg).text);
|
|
125219
|
+
const kb = pb.map((p2) => normalizeWithMap(p2, cfg).text);
|
|
125220
|
+
if (ka2.length === kb.length && ka2.every((k2, i2) => k2 === kb[i2])) {
|
|
125221
|
+
return finish("same", pb.map((v4) => ({ op: "eq", fragments: [{ op: "eq", v: v4 }] })), a2 !== b2);
|
|
125222
|
+
}
|
|
125223
|
+
if (pa2.length === 0 || pb.length === 0) return finish("inline", rewriteBlocks(pa2, pb));
|
|
125224
|
+
const aligned = await alignKeys(run, ka2, kb, cfg.maxAlignTokens);
|
|
125225
|
+
if (aligned === null) return finish("rewrite", rewriteBlocks(pa2, pb));
|
|
125226
|
+
const units = pairAligned(aligned, ka2, kb, cfg.pairAt, cfg.maxPairMatrix);
|
|
125227
|
+
const blocks = [];
|
|
125228
|
+
for (const u2 of units) {
|
|
125229
|
+
if (u2.op === "eq") blocks.push({ op: "eq", fragments: [{ op: "eq", v: pb[u2.b] }] });
|
|
125230
|
+
else if (u2.op === "del") blocks.push({ op: "del", fragments: [{ op: "del", v: pa2[u2.a] }] });
|
|
125231
|
+
else if (u2.op === "ins") blocks.push({ op: "ins", fragments: [{ op: "ins", v: pb[u2.b] }] });
|
|
125232
|
+
else blocks.push({ op: "mod", fragments: await diffParagraph(run, cfg, pa2[u2.a], pb[u2.b]) });
|
|
125698
125233
|
}
|
|
125234
|
+
const sim = similarityOf(blocks, aLen, bLen);
|
|
125235
|
+
if (sim < cfg.rewriteBelow) return finish("rewrite", rewriteBlocks(pa2, pb));
|
|
125236
|
+
return finish("inline", blocks);
|
|
125699
125237
|
}
|
|
125700
|
-
|
|
125701
|
-
|
|
125702
|
-
|
|
125703
|
-
|
|
125704
|
-
|
|
125705
|
-
|
|
125706
|
-
|
|
125707
|
-
|
|
125238
|
+
|
|
125239
|
+
// core/client/engines/diff/code.ts
|
|
125240
|
+
var toFrags = (parts) => tidy(parts.map((p2) => ({ v: p2.text, op: p2.op === "equal" ? "eq" : p2.op === "insert" ? "ins" : "del" })));
|
|
125241
|
+
var linesOf = (s2) => s2 === "" ? [] : s2.replace(/\r\n?/gu, "\n").split("\n");
|
|
125242
|
+
var squash = (s2) => s2.replace(/\s+/gu, "");
|
|
125243
|
+
function hunksOf(lines, context) {
|
|
125244
|
+
const changed = [];
|
|
125245
|
+
lines.forEach((l2, i2) => {
|
|
125246
|
+
if (l2.op !== "eq") changed.push(i2);
|
|
125247
|
+
});
|
|
125248
|
+
if (changed.length === 0) return [];
|
|
125249
|
+
const ranges = [];
|
|
125250
|
+
for (const i2 of changed) {
|
|
125251
|
+
const from = Math.max(0, i2 - context);
|
|
125252
|
+
const to2 = Math.min(lines.length - 1, i2 + context);
|
|
125253
|
+
const last = ranges[ranges.length - 1];
|
|
125254
|
+
if (last && from <= last[1] + 1) last[1] = Math.max(last[1], to2);
|
|
125255
|
+
else ranges.push([from, to2]);
|
|
125256
|
+
}
|
|
125257
|
+
return ranges.map(([from, to2]) => {
|
|
125258
|
+
const slice2 = lines.slice(from, to2 + 1);
|
|
125259
|
+
const firstA = slice2.find((l2) => l2.a !== void 0)?.a ?? 0;
|
|
125260
|
+
const firstB = slice2.find((l2) => l2.b !== void 0)?.b ?? 0;
|
|
125261
|
+
return {
|
|
125262
|
+
aStart: firstA,
|
|
125263
|
+
aLines: slice2.filter((l2) => l2.a !== void 0).length,
|
|
125264
|
+
bStart: firstB,
|
|
125265
|
+
bLines: slice2.filter((l2) => l2.b !== void 0).length,
|
|
125266
|
+
from,
|
|
125267
|
+
to: to2,
|
|
125268
|
+
lines: slice2
|
|
125269
|
+
};
|
|
125270
|
+
});
|
|
125271
|
+
}
|
|
125272
|
+
async function runCode(run, cfg, a2, b2) {
|
|
125273
|
+
const aLines = linesOf(a2);
|
|
125274
|
+
const bLines = linesOf(b2);
|
|
125275
|
+
const whitespaceOnly = a2 !== b2 && squash(a2) === squash(b2);
|
|
125276
|
+
if (a2 === b2) {
|
|
125277
|
+
const lines2 = aLines.map((text3, i2) => ({ op: "eq", a: i2 + 1, b: i2 + 1, text: text3 }));
|
|
125278
|
+
return { kind: "same", lines: lines2, hunks: [], stats: { added: 0, removed: 0, modified: 0 }, whitespaceOnly: false };
|
|
125279
|
+
}
|
|
125280
|
+
const plain2 = (degraded) => {
|
|
125281
|
+
const lines2 = [
|
|
125282
|
+
...aLines.map((text3, i2) => ({ op: "del", a: i2 + 1, text: text3 })),
|
|
125283
|
+
...bLines.map((text3, i2) => ({ op: "ins", b: i2 + 1, text: text3 }))
|
|
125284
|
+
];
|
|
125285
|
+
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 };
|
|
125286
|
+
};
|
|
125287
|
+
if (a2.length + b2.length > cfg.maxChars) return plain2("too-large");
|
|
125288
|
+
const ops = await alignKeys(run, aLines, bLines, cfg.maxAlignTokens);
|
|
125289
|
+
if (ops === null) return plain2(run.degraded === "timeout" ? "timeout" : "too-large");
|
|
125290
|
+
const units = pairAligned(ops, aLines, bLines, cfg.pairAt, cfg.maxPairMatrix);
|
|
125291
|
+
const lines = [];
|
|
125292
|
+
let added = 0;
|
|
125293
|
+
let removed = 0;
|
|
125294
|
+
let modified = 0;
|
|
125295
|
+
let pendingDel = [];
|
|
125296
|
+
let pendingIns = [];
|
|
125297
|
+
const flush2 = () => {
|
|
125298
|
+
lines.push(...pendingDel, ...pendingIns);
|
|
125299
|
+
pendingDel = [];
|
|
125300
|
+
pendingIns = [];
|
|
125301
|
+
};
|
|
125302
|
+
for (const u2 of units) {
|
|
125303
|
+
if (u2.op === "eq") {
|
|
125304
|
+
flush2();
|
|
125305
|
+
lines.push({ op: "eq", a: u2.a + 1, b: u2.b + 1, text: aLines[u2.a] });
|
|
125306
|
+
continue;
|
|
125708
125307
|
}
|
|
125709
|
-
|
|
125710
|
-
|
|
125711
|
-
|
|
125712
|
-
|
|
125713
|
-
if (pairs2.has(c2.d) || usedI.has(c2.i)) continue;
|
|
125714
|
-
let crosses = false;
|
|
125715
|
-
for (const [d2, i2] of pairs2) if (d2 < c2.d && i2 > c2.i || d2 > c2.d && i2 < c2.i) {
|
|
125716
|
-
crosses = true;
|
|
125717
|
-
break;
|
|
125308
|
+
if (u2.op === "del") {
|
|
125309
|
+
removed += 1;
|
|
125310
|
+
pendingDel.push({ op: "del", a: u2.a + 1, text: aLines[u2.a] });
|
|
125311
|
+
continue;
|
|
125718
125312
|
}
|
|
125719
|
-
if (
|
|
125720
|
-
|
|
125721
|
-
|
|
125313
|
+
if (u2.op === "ins") {
|
|
125314
|
+
added += 1;
|
|
125315
|
+
pendingIns.push({ op: "ins", b: u2.b + 1, text: bLines[u2.b] });
|
|
125316
|
+
continue;
|
|
125317
|
+
}
|
|
125318
|
+
modified += 1;
|
|
125319
|
+
const la = aLines[u2.a];
|
|
125320
|
+
const lb2 = bLines[u2.b];
|
|
125321
|
+
let frags = null;
|
|
125322
|
+
if (la.length <= cfg.intraMaxLine && lb2.length <= cfg.intraMaxLine) {
|
|
125323
|
+
const parts = await safeDiff(run, la, lb2, "chars");
|
|
125324
|
+
if (parts !== null) frags = toFrags(parts);
|
|
125325
|
+
}
|
|
125326
|
+
pendingDel.push({ op: "del", a: u2.a + 1, text: la, pair: u2.b + 1, ...frags ? { fragments: frags.filter((f2) => f2.op !== "ins") } : {} });
|
|
125327
|
+
pendingIns.push({ op: "ins", b: u2.b + 1, text: lb2, pair: u2.a + 1, ...frags ? { fragments: frags.filter((f2) => f2.op !== "del") } : {} });
|
|
125722
125328
|
}
|
|
125723
|
-
|
|
125329
|
+
flush2();
|
|
125330
|
+
const out2 = { kind: "changed", lines, hunks: hunksOf(lines, cfg.context), stats: { added, removed, modified }, whitespaceOnly };
|
|
125331
|
+
return run.degraded !== void 0 ? { ...out2, degraded: run.degraded === "timeout" ? "timeout" : "too-large" } : out2;
|
|
125724
125332
|
}
|
|
125725
|
-
function
|
|
125333
|
+
function splitMarkdownBlocks(source) {
|
|
125726
125334
|
const out2 = [];
|
|
125727
|
-
let
|
|
125728
|
-
|
|
125729
|
-
|
|
125730
|
-
|
|
125731
|
-
|
|
125732
|
-
|
|
125335
|
+
let cur = [];
|
|
125336
|
+
let fence2 = null;
|
|
125337
|
+
for (const line of source.replace(/\r\n?/gu, "\n").split("\n")) {
|
|
125338
|
+
const m4 = /^\s{0,3}(`{3,}|~{3,})/u.exec(line);
|
|
125339
|
+
if (fence2 !== null) {
|
|
125340
|
+
cur.push(line);
|
|
125341
|
+
if (m4 && m4[1].startsWith(fence2)) {
|
|
125342
|
+
out2.push(cur.join("\n"));
|
|
125343
|
+
cur = [];
|
|
125344
|
+
fence2 = null;
|
|
125345
|
+
}
|
|
125733
125346
|
continue;
|
|
125734
125347
|
}
|
|
125735
|
-
|
|
125736
|
-
|
|
125737
|
-
|
|
125738
|
-
|
|
125739
|
-
|
|
125740
|
-
else if (o2.op === "ins") inss.push(o2.b);
|
|
125741
|
-
k2 += 1;
|
|
125348
|
+
if (m4) {
|
|
125349
|
+
if (cur.length > 0) out2.push(cur.join("\n"));
|
|
125350
|
+
cur = [line];
|
|
125351
|
+
fence2 = m4[1].slice(0, 3);
|
|
125352
|
+
continue;
|
|
125742
125353
|
}
|
|
125743
|
-
|
|
125744
|
-
|
|
125745
|
-
|
|
125746
|
-
|
|
125747
|
-
for (const [d2, i2] of ordered) {
|
|
125748
|
-
for (; di < d2; di += 1) out2.push({ op: "del", a: dels[di] });
|
|
125749
|
-
for (; ii < i2; ii += 1) out2.push({ op: "ins", b: inss[ii] });
|
|
125750
|
-
out2.push({ op: "mod", a: dels[d2], b: inss[i2] });
|
|
125751
|
-
di = d2 + 1;
|
|
125752
|
-
ii = i2 + 1;
|
|
125354
|
+
if (line.trim() === "") {
|
|
125355
|
+
if (cur.length > 0) out2.push(cur.join("\n"));
|
|
125356
|
+
cur = [];
|
|
125357
|
+
continue;
|
|
125753
125358
|
}
|
|
125754
|
-
|
|
125755
|
-
for (; ii < inss.length; ii += 1) out2.push({ op: "ins", b: inss[ii] });
|
|
125359
|
+
cur.push(line);
|
|
125756
125360
|
}
|
|
125361
|
+
if (cur.length > 0) out2.push(cur.join("\n"));
|
|
125757
125362
|
return out2;
|
|
125758
125363
|
}
|
|
125759
|
-
function
|
|
125760
|
-
|
|
125761
|
-
}
|
|
125762
|
-
|
|
125763
|
-
|
|
125764
|
-
if (
|
|
125765
|
-
|
|
125766
|
-
|
|
125767
|
-
return
|
|
125768
|
-
}
|
|
125769
|
-
|
|
125770
|
-
return
|
|
125771
|
-
}
|
|
125772
|
-
function
|
|
125773
|
-
|
|
125774
|
-
|
|
125775
|
-
|
|
125776
|
-
|
|
125777
|
-
|
|
125778
|
-
const
|
|
125779
|
-
|
|
125364
|
+
function markdownBlockKind(block2) {
|
|
125365
|
+
const first = block2.split("\n", 1)[0].trimStart();
|
|
125366
|
+
const h2 = /^(#{1,6})\s/u.exec(first);
|
|
125367
|
+
if (h2) return { kind: "heading", detail: String(h2[1].length) };
|
|
125368
|
+
const f2 = /^(`{3,}|~{3,})\s*([^\s`]*)/u.exec(first);
|
|
125369
|
+
if (f2) return { kind: "code", detail: f2[2] ?? "" };
|
|
125370
|
+
if (/^>/u.test(first)) return { kind: "quote", detail: "" };
|
|
125371
|
+
if (/^\d+[.)]\s/u.test(first)) return { kind: "list", detail: "ordered" };
|
|
125372
|
+
if (/^[-*+]\s/u.test(first)) return { kind: "list", detail: "bullet" };
|
|
125373
|
+
if (/^\|/u.test(first)) return { kind: "table", detail: "" };
|
|
125374
|
+
if (/^(-{3,}|\*{3,}|_{3,})\s*$/u.test(first)) return { kind: "hr", detail: "" };
|
|
125375
|
+
return { kind: "paragraph", detail: "" };
|
|
125376
|
+
}
|
|
125377
|
+
function markdownBlockText(block2, kind) {
|
|
125378
|
+
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");
|
|
125379
|
+
return block2.split("\n").map((l2) => l2.replace(/^\s{0,3}(#{1,6}\s+|>\s?|[-*+]\s+(\[[ xX]\]\s+)?|\d+[.)]\s+)/u, "")).join("\n").trim();
|
|
125380
|
+
}
|
|
125381
|
+
async function runMarkdown(run, cfg, a2, b2) {
|
|
125382
|
+
if (a2 === b2) {
|
|
125383
|
+
const blocks2 = splitMarkdownBlocks(a2).map((s2) => ({ op: "eq", kind: markdownBlockKind(s2).kind, before: s2, after: s2 }));
|
|
125384
|
+
return { kind: "same", blocks: blocks2, stats: { added: 0, removed: 0, modified: 0, same: blocks2.length } };
|
|
125385
|
+
}
|
|
125386
|
+
const aBlocks = splitMarkdownBlocks(a2);
|
|
125387
|
+
const bBlocks = splitMarkdownBlocks(b2);
|
|
125388
|
+
if (a2.length + b2.length > cfg.maxChars || aBlocks.length + bBlocks.length > cfg.maxBlocks) {
|
|
125389
|
+
return { kind: "changed", blocks: [], stats: { added: 0, removed: 0, modified: 0, same: 0 }, degraded: "too-large" };
|
|
125390
|
+
}
|
|
125391
|
+
const meta2 = (s2) => {
|
|
125392
|
+
const k2 = markdownBlockKind(s2);
|
|
125393
|
+
return { ...k2, text: markdownBlockText(s2, k2.kind) };
|
|
125394
|
+
};
|
|
125395
|
+
const am = aBlocks.map(meta2);
|
|
125396
|
+
const bm2 = bBlocks.map(meta2);
|
|
125397
|
+
const key = (m4) => `${m4.kind}\0${m4.text.replace(/\s+/gu, " ")}`;
|
|
125398
|
+
const ops = await alignKeys(run, am.map(key), bm2.map(key), cfg.maxAlignTokens);
|
|
125399
|
+
if (ops === null) return { kind: "changed", blocks: [], stats: { added: 0, removed: 0, modified: 0, same: 0 }, degraded: run.degraded === "timeout" ? "timeout" : "too-large" };
|
|
125400
|
+
const units = pairAligned(ops, am.map((m4) => `${m4.kind}:${m4.text}`), bm2.map((m4) => `${m4.kind}:${m4.text}`), cfg.pairAt, cfg.maxPairMatrix);
|
|
125401
|
+
const blocks = [];
|
|
125402
|
+
let added = 0;
|
|
125403
|
+
let removed = 0;
|
|
125404
|
+
let modified = 0;
|
|
125405
|
+
let same = 0;
|
|
125406
|
+
for (const u2 of units) {
|
|
125407
|
+
if (u2.op === "eq") {
|
|
125408
|
+
const x3 = am[u2.a];
|
|
125409
|
+
const y3 = bm2[u2.b];
|
|
125410
|
+
const notes2 = structureNotes(x3, y3);
|
|
125411
|
+
if (notes2.length === 0 && aBlocks[u2.a] === bBlocks[u2.b]) {
|
|
125412
|
+
same += 1;
|
|
125413
|
+
blocks.push({ op: "eq", kind: y3.kind, before: aBlocks[u2.a], after: bBlocks[u2.b] });
|
|
125414
|
+
continue;
|
|
125415
|
+
}
|
|
125416
|
+
modified += 1;
|
|
125417
|
+
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 } : {} });
|
|
125418
|
+
continue;
|
|
125419
|
+
}
|
|
125420
|
+
if (u2.op === "del") {
|
|
125421
|
+
removed += 1;
|
|
125422
|
+
blocks.push({ op: "del", kind: am[u2.a].kind, before: aBlocks[u2.a] });
|
|
125423
|
+
continue;
|
|
125424
|
+
}
|
|
125425
|
+
if (u2.op === "ins") {
|
|
125426
|
+
added += 1;
|
|
125427
|
+
blocks.push({ op: "ins", kind: bm2[u2.b].kind, after: bBlocks[u2.b] });
|
|
125428
|
+
continue;
|
|
125429
|
+
}
|
|
125430
|
+
const x2 = am[u2.a];
|
|
125431
|
+
const y2 = bm2[u2.b];
|
|
125432
|
+
if (x2.kind !== y2.kind) {
|
|
125433
|
+
removed += 1;
|
|
125434
|
+
added += 1;
|
|
125435
|
+
blocks.push({ op: "del", kind: x2.kind, before: aBlocks[u2.a] }, { op: "ins", kind: y2.kind, after: bBlocks[u2.b] });
|
|
125436
|
+
continue;
|
|
125437
|
+
}
|
|
125438
|
+
modified += 1;
|
|
125439
|
+
const mode = hasHan(x2.text) || hasHan(y2.text) ? "words-zh" : "words";
|
|
125440
|
+
const parts = x2.kind === "code" ? null : await safeDiff(run, x2.text, y2.text, mode);
|
|
125441
|
+
const notes = structureNotes(x2, y2);
|
|
125442
|
+
blocks.push({
|
|
125443
|
+
op: "mod",
|
|
125444
|
+
kind: y2.kind,
|
|
125445
|
+
before: aBlocks[u2.a],
|
|
125446
|
+
after: bBlocks[u2.b],
|
|
125447
|
+
...parts !== null ? { fragments: toFrags(parts) } : {},
|
|
125448
|
+
...notes.length > 0 ? { notes } : {},
|
|
125449
|
+
similarity: diceSimilarity(x2.text, y2.text)
|
|
125450
|
+
});
|
|
125780
125451
|
}
|
|
125781
|
-
|
|
125452
|
+
const out2 = { kind: "changed", blocks, stats: { added, removed, modified, same } };
|
|
125453
|
+
return run.degraded !== void 0 ? { ...out2, degraded: run.degraded === "timeout" ? "timeout" : "too-large" } : out2;
|
|
125782
125454
|
}
|
|
125783
|
-
function
|
|
125784
|
-
|
|
125785
|
-
|
|
125786
|
-
|
|
125787
|
-
|
|
125788
|
-
|
|
125789
|
-
|
|
125790
|
-
|
|
125791
|
-
|
|
125792
|
-
|
|
125793
|
-
|
|
125794
|
-
|
|
125795
|
-
|
|
125796
|
-
|
|
125797
|
-
|
|
125798
|
-
|
|
125799
|
-
|
|
125800
|
-
|
|
125801
|
-
|
|
125455
|
+
function structureNotes(x2, y2) {
|
|
125456
|
+
if (x2.kind !== y2.kind || x2.detail === y2.detail) return [];
|
|
125457
|
+
const what = x2.kind === "heading" ? "heading-level" : x2.kind === "list" ? "list-type" : x2.kind === "code" ? "code-language" : null;
|
|
125458
|
+
return what === null ? [] : [{ what, before: x2.detail, after: y2.detail }];
|
|
125459
|
+
}
|
|
125460
|
+
|
|
125461
|
+
// core/client/engines/diff/index.ts
|
|
125462
|
+
init_engine_error();
|
|
125463
|
+
|
|
125464
|
+
// core/shared/registry-generated/limits.ts
|
|
125465
|
+
var SOMA_PIPELINE_LIMITS = {
|
|
125466
|
+
"id": "limits",
|
|
125467
|
+
"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",
|
|
125468
|
+
"readBy": [
|
|
125469
|
+
{
|
|
125470
|
+
"module": "soma-ui",
|
|
125471
|
+
"file": "src/compiler/styling/theme/orchestrate/budget.ts",
|
|
125472
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125473
|
+
},
|
|
125474
|
+
{
|
|
125475
|
+
"module": "soma-ui",
|
|
125476
|
+
"file": "src/shared/data-scale.ts",
|
|
125477
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125478
|
+
},
|
|
125479
|
+
{
|
|
125480
|
+
"module": "soma-ui",
|
|
125481
|
+
"file": "src/compiler/need/families/browse-layout.ts",
|
|
125482
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125483
|
+
},
|
|
125484
|
+
{
|
|
125485
|
+
"module": "soma-ui",
|
|
125486
|
+
"file": "src/compiler/need/families/browse-dims.ts",
|
|
125487
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125488
|
+
},
|
|
125489
|
+
{
|
|
125490
|
+
"module": "soma-ui",
|
|
125491
|
+
"file": "src/compiler/need/families/browse-conditions.ts",
|
|
125492
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125493
|
+
},
|
|
125494
|
+
{
|
|
125495
|
+
"module": "soma-ui",
|
|
125496
|
+
"file": "src/compiler/need/families/compare.ts",
|
|
125497
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125498
|
+
},
|
|
125499
|
+
{
|
|
125500
|
+
"module": "soma-ui",
|
|
125501
|
+
"file": "src/compiler/need/families/monitor.ts",
|
|
125502
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125503
|
+
},
|
|
125504
|
+
{
|
|
125505
|
+
"module": "soma-ui",
|
|
125506
|
+
"file": "src/compiler/need/families/inspect-relation.ts",
|
|
125507
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125508
|
+
},
|
|
125509
|
+
{
|
|
125510
|
+
"module": "soma-ui",
|
|
125511
|
+
"file": "src/compiler/trace/trace.types.ts",
|
|
125512
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125513
|
+
},
|
|
125514
|
+
{
|
|
125515
|
+
"module": "soma-ui",
|
|
125516
|
+
"file": "src/units/compose-check.ts",
|
|
125517
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125518
|
+
},
|
|
125519
|
+
{
|
|
125520
|
+
"module": "soma-ui",
|
|
125521
|
+
"file": "src/shared/field-components.ts",
|
|
125522
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125523
|
+
},
|
|
125524
|
+
{
|
|
125525
|
+
"module": "soma-ui",
|
|
125526
|
+
"file": "src/data-kit/filter-model/filter.ts",
|
|
125527
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125528
|
+
},
|
|
125529
|
+
{
|
|
125530
|
+
"module": "soma-ui",
|
|
125531
|
+
"file": "src/data-kit/views/tree.ts",
|
|
125532
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125533
|
+
},
|
|
125534
|
+
{
|
|
125535
|
+
"module": "soma-ui",
|
|
125536
|
+
"file": "src/compiler/certify/certificate.ts",
|
|
125537
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125538
|
+
},
|
|
125539
|
+
{
|
|
125540
|
+
"module": "soma-ui",
|
|
125541
|
+
"file": "src/compiler/certify/explain-format.ts",
|
|
125542
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125543
|
+
},
|
|
125544
|
+
{
|
|
125545
|
+
"module": "soma-ui",
|
|
125546
|
+
"file": "src/compiler/context/compile-context.ts",
|
|
125547
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125548
|
+
},
|
|
125549
|
+
{
|
|
125550
|
+
"module": "soma-ui",
|
|
125551
|
+
"file": "src/compiler/driver/cache/region-cache.ts",
|
|
125552
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125553
|
+
},
|
|
125554
|
+
{
|
|
125555
|
+
"module": "soma-ui",
|
|
125556
|
+
"file": "src/compiler/compose/plan.ts",
|
|
125557
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125558
|
+
},
|
|
125559
|
+
{
|
|
125560
|
+
"module": "soma-ui",
|
|
125561
|
+
"file": "src/app/server.ts",
|
|
125562
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125563
|
+
},
|
|
125564
|
+
{
|
|
125565
|
+
"module": "soma-core",
|
|
125566
|
+
"file": "core/server/registry/api-registry-store.ts",
|
|
125567
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125568
|
+
},
|
|
125569
|
+
{
|
|
125570
|
+
"module": "soma-core",
|
|
125571
|
+
"file": "core/client/engines/diff/index.ts",
|
|
125572
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125573
|
+
},
|
|
125574
|
+
{
|
|
125575
|
+
"module": "soma-core",
|
|
125576
|
+
"file": "core/client/engines/highlight/index.ts",
|
|
125577
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125578
|
+
},
|
|
125579
|
+
{
|
|
125580
|
+
"module": "soma-core",
|
|
125581
|
+
"file": "core/server/registry/page-registry-store.ts",
|
|
125582
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125583
|
+
},
|
|
125584
|
+
{
|
|
125585
|
+
"module": "soma-core",
|
|
125586
|
+
"file": "core/server/registry/asset-store.ts",
|
|
125587
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125588
|
+
},
|
|
125589
|
+
{
|
|
125590
|
+
"module": "soma-core",
|
|
125591
|
+
"file": "core/server/registry/batch-stage.ts",
|
|
125592
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125593
|
+
},
|
|
125594
|
+
{
|
|
125595
|
+
"module": "soma-core",
|
|
125596
|
+
"file": "core/server/registry/request-body-limit.ts",
|
|
125597
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125598
|
+
},
|
|
125599
|
+
{
|
|
125600
|
+
"module": "soma-core",
|
|
125601
|
+
"file": "core/server/registry/registry-file-lock.ts",
|
|
125602
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125603
|
+
},
|
|
125604
|
+
{
|
|
125605
|
+
"module": "soma-core",
|
|
125606
|
+
"file": "core/server/api/paged-list.ts",
|
|
125607
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125608
|
+
},
|
|
125609
|
+
{
|
|
125610
|
+
"module": "soma-core",
|
|
125611
|
+
"file": "core/server/registry/registry-write-pipeline.ts",
|
|
125612
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125613
|
+
},
|
|
125614
|
+
{
|
|
125615
|
+
"module": "soma-core",
|
|
125616
|
+
"file": "core/server/registry/page-registry-repository.ts",
|
|
125617
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125618
|
+
},
|
|
125619
|
+
{
|
|
125620
|
+
"module": "soma-core",
|
|
125621
|
+
"file": "core/server/registry/source/version-store.ts",
|
|
125622
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125623
|
+
},
|
|
125624
|
+
{
|
|
125625
|
+
"module": "soma-core",
|
|
125626
|
+
"file": "core/server/runtime-space/inject.ts",
|
|
125627
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125628
|
+
},
|
|
125629
|
+
{
|
|
125630
|
+
"module": "soma-ui",
|
|
125631
|
+
"file": "src/compiler/bdl/registry/archive.ts",
|
|
125632
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125633
|
+
},
|
|
125634
|
+
{
|
|
125635
|
+
"module": "soma-ui",
|
|
125636
|
+
"file": "src/compiler/bdl/registry/publish.ts",
|
|
125637
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125638
|
+
},
|
|
125639
|
+
{
|
|
125640
|
+
"module": "soma-core",
|
|
125641
|
+
"file": "core/server/host/published-page-artifact-cache.ts",
|
|
125642
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125643
|
+
},
|
|
125644
|
+
{
|
|
125645
|
+
"module": "soma-core",
|
|
125646
|
+
"file": "core/server/runtime-space/store.ts",
|
|
125647
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125648
|
+
},
|
|
125649
|
+
{
|
|
125650
|
+
"module": "soma-core",
|
|
125651
|
+
"file": "core/server/runtime-space/static-source.ts",
|
|
125652
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125653
|
+
},
|
|
125654
|
+
{
|
|
125655
|
+
"module": "soma-core",
|
|
125656
|
+
"file": "core/server/runtime-space/dynamic-pages.ts",
|
|
125657
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125658
|
+
},
|
|
125659
|
+
{
|
|
125660
|
+
"module": "soma-core",
|
|
125661
|
+
"file": "core/server/infra/cache/ServerFileCache.ts",
|
|
125662
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125663
|
+
},
|
|
125664
|
+
{
|
|
125665
|
+
"module": "soma-foundation",
|
|
125666
|
+
"file": "src/predicates/predicates.ts",
|
|
125667
|
+
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
125668
|
+
},
|
|
125669
|
+
{
|
|
125670
|
+
"module": "soma-core",
|
|
125671
|
+
"file": "core/client/base/SomaHttpClient.ts",
|
|
125672
|
+
"symbol": "SOMA_PIPELINE_HOST_HTTP_REQUEST_TIMEOUT_MS"
|
|
125673
|
+
},
|
|
125674
|
+
{
|
|
125675
|
+
"module": "soma-core",
|
|
125676
|
+
"file": "core/client/infra/http/SomaHttpService.ts",
|
|
125677
|
+
"symbol": "SOMA_PIPELINE_HOST_HTTP_REQUEST_TIMEOUT_MS"
|
|
125678
|
+
},
|
|
125679
|
+
{
|
|
125680
|
+
"module": "soma-core",
|
|
125681
|
+
"file": "core/client/runtime/SomaRuntimeServices.ts",
|
|
125682
|
+
"symbol": "SOMA_PIPELINE_HOST_HTTP_REQUEST_TIMEOUT_MS"
|
|
125683
|
+
},
|
|
125684
|
+
{
|
|
125685
|
+
"module": "soma-foundation",
|
|
125686
|
+
"file": "src/layout/flow-editor-geometry.ts",
|
|
125687
|
+
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
125688
|
+
},
|
|
125689
|
+
{
|
|
125690
|
+
"module": "soma-foundation",
|
|
125691
|
+
"file": "src/data/session/session-parser.ts",
|
|
125692
|
+
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
125693
|
+
},
|
|
125694
|
+
{
|
|
125695
|
+
"module": "soma-core",
|
|
125696
|
+
"file": "core/client/parser/subscribe-parser.ts",
|
|
125697
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125698
|
+
},
|
|
125699
|
+
{
|
|
125700
|
+
"module": "soma-foundation",
|
|
125701
|
+
"file": "src/data/declare/window-parser.ts",
|
|
125702
|
+
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
125703
|
+
},
|
|
125704
|
+
{
|
|
125705
|
+
"module": "soma-foundation",
|
|
125706
|
+
"file": "src/data/runtime/region-query-defaults.ts",
|
|
125707
|
+
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
125708
|
+
},
|
|
125709
|
+
{
|
|
125710
|
+
"module": "soma-ui",
|
|
125711
|
+
"file": "src/data-std/execution-parser.ts",
|
|
125712
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125713
|
+
},
|
|
125714
|
+
{
|
|
125715
|
+
"module": "soma-ui",
|
|
125716
|
+
"file": "src/data-std/embed-path.ts",
|
|
125717
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125718
|
+
},
|
|
125719
|
+
{
|
|
125720
|
+
"module": "soma-core",
|
|
125721
|
+
"file": "core/shared/page-envelope.ts",
|
|
125722
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125723
|
+
},
|
|
125724
|
+
{
|
|
125725
|
+
"module": "soma-core",
|
|
125726
|
+
"file": "core/server/runtime-space/nav-catalog.ts",
|
|
125727
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125728
|
+
},
|
|
125729
|
+
{
|
|
125730
|
+
"module": "soma-ui",
|
|
125731
|
+
"file": "src/compiler/contract/tiers.ts",
|
|
125732
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125733
|
+
},
|
|
125734
|
+
{
|
|
125735
|
+
"module": "soma-ui",
|
|
125736
|
+
"file": "src/compiler/compose/families/monitor.ts",
|
|
125737
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125738
|
+
},
|
|
125739
|
+
{
|
|
125740
|
+
"module": "soma-ui",
|
|
125741
|
+
"file": "src/compiler/compose/families/navigate.ts",
|
|
125742
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125743
|
+
},
|
|
125744
|
+
{
|
|
125745
|
+
"module": "soma-ui",
|
|
125746
|
+
"file": "src/compiler/compose/match-unit.ts",
|
|
125747
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125748
|
+
},
|
|
125749
|
+
{
|
|
125750
|
+
"module": "soma-ui",
|
|
125751
|
+
"file": "src/compiler/compose/plan.ts",
|
|
125752
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125753
|
+
},
|
|
125754
|
+
{
|
|
125755
|
+
"module": "soma-ui",
|
|
125756
|
+
"file": "src/compiler/compose/recipe-expand.ts",
|
|
125757
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125758
|
+
},
|
|
125759
|
+
{
|
|
125760
|
+
"module": "soma-ui",
|
|
125761
|
+
"file": "src/compiler/settle/control-form.ts",
|
|
125762
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125763
|
+
},
|
|
125764
|
+
{
|
|
125765
|
+
"module": "soma-ui",
|
|
125766
|
+
"file": "src/compiler/space/spatial.ts",
|
|
125767
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125768
|
+
},
|
|
125769
|
+
{
|
|
125770
|
+
"module": "soma-ui",
|
|
125771
|
+
"file": "src/compiler/contract/generate.types.ts",
|
|
125772
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125773
|
+
},
|
|
125774
|
+
{
|
|
125775
|
+
"module": "soma-ui",
|
|
125776
|
+
"file": "src/data-kit/filter-model/presets.ts",
|
|
125777
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125778
|
+
},
|
|
125779
|
+
{
|
|
125780
|
+
"module": "soma-ui",
|
|
125781
|
+
"file": "src/data-kit/filter-model/url-state.ts",
|
|
125782
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125783
|
+
},
|
|
125784
|
+
{
|
|
125785
|
+
"module": "soma-ui",
|
|
125786
|
+
"file": "src/data-kit/notice.ts",
|
|
125787
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125788
|
+
},
|
|
125789
|
+
{
|
|
125790
|
+
"module": "soma-ui",
|
|
125791
|
+
"file": "src/data-kit/views/records.ts",
|
|
125792
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125793
|
+
},
|
|
125794
|
+
{
|
|
125795
|
+
"module": "soma-foundation",
|
|
125796
|
+
"file": "src/layout/host-defaults.ts",
|
|
125797
|
+
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
125798
|
+
},
|
|
125799
|
+
{
|
|
125800
|
+
"module": "soma-foundation",
|
|
125801
|
+
"file": "src/values/index.ts",
|
|
125802
|
+
"symbol": "SOMA_PIPELINE_HOST_HTTP_REQUEST_TIMEOUT_MS"
|
|
125803
|
+
},
|
|
125804
|
+
{
|
|
125805
|
+
"module": "soma-kit",
|
|
125806
|
+
"file": "src/app/define-kit-actions.ts",
|
|
125807
|
+
"symbol": "SOMA_PIPELINE_HOST_HTTP_REQUEST_TIMEOUT_MS"
|
|
125808
|
+
},
|
|
125809
|
+
{
|
|
125810
|
+
"module": "soma-foundation",
|
|
125811
|
+
"file": "src/style/audit-state-distinct.ts",
|
|
125812
|
+
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
125813
|
+
},
|
|
125814
|
+
{
|
|
125815
|
+
"module": "soma-foundation",
|
|
125816
|
+
"file": "src/style/relative-color.ts",
|
|
125817
|
+
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
125818
|
+
},
|
|
125819
|
+
{
|
|
125820
|
+
"module": "soma-foundation",
|
|
125821
|
+
"file": "src/primitives/guard.ts",
|
|
125822
|
+
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
125823
|
+
},
|
|
125824
|
+
{
|
|
125825
|
+
"module": "soma-foundation",
|
|
125826
|
+
"file": "src/layout/types.ts",
|
|
125827
|
+
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
125828
|
+
},
|
|
125829
|
+
{
|
|
125830
|
+
"module": "soma-foundation",
|
|
125831
|
+
"file": "src/theme/palette.ts",
|
|
125832
|
+
"symbol": "SOMA_PIPELINE_LIMITS_FOUNDATION"
|
|
125833
|
+
},
|
|
125834
|
+
{
|
|
125835
|
+
"module": "soma-testkit",
|
|
125836
|
+
"file": "src/mock/node/cli.mjs",
|
|
125837
|
+
"symbol": "SOMA_PIPELINE_LIMITS_MOCK"
|
|
125838
|
+
},
|
|
125839
|
+
{
|
|
125840
|
+
"module": "soma-testkit",
|
|
125841
|
+
"file": "src/mock/node/context.mjs",
|
|
125842
|
+
"symbol": "SOMA_PIPELINE_LIMITS_MOCK"
|
|
125843
|
+
},
|
|
125844
|
+
{
|
|
125845
|
+
"module": "soma-testkit",
|
|
125846
|
+
"file": "src/mock/node/process-lifecycle.mjs",
|
|
125847
|
+
"symbol": "SOMA_PIPELINE_LIMITS_MOCK"
|
|
125848
|
+
},
|
|
125849
|
+
{
|
|
125850
|
+
"module": "soma-testkit",
|
|
125851
|
+
"file": "src/mock/node/registry.mjs",
|
|
125852
|
+
"symbol": "SOMA_PIPELINE_LIMITS_MOCK"
|
|
125853
|
+
},
|
|
125854
|
+
{
|
|
125855
|
+
"module": "soma-testkit",
|
|
125856
|
+
"file": "src/mock/node/schema-generator.mjs",
|
|
125857
|
+
"symbol": "SOMA_PIPELINE_LIMITS_MOCK"
|
|
125858
|
+
},
|
|
125859
|
+
{
|
|
125860
|
+
"module": "soma-testkit",
|
|
125861
|
+
"file": "src/mock/testing/host-harness.mjs",
|
|
125862
|
+
"symbol": "SOMA_PIPELINE_LIMITS_MOCK"
|
|
125863
|
+
},
|
|
125864
|
+
{
|
|
125865
|
+
"module": "soma-ai",
|
|
125866
|
+
"file": "src/domain/ai-shared/AiLimits.ts",
|
|
125867
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI"
|
|
125868
|
+
},
|
|
125869
|
+
{
|
|
125870
|
+
"module": "soma-ai",
|
|
125871
|
+
"file": "src/domain/ai-shared/AiRuntimeConfig.ts",
|
|
125872
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI"
|
|
125873
|
+
},
|
|
125874
|
+
{
|
|
125875
|
+
"module": "soma-ai",
|
|
125876
|
+
"file": "src/domain/ai-shared/JsonlRetention.ts",
|
|
125877
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI"
|
|
125878
|
+
},
|
|
125879
|
+
{
|
|
125880
|
+
"module": "soma-ai",
|
|
125881
|
+
"file": "src/server/common/RateLimitBackend.ts",
|
|
125882
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI"
|
|
125883
|
+
},
|
|
125884
|
+
{
|
|
125885
|
+
"module": "soma-ai",
|
|
125886
|
+
"file": "src/server/common/RequestBodyLimit.ts",
|
|
125887
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI"
|
|
125888
|
+
},
|
|
125889
|
+
{
|
|
125890
|
+
"module": "soma-ai",
|
|
125891
|
+
"file": "src/server/services/ai-assistant/Chat.ts",
|
|
125892
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI"
|
|
125893
|
+
},
|
|
125894
|
+
{
|
|
125895
|
+
"module": "soma-ai",
|
|
125896
|
+
"file": "src/domain/ai-assistant/widget/AiChatHistoryStore.ts",
|
|
125897
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI"
|
|
125898
|
+
},
|
|
125899
|
+
{
|
|
125900
|
+
"module": "soma-ai",
|
|
125901
|
+
"file": "src/domain/ai-assistant/toolkit/AssistantToolRegistry.ts",
|
|
125902
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI"
|
|
125903
|
+
},
|
|
125904
|
+
{
|
|
125905
|
+
"module": "soma-ai",
|
|
125906
|
+
"file": "src/domain/ai-shared/TrustedRequestContext.ts",
|
|
125907
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI_RUNTIME"
|
|
125908
|
+
},
|
|
125909
|
+
{
|
|
125910
|
+
"module": "soma-ai",
|
|
125911
|
+
"file": "src/domain/ai-assistant/widget/mountAssistantWidget.ts",
|
|
125912
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI_RUNTIME"
|
|
125913
|
+
},
|
|
125914
|
+
{
|
|
125915
|
+
"module": "soma-ai",
|
|
125916
|
+
"file": "src/domain/ai-assistant/SuggestedPrompts.ts",
|
|
125917
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI_RUNTIME"
|
|
125918
|
+
},
|
|
125919
|
+
{
|
|
125920
|
+
"module": "soma-ai",
|
|
125921
|
+
"file": "src/domain/ai-assistant/page-operate/mountPageOperateEffect.ts",
|
|
125922
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI_RUNTIME"
|
|
125923
|
+
},
|
|
125924
|
+
{
|
|
125925
|
+
"module": "soma-ai",
|
|
125926
|
+
"file": "src/domain/ai-shared/AiRuntimeConfig.ts",
|
|
125927
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI_RUNTIME"
|
|
125928
|
+
},
|
|
125929
|
+
{
|
|
125930
|
+
"module": "soma-ai",
|
|
125931
|
+
"file": "src/domain/ai-shared/AiRunContext.ts",
|
|
125932
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI_RUNTIME"
|
|
125933
|
+
},
|
|
125934
|
+
{
|
|
125935
|
+
"module": "soma-ai-page",
|
|
125936
|
+
"file": "src/versions/limits.ts",
|
|
125937
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI_PAGE"
|
|
125938
|
+
},
|
|
125939
|
+
{
|
|
125940
|
+
"module": "soma-ai-page",
|
|
125941
|
+
"file": "src/GenerateLimits.ts",
|
|
125942
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI_PAGE"
|
|
125943
|
+
},
|
|
125944
|
+
{
|
|
125945
|
+
"module": "soma-ai-page",
|
|
125946
|
+
"file": "src/PageLimits.ts",
|
|
125947
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI_PAGE"
|
|
125948
|
+
},
|
|
125949
|
+
{
|
|
125950
|
+
"module": "soma-ui",
|
|
125951
|
+
"file": "src/app/submit.ts",
|
|
125952
|
+
"symbol": "SOMA_PIPELINE_LIMITS"
|
|
125953
|
+
},
|
|
125954
|
+
{
|
|
125955
|
+
"module": "soma-robot",
|
|
125956
|
+
"file": "src/common/limits.ts",
|
|
125957
|
+
"symbol": "SOMA_PIPELINE_LIMITS_AI_ROBOT"
|
|
125802
125958
|
}
|
|
125803
|
-
|
|
125804
|
-
|
|
125805
|
-
|
|
125806
|
-
|
|
125807
|
-
|
|
125808
|
-
|
|
125809
|
-
|
|
125810
|
-
|
|
125811
|
-
|
|
125812
|
-
|
|
125813
|
-
|
|
125814
|
-
|
|
125815
|
-
|
|
125816
|
-
|
|
125817
|
-
|
|
125818
|
-
|
|
125819
|
-
|
|
125820
|
-
|
|
125821
|
-
|
|
125822
|
-
|
|
125823
|
-
|
|
125824
|
-
|
|
125825
|
-
|
|
125826
|
-
|
|
125827
|
-
|
|
125959
|
+
],
|
|
125960
|
+
"registry": {
|
|
125961
|
+
"recordMaxBytes": 65536,
|
|
125962
|
+
"declarationMaxBytes": 131072,
|
|
125963
|
+
"assetMaxBytes": 2097152,
|
|
125964
|
+
"batchMaxPages": 200,
|
|
125965
|
+
"writeMaxBytes": 1048576
|
|
125966
|
+
},
|
|
125967
|
+
"cache": {
|
|
125968
|
+
"regionCapacity": 256,
|
|
125969
|
+
"generationCapacity": 256,
|
|
125970
|
+
"apiRecordCapacity": 512,
|
|
125971
|
+
"pageDeclarationCapacity": 64,
|
|
125972
|
+
"sourceAssetCapacity": 64,
|
|
125973
|
+
"publishedArtifactCapacity": 64,
|
|
125974
|
+
"watchFailLimit": 2,
|
|
125975
|
+
"serverFileMaxEntries": 512,
|
|
125976
|
+
"serverFileMaxBytes": 33554432,
|
|
125977
|
+
"serverDirMaxEntries": 256,
|
|
125978
|
+
"sourceRootAliasCapacity": 64
|
|
125979
|
+
},
|
|
125980
|
+
"runtimeCache": {
|
|
125981
|
+
"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",
|
|
125982
|
+
"pageCapacity": 256,
|
|
125983
|
+
"staticScanTtlMs": 1e3
|
|
125984
|
+
},
|
|
125985
|
+
"retry": {
|
|
125986
|
+
"casAttempts": 5,
|
|
125987
|
+
"archivePinAttempts": 3,
|
|
125988
|
+
"archiveRounds": 5,
|
|
125989
|
+
"publishRounds": 5
|
|
125990
|
+
},
|
|
125991
|
+
"fileLock": {
|
|
125992
|
+
"staleMs": 1e4,
|
|
125993
|
+
"maxWaitMs": 5e3,
|
|
125994
|
+
"waitSliceMs": 15
|
|
125995
|
+
},
|
|
125996
|
+
"pagedList": {
|
|
125997
|
+
"pageSizeDefault": 10,
|
|
125998
|
+
"pageSizeMax": 500
|
|
125999
|
+
},
|
|
126000
|
+
"writeRate": {
|
|
126001
|
+
"limit": 120,
|
|
126002
|
+
"windowMs": 6e4
|
|
126003
|
+
},
|
|
126004
|
+
"subscribe": {
|
|
126005
|
+
"maxSubscriptions": 8,
|
|
126006
|
+
"maxDebounceMs": 1e4,
|
|
126007
|
+
"defaultDebounceMs": 300
|
|
126008
|
+
},
|
|
126009
|
+
"inject": {
|
|
126010
|
+
"pageMaxBytes": 4194304,
|
|
126011
|
+
"batchFailureMessageMaxChars": 2e3
|
|
126012
|
+
},
|
|
126013
|
+
"execution": {
|
|
126014
|
+
"maxNodes": 128,
|
|
126015
|
+
"maxDeps": 128,
|
|
126016
|
+
"maxEdges": 1024,
|
|
126017
|
+
"maxConcurrency": {
|
|
126018
|
+
"default": 4,
|
|
126019
|
+
"max": 32
|
|
126020
|
+
},
|
|
126021
|
+
"maxAttempts": {
|
|
126022
|
+
"default": 3,
|
|
126023
|
+
"max": 32
|
|
126024
|
+
},
|
|
126025
|
+
"confirmMessageMax": 1e3,
|
|
126026
|
+
"path": {
|
|
126027
|
+
"maxSegments": 24,
|
|
126028
|
+
"segmentMaxLength": 128,
|
|
126029
|
+
"indexBound": 2e4
|
|
126030
|
+
},
|
|
126031
|
+
"inputMaxDepth": 16
|
|
126032
|
+
},
|
|
126033
|
+
"envelope": {
|
|
126034
|
+
"basis": {
|
|
126035
|
+
"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",
|
|
126036
|
+
"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"
|
|
126037
|
+
},
|
|
126038
|
+
"urlMaxLength": 256,
|
|
126039
|
+
"urlMaxSegments": 8,
|
|
126040
|
+
"segmentMaxLength": 63,
|
|
126041
|
+
"labelMaxLength": 32,
|
|
126042
|
+
"paramMaxLen": 200,
|
|
126043
|
+
"paramEnumValuesMax": 32,
|
|
126044
|
+
"intMaxDigits": 15,
|
|
126045
|
+
"queryMaxItems": 12,
|
|
126046
|
+
"titleMaxEm": 32,
|
|
126047
|
+
"subtitleMaxEm": 80,
|
|
126048
|
+
"descriptionMaxCodepoints": 160,
|
|
126049
|
+
"tagsMax": 8,
|
|
126050
|
+
"rolesMax": 16,
|
|
126051
|
+
"navOrderMax": 999,
|
|
126052
|
+
"navOrderDefault": 500,
|
|
126053
|
+
"navGroupMax": 7,
|
|
126054
|
+
"navDefaultGroup": "main",
|
|
126055
|
+
"expiresMaxDays": 30
|
|
126056
|
+
},
|
|
126057
|
+
"provenance": {
|
|
126058
|
+
"basis": {
|
|
126059
|
+
"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",
|
|
126060
|
+
"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",
|
|
126061
|
+
"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"
|
|
126062
|
+
},
|
|
126063
|
+
"maxBytes": 4096,
|
|
126064
|
+
"maxRepairKinds": 16,
|
|
126065
|
+
"maxGates": 8
|
|
126066
|
+
},
|
|
126067
|
+
"browserWeight": {
|
|
126068
|
+
"entryGzipBytes": {
|
|
126069
|
+
"soma-core/core/index.ts": 524288,
|
|
126070
|
+
"soma-core/core/client/runtime-entry.ts": 524288,
|
|
126071
|
+
"soma-ui/src/app/index.ts": 524288,
|
|
126072
|
+
"soma-kit/src/app/index.ts": 327680
|
|
125828
126073
|
}
|
|
125829
|
-
}
|
|
125830
|
-
|
|
125831
|
-
|
|
125832
|
-
|
|
125833
|
-
|
|
125834
|
-
|
|
125835
|
-
|
|
125836
|
-
|
|
125837
|
-
|
|
125838
|
-
|
|
125839
|
-
|
|
125840
|
-
|
|
125841
|
-
|
|
125842
|
-
|
|
125843
|
-
|
|
125844
|
-
|
|
125845
|
-
|
|
125846
|
-
|
|
125847
|
-
|
|
125848
|
-
|
|
125849
|
-
|
|
125850
|
-
|
|
125851
|
-
|
|
125852
|
-
|
|
125853
|
-
|
|
125854
|
-
|
|
125855
|
-
|
|
125856
|
-
|
|
125857
|
-
|
|
125858
|
-
|
|
125859
|
-
|
|
125860
|
-
|
|
125861
|
-
|
|
125862
|
-
|
|
125863
|
-
|
|
125864
|
-
|
|
125865
|
-
|
|
125866
|
-
|
|
125867
|
-
|
|
125868
|
-
|
|
125869
|
-
|
|
125870
|
-
|
|
125871
|
-
|
|
125872
|
-
|
|
125873
|
-
|
|
125874
|
-
|
|
125875
|
-
|
|
125876
|
-
|
|
126074
|
+
},
|
|
126075
|
+
"themeBudget": {
|
|
126076
|
+
"tokensBytes": 40960,
|
|
126077
|
+
"componentBytesPerPage": 163840,
|
|
126078
|
+
"overrideBlockBytes": 8192
|
|
126079
|
+
},
|
|
126080
|
+
"contentEngines": {
|
|
126081
|
+
"diff": {
|
|
126082
|
+
"basis": {
|
|
126083
|
+
"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",
|
|
126084
|
+
"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",
|
|
126085
|
+
"timeoutMs": "\u4E00\u6B21 diffProse / diffItems \u7684\u603B\u65F6\u9650\uFF08\u6BEB\u79D2\uFF09\uFF0C\u540C VisualEditor timeout 1000\uFF08\u7B14\u8BB0 C.2\uFF09",
|
|
126086
|
+
"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",
|
|
126087
|
+
"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",
|
|
126088
|
+
"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",
|
|
126089
|
+
"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",
|
|
126090
|
+
"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",
|
|
126091
|
+
"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",
|
|
126092
|
+
"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",
|
|
126093
|
+
"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",
|
|
126094
|
+
"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",
|
|
126095
|
+
"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",
|
|
126096
|
+
"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",
|
|
126097
|
+
"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",
|
|
126098
|
+
"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"
|
|
126099
|
+
},
|
|
126100
|
+
"maxChars": 2e5,
|
|
126101
|
+
"maxCharsPerCompare": 2e4,
|
|
126102
|
+
"timeoutMs": 1e3,
|
|
126103
|
+
"maxItems": 2e3,
|
|
126104
|
+
"moveDetectMaxChanged": 500,
|
|
126105
|
+
"pairAt": 0.5,
|
|
126106
|
+
"rewriteBelow": 0.4,
|
|
126107
|
+
"absorbOrphan": 1,
|
|
126108
|
+
"absorbOrphanMax": 4,
|
|
126109
|
+
"titleAt": 0.6,
|
|
126110
|
+
"bodyAt": 0.5,
|
|
126111
|
+
"maxAlignTokens": 6400,
|
|
126112
|
+
"maxPairMatrix": 2500,
|
|
126113
|
+
"maxPairCandidates": 25e4,
|
|
126114
|
+
"codeContext": 3,
|
|
126115
|
+
"codeIntraMaxLine": 500
|
|
126116
|
+
},
|
|
126117
|
+
"highlight": {
|
|
126118
|
+
"basis": {
|
|
126119
|
+
"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",
|
|
126120
|
+
"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",
|
|
126121
|
+
"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",
|
|
126122
|
+
"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",
|
|
126123
|
+
"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"
|
|
126124
|
+
},
|
|
126125
|
+
"maxLines": 5e3,
|
|
126126
|
+
"maxLineLength": 2e3,
|
|
126127
|
+
"timeoutMs": 1e3,
|
|
126128
|
+
"maxChars": 1e6,
|
|
126129
|
+
"jsonSniffMaxChars": 2e5
|
|
126130
|
+
},
|
|
126131
|
+
"structured": {
|
|
126132
|
+
"basis": {
|
|
126133
|
+
"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",
|
|
126134
|
+
"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"
|
|
126135
|
+
},
|
|
126136
|
+
"maxChars": 1e6,
|
|
126137
|
+
"maxNodes": 2e5
|
|
126138
|
+
},
|
|
126139
|
+
"markdown": {
|
|
126140
|
+
"basis": {
|
|
126141
|
+
"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",
|
|
126142
|
+
"maxBlocks": "\u5757\u6570\u4E0A\u9650\uFF0C\u8D85\u51FA\u622A\u65AD\u5E76\u6807 truncated\uFF08\u7B14\u8BB0 C.2 maxBlocks 5 000\uFF09",
|
|
126143
|
+
"summaryChars": "meta.summary \u53D6\u53BB\u6807\u8BB0\u5168\u6587\u7684\u524D N \u5B57\uFF08\u7B14\u8BB0 C.2\u300C\u524D 80 \u5B57\u300D\uFF09"
|
|
126144
|
+
},
|
|
126145
|
+
"maxChars": 2e5,
|
|
126146
|
+
"maxBlocks": 5e3,
|
|
126147
|
+
"summaryChars": 80
|
|
125877
126148
|
}
|
|
125878
126149
|
}
|
|
125879
|
-
|
|
125880
|
-
|
|
125881
|
-
|
|
125882
|
-
|
|
125883
|
-
|
|
125884
|
-
|
|
125885
|
-
|
|
125886
|
-
const
|
|
125887
|
-
|
|
125888
|
-
|
|
125889
|
-
const units = pairAligned(aligned, ka2, kb, cfg.pairAt, cfg.maxPairMatrix);
|
|
125890
|
-
const frags = [];
|
|
125891
|
-
for (const u2 of units) {
|
|
125892
|
-
if (u2.op === "eq") frags.push({ op: "eq", v: sb[u2.b] });
|
|
125893
|
-
else if (u2.op === "del") frags.push({ op: "del", v: sa2[u2.a] });
|
|
125894
|
-
else if (u2.op === "ins") frags.push({ op: "ins", v: sb[u2.b] });
|
|
125895
|
-
else frags.push(...await diffWordsMapped(run, cfg, sa2[u2.a], sb[u2.b]));
|
|
125896
|
-
}
|
|
125897
|
-
return absorbOrphans(frags, cfg.absorbOrphan);
|
|
126150
|
+
};
|
|
126151
|
+
|
|
126152
|
+
// core/client/engines/diff/adapter-jsdiff.ts
|
|
126153
|
+
init_load();
|
|
126154
|
+
var wordSegmenter;
|
|
126155
|
+
function zhWordSegmenter() {
|
|
126156
|
+
if (wordSegmenter !== void 0) return wordSegmenter;
|
|
126157
|
+
const ctor = Intl.Segmenter;
|
|
126158
|
+
wordSegmenter = typeof ctor === "function" ? new ctor("zh", { granularity: "word" }) : null;
|
|
126159
|
+
return wordSegmenter;
|
|
125898
126160
|
}
|
|
125899
|
-
function
|
|
125900
|
-
|
|
125901
|
-
|
|
125902
|
-
|
|
125903
|
-
|
|
125904
|
-
|
|
125905
|
-
|
|
125906
|
-
|
|
126161
|
+
function createJsdiffAdapter(adapterOptions = {}) {
|
|
126162
|
+
const load2 = () => loadEngineModule("diff", () => Promise.resolve().then(() => (init_libesm(), libesm_exports)), { telemetry: adapterOptions.telemetry });
|
|
126163
|
+
return {
|
|
126164
|
+
async diff(a2, b2, mode, options) {
|
|
126165
|
+
const lib2 = await load2();
|
|
126166
|
+
const base2 = options?.timeoutMs !== void 0 ? { timeout: options.timeoutMs } : {};
|
|
126167
|
+
let changes;
|
|
126168
|
+
if (mode === "chars") changes = lib2.diffChars(a2, b2, base2);
|
|
126169
|
+
else if (mode === "words") changes = lib2.diffWords(a2, b2, base2);
|
|
126170
|
+
else if (mode === "words-zh") {
|
|
126171
|
+
const seg = zhWordSegmenter();
|
|
126172
|
+
changes = seg === null ? lib2.diffChars(a2, b2, base2) : lib2.diffWords(a2, b2, { ...base2, intlSegmenter: seg });
|
|
126173
|
+
} else changes = lib2.diffLines(a2, b2, options?.ignoreWhitespace === true ? { ...base2, ignoreWhitespace: true } : base2);
|
|
126174
|
+
if (changes === void 0) return null;
|
|
126175
|
+
const parts = [];
|
|
126176
|
+
for (const change of changes) {
|
|
126177
|
+
if (change.value === "") continue;
|
|
126178
|
+
parts.push({ op: change.added === true ? "insert" : change.removed === true ? "delete" : "equal", text: change.value });
|
|
126179
|
+
}
|
|
126180
|
+
return parts;
|
|
125907
126181
|
}
|
|
125908
|
-
if (blk.op === "ins" || blk.op === "del") changes += 1;
|
|
125909
|
-
else if (blk.op === "mod") changes += countChanges(blk.fragments);
|
|
125910
|
-
}
|
|
125911
|
-
return { insChars: ins, delChars: del, changes };
|
|
125912
|
-
}
|
|
125913
|
-
function similarityOf(blocks, aLen, bLen) {
|
|
125914
|
-
if (aLen + bLen === 0) return 1;
|
|
125915
|
-
let eq = 0;
|
|
125916
|
-
for (const blk of blocks) for (const f2 of blk.fragments) if (f2.op === "eq") eq += cpLen(f2.v.replace(/\s+/gu, ""));
|
|
125917
|
-
return Math.min(1, 2 * eq / (aLen + bLen));
|
|
125918
|
-
}
|
|
125919
|
-
var compact2 = (s2) => cpLen(s2.replace(/\s+/gu, ""));
|
|
125920
|
-
function rewriteBlocks(pa2, pb) {
|
|
125921
|
-
return [...pa2.map((v4) => ({ op: "del", fragments: [{ op: "del", v: v4 }] })), ...pb.map((v4) => ({ op: "ins", fragments: [{ op: "ins", v: v4 }] }))];
|
|
125922
|
-
}
|
|
125923
|
-
async function runProse(run, cfg, a2, b2) {
|
|
125924
|
-
const pa2 = splitParagraphs(a2);
|
|
125925
|
-
const pb = splitParagraphs(b2);
|
|
125926
|
-
const granularity = () => run.usedChars ? "chars" : run.usedZh ? "words-zh" : hasHan(a2) || hasHan(b2) ? hasSegmenter() ? "words-zh" : "chars" : "words";
|
|
125927
|
-
const aLen = compact2(a2);
|
|
125928
|
-
const bLen = compact2(b2);
|
|
125929
|
-
const finish = (kind, blocks2, formatOnly = false) => {
|
|
125930
|
-
const stats = statsOf(blocks2);
|
|
125931
|
-
const out2 = { kind, formatOnly, similarity: kind === "same" ? 1 : similarityOf(blocks2, aLen, bLen), blocks: blocks2, stats, granularity: granularity() };
|
|
125932
|
-
return run.degraded !== void 0 ? { ...out2, degraded: run.degraded } : out2;
|
|
125933
126182
|
};
|
|
125934
|
-
if (a2.length + b2.length > cfg.maxChars) {
|
|
125935
|
-
run.degraded = "too-large";
|
|
125936
|
-
return finish(pa2.length > 0 && pb.length > 0 ? "rewrite" : "inline", rewriteBlocks(pa2, pb));
|
|
125937
|
-
}
|
|
125938
|
-
const ka2 = pa2.map((p2) => normalizeWithMap(p2, cfg).text);
|
|
125939
|
-
const kb = pb.map((p2) => normalizeWithMap(p2, cfg).text);
|
|
125940
|
-
if (ka2.length === kb.length && ka2.every((k2, i2) => k2 === kb[i2])) {
|
|
125941
|
-
return finish("same", pb.map((v4) => ({ op: "eq", fragments: [{ op: "eq", v: v4 }] })), a2 !== b2);
|
|
125942
|
-
}
|
|
125943
|
-
if (pa2.length === 0 || pb.length === 0) return finish("inline", rewriteBlocks(pa2, pb));
|
|
125944
|
-
const aligned = await alignKeys(run, ka2, kb, cfg.maxAlignTokens);
|
|
125945
|
-
if (aligned === null) return finish("rewrite", rewriteBlocks(pa2, pb));
|
|
125946
|
-
const units = pairAligned(aligned, ka2, kb, cfg.pairAt, cfg.maxPairMatrix);
|
|
125947
|
-
const blocks = [];
|
|
125948
|
-
for (const u2 of units) {
|
|
125949
|
-
if (u2.op === "eq") blocks.push({ op: "eq", fragments: [{ op: "eq", v: pb[u2.b] }] });
|
|
125950
|
-
else if (u2.op === "del") blocks.push({ op: "del", fragments: [{ op: "del", v: pa2[u2.a] }] });
|
|
125951
|
-
else if (u2.op === "ins") blocks.push({ op: "ins", fragments: [{ op: "ins", v: pb[u2.b] }] });
|
|
125952
|
-
else blocks.push({ op: "mod", fragments: await diffParagraph(run, cfg, pa2[u2.a], pb[u2.b]) });
|
|
125953
|
-
}
|
|
125954
|
-
const sim = similarityOf(blocks, aLen, bLen);
|
|
125955
|
-
if (sim < cfg.rewriteBelow) return finish("rewrite", rewriteBlocks(pa2, pb));
|
|
125956
|
-
return finish("inline", blocks);
|
|
125957
126183
|
}
|
|
125958
126184
|
|
|
125959
126185
|
// core/client/engines/diff/items.ts
|
|
@@ -126183,6 +126409,16 @@ function configOf(o2) {
|
|
|
126183
126409
|
maxPairCandidates: LIMITS.maxPairCandidates
|
|
126184
126410
|
};
|
|
126185
126411
|
}
|
|
126412
|
+
function codeConfigOf(o2) {
|
|
126413
|
+
return {
|
|
126414
|
+
maxChars: LIMITS.maxChars,
|
|
126415
|
+
maxAlignTokens: LIMITS.maxAlignTokens,
|
|
126416
|
+
maxPairMatrix: LIMITS.maxPairMatrix,
|
|
126417
|
+
pairAt: LIMITS.pairAt,
|
|
126418
|
+
context: typeof o2?.context === "number" && Number.isInteger(o2.context) && o2.context >= 0 ? Math.min(o2.context, LIMITS.codeContext) : LIMITS.codeContext,
|
|
126419
|
+
intraMaxLine: LIMITS.codeIntraMaxLine
|
|
126420
|
+
};
|
|
126421
|
+
}
|
|
126186
126422
|
function wholeReplace(a2, b2) {
|
|
126187
126423
|
if (a2 === b2) return a2 === "" ? [] : [{ op: "equal", text: a2 }];
|
|
126188
126424
|
const parts = [];
|
|
@@ -126231,6 +126467,18 @@ function createDiffPort(adapter, options = {}) {
|
|
|
126231
126467
|
});
|
|
126232
126468
|
record2("items", started);
|
|
126233
126469
|
return out2;
|
|
126470
|
+
},
|
|
126471
|
+
async diffCode(a2, b2, codeOptions) {
|
|
126472
|
+
const started = clock();
|
|
126473
|
+
const out2 = await runCode(newRun(codeOptions?.timeoutMs), codeConfigOf(codeOptions), textOrEmpty(a2), textOrEmpty(b2));
|
|
126474
|
+
record2("code", started);
|
|
126475
|
+
return out2;
|
|
126476
|
+
},
|
|
126477
|
+
async diffMarkdown(a2, b2, mdOptions) {
|
|
126478
|
+
const started = clock();
|
|
126479
|
+
const out2 = await runMarkdown(newRun(mdOptions?.timeoutMs), { ...codeConfigOf(mdOptions), maxBlocks: LIMITS.maxItems }, textOrEmpty(a2), textOrEmpty(b2));
|
|
126480
|
+
record2("markdown", started);
|
|
126481
|
+
return out2;
|
|
126234
126482
|
}
|
|
126235
126483
|
};
|
|
126236
126484
|
}
|