dsh-cliworker-now 0.7.7 → 0.7.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +29 -7
- package/README.md +30 -7
- package/lib/account-models.mjs +33 -5
- package/lib/client.js +575 -102
- package/lib/client.js.map +1 -1
- package/lib/index.js +7573 -6269
- package/lib/index.js.map +1 -1
- package/lib/pi-native-catalog.mjs +15 -5
- package/lib/pi-omp-refresh.mjs +3 -3
- package/lib/typert.host.js +194 -26
- package/lib/typert.remote-client.d.ts +6 -0
- package/lib/typert.remote-client.d.ts.map +1 -1
- package/lib/typert.remote-client.js +176 -26
- package/lib/types/client/cli-executable-settings.d.ts +13 -0
- package/lib/types/client/cli-executable-settings.js +128 -0
- package/lib/types/client/cli-executable-settings.js.map +1 -0
- package/lib/types/client/management-styles.d.ts +1 -1
- package/lib/types/client/management-styles.js +4 -0
- package/lib/types/client/management-styles.js.map +1 -1
- package/lib/types/client/settings-dialog.js +134 -45
- package/lib/types/client/settings-dialog.js.map +1 -1
- package/lib/types/client/styles.d.ts +1 -1
- package/lib/types/client/styles.js +18 -16
- package/lib/types/client/styles.js.map +1 -1
- package/lib/types/host/account-models.d.mts +7 -1
- package/lib/types/host/account-models.mjs +33 -5
- package/lib/types/host/accounts.js +51 -19
- package/lib/types/host/accounts.js.map +1 -1
- package/lib/types/host/adapters.d.ts +2 -0
- package/lib/types/host/adapters.js +93 -15
- package/lib/types/host/adapters.js.map +1 -1
- package/lib/types/host/agy-background-environment.d.ts +2 -0
- package/lib/types/host/agy-background-environment.js +7 -0
- package/lib/types/host/agy-background-environment.js.map +1 -0
- package/lib/types/host/claude-native-oauth.js +2 -0
- package/lib/types/host/claude-native-oauth.js.map +1 -1
- package/lib/types/host/claude-own-route.d.ts +15 -3
- package/lib/types/host/claude-own-route.js +158 -33
- package/lib/types/host/claude-own-route.js.map +1 -1
- package/lib/types/host/cli-account-binding.js +9 -4
- package/lib/types/host/cli-account-binding.js.map +1 -1
- package/lib/types/host/cli-executable-paths.d.ts +30 -0
- package/lib/types/host/cli-executable-paths.js +272 -0
- package/lib/types/host/cli-executable-paths.js.map +1 -0
- package/lib/types/host/codex-models.d.ts +3 -1
- package/lib/types/host/codex-models.js +37 -4
- package/lib/types/host/codex-models.js.map +1 -1
- package/lib/types/host/first-party-models.d.ts +4 -0
- package/lib/types/host/first-party-models.js +43 -9
- package/lib/types/host/first-party-models.js.map +1 -1
- package/lib/types/host/hermes-accounts.js +54 -9
- package/lib/types/host/hermes-accounts.js.map +1 -1
- package/lib/types/host/hermes-models.js +21 -2
- package/lib/types/host/hermes-models.js.map +1 -1
- package/lib/types/host/index.d.ts +10 -0
- package/lib/types/host/index.js +121 -6
- package/lib/types/host/index.js.map +1 -1
- package/lib/types/host/native-process.js +14 -4
- package/lib/types/host/native-process.js.map +1 -1
- package/lib/types/host/opencode-native.js +13 -0
- package/lib/types/host/opencode-native.js.map +1 -1
- package/lib/types/host/pi-omp-adapter.js +2 -2
- package/lib/types/host/pi-omp-adapter.js.map +1 -1
- package/lib/types/host/pi-omp-native.js +5 -3
- package/lib/types/host/pi-omp-native.js.map +1 -1
- package/lib/types/host/pi-omp-refresh.mjs +3 -3
- package/lib/types/host/process.d.ts +3 -0
- package/lib/types/host/process.js +3 -1
- package/lib/types/host/process.js.map +1 -1
- package/lib/types/host/runtime.js +5 -1
- package/lib/types/host/runtime.js.map +1 -1
- package/lib/types/host/settings-catalog-cache.d.ts +28 -0
- package/lib/types/host/settings-catalog-cache.js +189 -0
- package/lib/types/host/settings-catalog-cache.js.map +1 -0
- package/lib/types/host/windows-cli-installation.d.ts +4 -0
- package/lib/types/host/windows-cli-installation.js +7 -0
- package/lib/types/host/windows-cli-installation.js.map +1 -1
- package/lib/types/host/windows-codex-launch.d.ts +9 -0
- package/lib/types/host/windows-codex-launch.js +216 -0
- package/lib/types/host/windows-codex-launch.js.map +1 -0
- package/lib/types/host/windows-desktop-cli-installation.d.ts +20 -0
- package/lib/types/host/windows-desktop-cli-installation.js +420 -0
- package/lib/types/host/windows-desktop-cli-installation.js.map +1 -0
- package/lib/types/host/windows-hidden-launch.mjs +3 -1
- package/lib/types/shared/cli-settings.d.ts +8 -0
- package/lib/windows-hidden-launch.mjs +3 -1
- package/package.json +2 -2
package/lib/client.js
CHANGED
|
@@ -3453,6 +3453,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
3453
3453
|
const dsh_cliworker_now_cliworker_catalogForCli_parameter_1$schema = () => dsh_cliworker_now_cliworker_catalogForCli_parameter_1$schema$value ??= string();
|
|
3454
3454
|
let dsh_cliworker_now_cliworker_catalogForCli_result$schema$value;
|
|
3455
3455
|
const dsh_cliworker_now_cliworker_catalogForCli_result$schema = () => dsh_cliworker_now_cliworker_catalogForCli_result$schema$value ??= string();
|
|
3456
|
+
let dsh_cliworker_now_cliworker_cliExecutablePath_parameter_0$schema$value;
|
|
3457
|
+
const dsh_cliworker_now_cliworker_cliExecutablePath_parameter_0$schema = () => dsh_cliworker_now_cliworker_cliExecutablePath_parameter_0$schema$value ??= string();
|
|
3458
|
+
let dsh_cliworker_now_cliworker_cliExecutablePath_parameter_1$schema$value;
|
|
3459
|
+
const dsh_cliworker_now_cliworker_cliExecutablePath_parameter_1$schema = () => dsh_cliworker_now_cliworker_cliExecutablePath_parameter_1$schema$value ??= string();
|
|
3460
|
+
let dsh_cliworker_now_cliworker_cliExecutablePath_result$schema$value;
|
|
3461
|
+
const dsh_cliworker_now_cliworker_cliExecutablePath_result$schema = () => dsh_cliworker_now_cliworker_cliExecutablePath_result$schema$value ??= string();
|
|
3456
3462
|
let dsh_cliworker_now_cliworker_cliSettings_parameter_0$schema$value;
|
|
3457
3463
|
const dsh_cliworker_now_cliworker_cliSettings_parameter_0$schema = () => dsh_cliworker_now_cliworker_cliSettings_parameter_0$schema$value ??= string();
|
|
3458
3464
|
let dsh_cliworker_now_cliworker_cliSettings_result$schema$value;
|
|
@@ -3501,6 +3507,22 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
3501
3507
|
const dsh_cliworker_now_cliworker_history_parameter_3$schema = () => dsh_cliworker_now_cliworker_history_parameter_3$schema$value ??= string();
|
|
3502
3508
|
let dsh_cliworker_now_cliworker_history_result$schema$value;
|
|
3503
3509
|
const dsh_cliworker_now_cliworker_history_result$schema = () => dsh_cliworker_now_cliworker_history_result$schema$value ??= string();
|
|
3510
|
+
let dsh_cliworker_now_cliworker_refreshCatalogForCli_parameter_0$schema$value;
|
|
3511
|
+
const dsh_cliworker_now_cliworker_refreshCatalogForCli_parameter_0$schema = () => dsh_cliworker_now_cliworker_refreshCatalogForCli_parameter_0$schema$value ??= string();
|
|
3512
|
+
let dsh_cliworker_now_cliworker_refreshCatalogForCli_parameter_1$schema$value;
|
|
3513
|
+
const dsh_cliworker_now_cliworker_refreshCatalogForCli_parameter_1$schema = () => dsh_cliworker_now_cliworker_refreshCatalogForCli_parameter_1$schema$value ??= string();
|
|
3514
|
+
let dsh_cliworker_now_cliworker_refreshCatalogForCli_result$schema$value;
|
|
3515
|
+
const dsh_cliworker_now_cliworker_refreshCatalogForCli_result$schema = () => dsh_cliworker_now_cliworker_refreshCatalogForCli_result$schema$value ??= string();
|
|
3516
|
+
let dsh_cliworker_now_cliworker_refreshCliExecutablePath_parameter_0$schema$value;
|
|
3517
|
+
const dsh_cliworker_now_cliworker_refreshCliExecutablePath_parameter_0$schema = () => dsh_cliworker_now_cliworker_refreshCliExecutablePath_parameter_0$schema$value ??= string();
|
|
3518
|
+
let dsh_cliworker_now_cliworker_refreshCliExecutablePath_parameter_1$schema$value;
|
|
3519
|
+
const dsh_cliworker_now_cliworker_refreshCliExecutablePath_parameter_1$schema = () => dsh_cliworker_now_cliworker_refreshCliExecutablePath_parameter_1$schema$value ??= string();
|
|
3520
|
+
let dsh_cliworker_now_cliworker_refreshCliExecutablePath_parameter_2$schema$value;
|
|
3521
|
+
const dsh_cliworker_now_cliworker_refreshCliExecutablePath_parameter_2$schema = () => dsh_cliworker_now_cliworker_refreshCliExecutablePath_parameter_2$schema$value ??= string();
|
|
3522
|
+
let dsh_cliworker_now_cliworker_refreshCliExecutablePath_parameter_3$schema$value;
|
|
3523
|
+
const dsh_cliworker_now_cliworker_refreshCliExecutablePath_parameter_3$schema = () => dsh_cliworker_now_cliworker_refreshCliExecutablePath_parameter_3$schema$value ??= string();
|
|
3524
|
+
let dsh_cliworker_now_cliworker_refreshCliExecutablePath_result$schema$value;
|
|
3525
|
+
const dsh_cliworker_now_cliworker_refreshCliExecutablePath_result$schema = () => dsh_cliworker_now_cliworker_refreshCliExecutablePath_result$schema$value ??= string();
|
|
3504
3526
|
let dsh_cliworker_now_cliworker_renameWorker_parameter_0$schema$value;
|
|
3505
3527
|
const dsh_cliworker_now_cliworker_renameWorker_parameter_0$schema = () => dsh_cliworker_now_cliworker_renameWorker_parameter_0$schema$value ??= string();
|
|
3506
3528
|
let dsh_cliworker_now_cliworker_renameWorker_parameter_1$schema$value;
|
|
@@ -3619,7 +3641,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
3619
3641
|
},
|
|
3620
3642
|
sourceLocation: {
|
|
3621
3643
|
"file": "packages/cliworker/src/host/index.ts",
|
|
3622
|
-
"line":
|
|
3644
|
+
"line": 1035,
|
|
3623
3645
|
"column": 9
|
|
3624
3646
|
}
|
|
3625
3647
|
},
|
|
@@ -3669,7 +3691,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
3669
3691
|
},
|
|
3670
3692
|
sourceLocation: {
|
|
3671
3693
|
"file": "packages/cliworker/src/host/index.ts",
|
|
3672
|
-
"line":
|
|
3694
|
+
"line": 930,
|
|
3673
3695
|
"column": 9
|
|
3674
3696
|
}
|
|
3675
3697
|
},
|
|
@@ -3729,7 +3751,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
3729
3751
|
},
|
|
3730
3752
|
sourceLocation: {
|
|
3731
3753
|
"file": "packages/cliworker/src/host/index.ts",
|
|
3732
|
-
"line":
|
|
3754
|
+
"line": 958,
|
|
3733
3755
|
"column": 9
|
|
3734
3756
|
}
|
|
3735
3757
|
},
|
|
@@ -3789,7 +3811,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
3789
3811
|
},
|
|
3790
3812
|
sourceLocation: {
|
|
3791
3813
|
"file": "packages/cliworker/src/host/index.ts",
|
|
3792
|
-
"line":
|
|
3814
|
+
"line": 941,
|
|
3793
3815
|
"column": 9
|
|
3794
3816
|
}
|
|
3795
3817
|
},
|
|
@@ -3826,7 +3848,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
3826
3848
|
},
|
|
3827
3849
|
sourceLocation: {
|
|
3828
3850
|
"file": "packages/cliworker/src/host/index.ts",
|
|
3829
|
-
"line":
|
|
3851
|
+
"line": 831,
|
|
3830
3852
|
"column": 9
|
|
3831
3853
|
}
|
|
3832
3854
|
},
|
|
@@ -3862,7 +3884,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
3862
3884
|
},
|
|
3863
3885
|
sourceLocation: {
|
|
3864
3886
|
"file": "packages/cliworker/src/host/index.ts",
|
|
3865
|
-
"line":
|
|
3887
|
+
"line": 1051,
|
|
3866
3888
|
"column": 9
|
|
3867
3889
|
}
|
|
3868
3890
|
},
|
|
@@ -3900,7 +3922,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
3900
3922
|
},
|
|
3901
3923
|
sourceLocation: {
|
|
3902
3924
|
"file": "packages/cliworker/src/host/index.ts",
|
|
3903
|
-
"line":
|
|
3925
|
+
"line": 1009,
|
|
3904
3926
|
"column": 10
|
|
3905
3927
|
}
|
|
3906
3928
|
},
|
|
@@ -3949,7 +3971,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
3949
3971
|
},
|
|
3950
3972
|
sourceLocation: {
|
|
3951
3973
|
"file": "packages/cliworker/src/host/index.ts",
|
|
3952
|
-
"line":
|
|
3974
|
+
"line": 1024,
|
|
3953
3975
|
"column": 9
|
|
3954
3976
|
}
|
|
3955
3977
|
},
|
|
@@ -3977,7 +3999,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
3977
3999
|
},
|
|
3978
4000
|
sourceLocation: {
|
|
3979
4001
|
"file": "packages/cliworker/src/host/index.ts",
|
|
3980
|
-
"line":
|
|
4002
|
+
"line": 1061,
|
|
3981
4003
|
"column": 9
|
|
3982
4004
|
}
|
|
3983
4005
|
},
|
|
@@ -4014,7 +4036,44 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4014
4036
|
},
|
|
4015
4037
|
sourceLocation: {
|
|
4016
4038
|
"file": "packages/cliworker/src/host/index.ts",
|
|
4017
|
-
"line":
|
|
4039
|
+
"line": 1066,
|
|
4040
|
+
"column": 9
|
|
4041
|
+
}
|
|
4042
|
+
},
|
|
4043
|
+
{
|
|
4044
|
+
id: "dsh-cliworker-now#cliworker/cliExecutablePath",
|
|
4045
|
+
service: "cliworker",
|
|
4046
|
+
namespace: "cliworker",
|
|
4047
|
+
method: "cliExecutablePath",
|
|
4048
|
+
invocation: { kind: "direct" },
|
|
4049
|
+
parameters: [{
|
|
4050
|
+
name: "parentSessionId",
|
|
4051
|
+
wire: "parentSessionId",
|
|
4052
|
+
source: "json",
|
|
4053
|
+
codec: {
|
|
4054
|
+
mode: "strict",
|
|
4055
|
+
typeSymbol: "dsh-cliworker-now#cliworker/cliExecutablePath:parentSessionId",
|
|
4056
|
+
create: dsh_cliworker_now_cliworker_cliExecutablePath_parameter_0$schema
|
|
4057
|
+
}
|
|
4058
|
+
}, {
|
|
4059
|
+
name: "cli",
|
|
4060
|
+
wire: "cli",
|
|
4061
|
+
source: "json",
|
|
4062
|
+
codec: {
|
|
4063
|
+
mode: "strict",
|
|
4064
|
+
typeSymbol: "dsh-cliworker-now#cliworker/cliExecutablePath:cli",
|
|
4065
|
+
create: dsh_cliworker_now_cliworker_cliExecutablePath_parameter_1$schema
|
|
4066
|
+
}
|
|
4067
|
+
}],
|
|
4068
|
+
cancellation: { parameter: "signal" },
|
|
4069
|
+
result: {
|
|
4070
|
+
mode: "strict",
|
|
4071
|
+
typeSymbol: "dsh-cliworker-now#cliworker/cliExecutablePath:result",
|
|
4072
|
+
create: dsh_cliworker_now_cliworker_cliExecutablePath_result$schema
|
|
4073
|
+
},
|
|
4074
|
+
sourceLocation: {
|
|
4075
|
+
"file": "packages/cliworker/src/host/index.ts",
|
|
4076
|
+
"line": 880,
|
|
4018
4077
|
"column": 9
|
|
4019
4078
|
}
|
|
4020
4079
|
},
|
|
@@ -4042,7 +4101,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4042
4101
|
},
|
|
4043
4102
|
sourceLocation: {
|
|
4044
4103
|
"file": "packages/cliworker/src/host/index.ts",
|
|
4045
|
-
"line":
|
|
4104
|
+
"line": 707,
|
|
4046
4105
|
"column": 9
|
|
4047
4106
|
}
|
|
4048
4107
|
},
|
|
@@ -4079,7 +4138,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4079
4138
|
},
|
|
4080
4139
|
sourceLocation: {
|
|
4081
4140
|
"file": "packages/cliworker/src/host/index.ts",
|
|
4082
|
-
"line":
|
|
4141
|
+
"line": 1105,
|
|
4083
4142
|
"column": 9
|
|
4084
4143
|
}
|
|
4085
4144
|
},
|
|
@@ -4129,7 +4188,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4129
4188
|
},
|
|
4130
4189
|
sourceLocation: {
|
|
4131
4190
|
"file": "packages/cliworker/src/host/index.ts",
|
|
4132
|
-
"line":
|
|
4191
|
+
"line": 1132,
|
|
4133
4192
|
"column": 9
|
|
4134
4193
|
}
|
|
4135
4194
|
},
|
|
@@ -4166,7 +4225,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4166
4225
|
},
|
|
4167
4226
|
sourceLocation: {
|
|
4168
4227
|
"file": "packages/cliworker/src/host/index.ts",
|
|
4169
|
-
"line":
|
|
4228
|
+
"line": 742,
|
|
4170
4229
|
"column": 9
|
|
4171
4230
|
}
|
|
4172
4231
|
},
|
|
@@ -4203,7 +4262,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4203
4262
|
},
|
|
4204
4263
|
sourceLocation: {
|
|
4205
4264
|
"file": "packages/cliworker/src/host/index.ts",
|
|
4206
|
-
"line":
|
|
4265
|
+
"line": 786,
|
|
4207
4266
|
"column": 9
|
|
4208
4267
|
}
|
|
4209
4268
|
},
|
|
@@ -4253,7 +4312,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4253
4312
|
},
|
|
4254
4313
|
sourceLocation: {
|
|
4255
4314
|
"file": "packages/cliworker/src/host/index.ts",
|
|
4256
|
-
"line":
|
|
4315
|
+
"line": 1166,
|
|
4257
4316
|
"column": 9
|
|
4258
4317
|
}
|
|
4259
4318
|
},
|
|
@@ -4312,7 +4371,104 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4312
4371
|
},
|
|
4313
4372
|
sourceLocation: {
|
|
4314
4373
|
"file": "packages/cliworker/src/host/index.ts",
|
|
4315
|
-
"line":
|
|
4374
|
+
"line": 693,
|
|
4375
|
+
"column": 9
|
|
4376
|
+
}
|
|
4377
|
+
},
|
|
4378
|
+
{
|
|
4379
|
+
id: "dsh-cliworker-now#cliworker/refreshCatalogForCli",
|
|
4380
|
+
service: "cliworker",
|
|
4381
|
+
namespace: "cliworker",
|
|
4382
|
+
method: "refreshCatalogForCli",
|
|
4383
|
+
invocation: { kind: "direct" },
|
|
4384
|
+
parameters: [{
|
|
4385
|
+
name: "parentSessionId",
|
|
4386
|
+
wire: "parentSessionId",
|
|
4387
|
+
source: "json",
|
|
4388
|
+
codec: {
|
|
4389
|
+
mode: "strict",
|
|
4390
|
+
typeSymbol: "dsh-cliworker-now#cliworker/refreshCatalogForCli:parentSessionId",
|
|
4391
|
+
create: dsh_cliworker_now_cliworker_refreshCatalogForCli_parameter_0$schema
|
|
4392
|
+
}
|
|
4393
|
+
}, {
|
|
4394
|
+
name: "cli",
|
|
4395
|
+
wire: "cli",
|
|
4396
|
+
source: "json",
|
|
4397
|
+
codec: {
|
|
4398
|
+
mode: "strict",
|
|
4399
|
+
typeSymbol: "dsh-cliworker-now#cliworker/refreshCatalogForCli:cli",
|
|
4400
|
+
create: dsh_cliworker_now_cliworker_refreshCatalogForCli_parameter_1$schema
|
|
4401
|
+
}
|
|
4402
|
+
}],
|
|
4403
|
+
cancellation: { parameter: "signal" },
|
|
4404
|
+
result: {
|
|
4405
|
+
mode: "strict",
|
|
4406
|
+
typeSymbol: "dsh-cliworker-now#cliworker/refreshCatalogForCli:result",
|
|
4407
|
+
create: dsh_cliworker_now_cliworker_refreshCatalogForCli_result$schema
|
|
4408
|
+
},
|
|
4409
|
+
sourceLocation: {
|
|
4410
|
+
"file": "packages/cliworker/src/host/index.ts",
|
|
4411
|
+
"line": 1071,
|
|
4412
|
+
"column": 9
|
|
4413
|
+
}
|
|
4414
|
+
},
|
|
4415
|
+
{
|
|
4416
|
+
id: "dsh-cliworker-now#cliworker/refreshCliExecutablePath",
|
|
4417
|
+
service: "cliworker",
|
|
4418
|
+
namespace: "cliworker",
|
|
4419
|
+
method: "refreshCliExecutablePath",
|
|
4420
|
+
invocation: { kind: "direct" },
|
|
4421
|
+
parameters: [
|
|
4422
|
+
{
|
|
4423
|
+
name: "parentSessionId",
|
|
4424
|
+
wire: "parentSessionId",
|
|
4425
|
+
source: "json",
|
|
4426
|
+
codec: {
|
|
4427
|
+
mode: "strict",
|
|
4428
|
+
typeSymbol: "dsh-cliworker-now#cliworker/refreshCliExecutablePath:parentSessionId",
|
|
4429
|
+
create: dsh_cliworker_now_cliworker_refreshCliExecutablePath_parameter_0$schema
|
|
4430
|
+
}
|
|
4431
|
+
},
|
|
4432
|
+
{
|
|
4433
|
+
name: "cli",
|
|
4434
|
+
wire: "cli",
|
|
4435
|
+
source: "json",
|
|
4436
|
+
codec: {
|
|
4437
|
+
mode: "strict",
|
|
4438
|
+
typeSymbol: "dsh-cliworker-now#cliworker/refreshCliExecutablePath:cli",
|
|
4439
|
+
create: dsh_cliworker_now_cliworker_refreshCliExecutablePath_parameter_1$schema
|
|
4440
|
+
}
|
|
4441
|
+
},
|
|
4442
|
+
{
|
|
4443
|
+
name: "path",
|
|
4444
|
+
wire: "path",
|
|
4445
|
+
source: "json",
|
|
4446
|
+
codec: {
|
|
4447
|
+
mode: "strict",
|
|
4448
|
+
typeSymbol: "dsh-cliworker-now#cliworker/refreshCliExecutablePath:path",
|
|
4449
|
+
create: dsh_cliworker_now_cliworker_refreshCliExecutablePath_parameter_2$schema
|
|
4450
|
+
}
|
|
4451
|
+
},
|
|
4452
|
+
{
|
|
4453
|
+
name: "action",
|
|
4454
|
+
wire: "action",
|
|
4455
|
+
source: "json",
|
|
4456
|
+
codec: {
|
|
4457
|
+
mode: "strict",
|
|
4458
|
+
typeSymbol: "dsh-cliworker-now#cliworker/refreshCliExecutablePath:action",
|
|
4459
|
+
create: dsh_cliworker_now_cliworker_refreshCliExecutablePath_parameter_3$schema
|
|
4460
|
+
}
|
|
4461
|
+
}
|
|
4462
|
+
],
|
|
4463
|
+
cancellation: { parameter: "signal" },
|
|
4464
|
+
result: {
|
|
4465
|
+
mode: "strict",
|
|
4466
|
+
typeSymbol: "dsh-cliworker-now#cliworker/refreshCliExecutablePath:result",
|
|
4467
|
+
create: dsh_cliworker_now_cliworker_refreshCliExecutablePath_result$schema
|
|
4468
|
+
},
|
|
4469
|
+
sourceLocation: {
|
|
4470
|
+
"file": "packages/cliworker/src/host/index.ts",
|
|
4471
|
+
"line": 901,
|
|
4316
4472
|
"column": 9
|
|
4317
4473
|
}
|
|
4318
4474
|
},
|
|
@@ -4362,7 +4518,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4362
4518
|
},
|
|
4363
4519
|
sourceLocation: {
|
|
4364
4520
|
"file": "packages/cliworker/src/host/index.ts",
|
|
4365
|
-
"line":
|
|
4521
|
+
"line": 754,
|
|
4366
4522
|
"column": 9
|
|
4367
4523
|
}
|
|
4368
4524
|
},
|
|
@@ -4412,7 +4568,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4412
4568
|
},
|
|
4413
4569
|
sourceLocation: {
|
|
4414
4570
|
"file": "packages/cliworker/src/host/index.ts",
|
|
4415
|
-
"line":
|
|
4571
|
+
"line": 770,
|
|
4416
4572
|
"column": 9
|
|
4417
4573
|
}
|
|
4418
4574
|
},
|
|
@@ -4462,7 +4618,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4462
4618
|
},
|
|
4463
4619
|
sourceLocation: {
|
|
4464
4620
|
"file": "packages/cliworker/src/host/index.ts",
|
|
4465
|
-
"line":
|
|
4621
|
+
"line": 1194,
|
|
4466
4622
|
"column": 9
|
|
4467
4623
|
}
|
|
4468
4624
|
},
|
|
@@ -4499,7 +4655,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4499
4655
|
},
|
|
4500
4656
|
sourceLocation: {
|
|
4501
4657
|
"file": "packages/cliworker/src/host/index.ts",
|
|
4502
|
-
"line":
|
|
4658
|
+
"line": 797,
|
|
4503
4659
|
"column": 9
|
|
4504
4660
|
}
|
|
4505
4661
|
},
|
|
@@ -4527,7 +4683,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4527
4683
|
},
|
|
4528
4684
|
sourceLocation: {
|
|
4529
4685
|
"file": "packages/cliworker/src/host/index.ts",
|
|
4530
|
-
"line":
|
|
4686
|
+
"line": 718,
|
|
4531
4687
|
"column": 9
|
|
4532
4688
|
}
|
|
4533
4689
|
},
|
|
@@ -4564,7 +4720,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4564
4720
|
},
|
|
4565
4721
|
sourceLocation: {
|
|
4566
4722
|
"file": "packages/cliworker/src/host/index.ts",
|
|
4567
|
-
"line":
|
|
4723
|
+
"line": 729,
|
|
4568
4724
|
"column": 9
|
|
4569
4725
|
}
|
|
4570
4726
|
},
|
|
@@ -4614,7 +4770,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4614
4770
|
},
|
|
4615
4771
|
sourceLocation: {
|
|
4616
4772
|
"file": "packages/cliworker/src/host/index.ts",
|
|
4617
|
-
"line":
|
|
4773
|
+
"line": 808,
|
|
4618
4774
|
"column": 9
|
|
4619
4775
|
}
|
|
4620
4776
|
},
|
|
@@ -4650,7 +4806,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4650
4806
|
},
|
|
4651
4807
|
sourceLocation: {
|
|
4652
4808
|
"file": "packages/cliworker/src/host/index.ts",
|
|
4653
|
-
"line":
|
|
4809
|
+
"line": 1223,
|
|
4654
4810
|
"column": 9
|
|
4655
4811
|
}
|
|
4656
4812
|
},
|
|
@@ -4688,7 +4844,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4688
4844
|
},
|
|
4689
4845
|
sourceLocation: {
|
|
4690
4846
|
"file": "packages/cliworker/src/host/index.ts",
|
|
4691
|
-
"line":
|
|
4847
|
+
"line": 662,
|
|
4692
4848
|
"column": 10
|
|
4693
4849
|
}
|
|
4694
4850
|
}
|
|
@@ -19813,6 +19969,221 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19813
19969
|
}
|
|
19814
19970
|
};
|
|
19815
19971
|
//#endregion
|
|
19972
|
+
//#region lib/types/client/cli-executable-settings.js
|
|
19973
|
+
function readPath(raw, cli) {
|
|
19974
|
+
const next = JSON.parse(raw);
|
|
19975
|
+
if (next?.cli !== cli || typeof next.path !== "string" || typeof next.available !== "boolean" || ![
|
|
19976
|
+
"auto",
|
|
19977
|
+
"manual",
|
|
19978
|
+
"configured",
|
|
19979
|
+
"none"
|
|
19980
|
+
].includes(next.source) || next.error !== void 0 && typeof next.error !== "string") throw new Error("收到不匹配的 CLI 路径信息,请刷新重试");
|
|
19981
|
+
return next;
|
|
19982
|
+
}
|
|
19983
|
+
/** Path management remains usable for a disabled CLI and never saves model defaults. */
|
|
19984
|
+
function CliExecutableSettings({ api, sessionId, cli, blocked, accountLoading, accountRevision, onApplied, onBusyChange }) {
|
|
19985
|
+
const [expanded, setExpanded] = (0, react.useState)(false);
|
|
19986
|
+
const [hasExpanded, setHasExpanded] = (0, react.useState)(false);
|
|
19987
|
+
const [draft, setDraft] = (0, react.useState)("");
|
|
19988
|
+
const [loading, setLoading] = (0, react.useState)(false);
|
|
19989
|
+
const [saving, setSaving] = (0, react.useState)(false);
|
|
19990
|
+
const [error, setError] = (0, react.useState)("");
|
|
19991
|
+
const [feedback, setFeedback] = (0, react.useState)("");
|
|
19992
|
+
const contentId = (0, react.useId)();
|
|
19993
|
+
const inputId = (0, react.useId)();
|
|
19994
|
+
const hintId = (0, react.useId)();
|
|
19995
|
+
const draftRef = (0, react.useRef)(draft);
|
|
19996
|
+
const baseline = (0, react.useRef)("");
|
|
19997
|
+
const revision = (0, react.useRef)(0);
|
|
19998
|
+
const request = (0, react.useRef)();
|
|
19999
|
+
const callbacks = (0, react.useRef)({
|
|
20000
|
+
onApplied,
|
|
20001
|
+
onBusyChange
|
|
20002
|
+
});
|
|
20003
|
+
callbacks.current = {
|
|
20004
|
+
onApplied,
|
|
20005
|
+
onBusyChange
|
|
20006
|
+
};
|
|
20007
|
+
const service = api.cliworker;
|
|
20008
|
+
(0, react.useEffect)(() => () => {
|
|
20009
|
+
request.current?.controller.abort();
|
|
20010
|
+
request.current = void 0;
|
|
20011
|
+
}, []);
|
|
20012
|
+
(0, react.useEffect)(() => {
|
|
20013
|
+
if (request.current?.kind === "write") return;
|
|
20014
|
+
request.current?.controller.abort();
|
|
20015
|
+
request.current = void 0;
|
|
20016
|
+
setLoading(false);
|
|
20017
|
+
if (!expanded || blocked || accountLoading) return;
|
|
20018
|
+
const controller = new AbortController();
|
|
20019
|
+
const editRevision = revision.current;
|
|
20020
|
+
const dirty = draftRef.current.trim() !== baseline.current;
|
|
20021
|
+
request.current = {
|
|
20022
|
+
controller,
|
|
20023
|
+
kind: "read"
|
|
20024
|
+
};
|
|
20025
|
+
setLoading(true);
|
|
20026
|
+
(async () => {
|
|
20027
|
+
try {
|
|
20028
|
+
const next = readPath(value(await service.cliExecutablePath(sessionId, cli, controller.signal)), cli);
|
|
20029
|
+
if (controller.signal.aborted || revision.current !== editRevision) return;
|
|
20030
|
+
baseline.current = next.path;
|
|
20031
|
+
if (!dirty) {
|
|
20032
|
+
draftRef.current = next.path;
|
|
20033
|
+
setDraft(next.path);
|
|
20034
|
+
setError(next.error || "");
|
|
20035
|
+
}
|
|
20036
|
+
} catch (error) {
|
|
20037
|
+
if (!controller.signal.aborted && revision.current === editRevision) setError(operationMessage(error));
|
|
20038
|
+
} finally {
|
|
20039
|
+
if (request.current?.controller === controller) {
|
|
20040
|
+
request.current = void 0;
|
|
20041
|
+
setLoading(false);
|
|
20042
|
+
}
|
|
20043
|
+
}
|
|
20044
|
+
})();
|
|
20045
|
+
}, [
|
|
20046
|
+
service,
|
|
20047
|
+
sessionId,
|
|
20048
|
+
cli,
|
|
20049
|
+
expanded,
|
|
20050
|
+
blocked,
|
|
20051
|
+
accountLoading,
|
|
20052
|
+
accountRevision
|
|
20053
|
+
]);
|
|
20054
|
+
async function refresh(action) {
|
|
20055
|
+
if (blocked || request.current?.kind === "write") return;
|
|
20056
|
+
request.current?.controller.abort();
|
|
20057
|
+
const controller = new AbortController();
|
|
20058
|
+
const submitted = draftRef.current.trim();
|
|
20059
|
+
request.current = {
|
|
20060
|
+
controller,
|
|
20061
|
+
kind: "write"
|
|
20062
|
+
};
|
|
20063
|
+
setLoading(false);
|
|
20064
|
+
setSaving(true);
|
|
20065
|
+
setError("");
|
|
20066
|
+
setFeedback("");
|
|
20067
|
+
callbacks.current.onBusyChange(true);
|
|
20068
|
+
try {
|
|
20069
|
+
const next = readPath(value(await service.refreshCliExecutablePath(sessionId, cli, submitted, action, controller.signal)), cli);
|
|
20070
|
+
if (controller.signal.aborted) return;
|
|
20071
|
+
baseline.current = next.path;
|
|
20072
|
+
if (action === "auto" || next.available) {
|
|
20073
|
+
draftRef.current = next.path;
|
|
20074
|
+
setDraft(next.path);
|
|
20075
|
+
}
|
|
20076
|
+
setError(next.error || (!next.available ? "未找到可用 CLI,请检查路径后重试" : ""));
|
|
20077
|
+
setFeedback(next.available ? action === "auto" ? "已恢复自动识别" : "CLI 路径已刷新" : "");
|
|
20078
|
+
callbacks.current.onApplied();
|
|
20079
|
+
} catch (error) {
|
|
20080
|
+
if (!controller.signal.aborted) setError(operationMessage(error));
|
|
20081
|
+
} finally {
|
|
20082
|
+
if (request.current?.controller === controller) {
|
|
20083
|
+
request.current = void 0;
|
|
20084
|
+
setSaving(false);
|
|
20085
|
+
callbacks.current.onBusyChange(false);
|
|
20086
|
+
}
|
|
20087
|
+
}
|
|
20088
|
+
}
|
|
20089
|
+
return (0, react_jsx_runtime.jsxs)("section", {
|
|
20090
|
+
className: "cwn-settings-section",
|
|
20091
|
+
"aria-label": "高级设置",
|
|
20092
|
+
children: [(0, react_jsx_runtime.jsxs)("div", {
|
|
20093
|
+
className: "cwn-settings-section-head",
|
|
20094
|
+
children: [(0, react_jsx_runtime.jsx)("h3", {
|
|
20095
|
+
className: "cwn-settings-advanced-heading",
|
|
20096
|
+
children: "高级设置"
|
|
20097
|
+
}), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
20098
|
+
type: "button",
|
|
20099
|
+
variant: "ghost",
|
|
20100
|
+
size: "md",
|
|
20101
|
+
className: "cwn-settings-advanced-toggle",
|
|
20102
|
+
"aria-label": "高级设置",
|
|
20103
|
+
"aria-expanded": expanded,
|
|
20104
|
+
"aria-controls": contentId,
|
|
20105
|
+
onClick: () => {
|
|
20106
|
+
setHasExpanded(true);
|
|
20107
|
+
setExpanded((old) => !old);
|
|
20108
|
+
},
|
|
20109
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { size: 14 })
|
|
20110
|
+
})]
|
|
20111
|
+
}), (0, react_jsx_runtime.jsx)("div", {
|
|
20112
|
+
id: contentId,
|
|
20113
|
+
className: "cwn-settings-advanced-body",
|
|
20114
|
+
"data-expanded": expanded,
|
|
20115
|
+
"aria-hidden": !expanded,
|
|
20116
|
+
...!expanded ? { inert: "" } : {},
|
|
20117
|
+
children: (0, react_jsx_runtime.jsx)("div", {
|
|
20118
|
+
className: "cwn-settings-advanced-body-inner",
|
|
20119
|
+
children: hasExpanded && (0, react_jsx_runtime.jsxs)("div", {
|
|
20120
|
+
className: "cwn-cli-path-settings",
|
|
20121
|
+
children: [(0, react_jsx_runtime.jsxs)("label", {
|
|
20122
|
+
className: "cwn-setting-row-text",
|
|
20123
|
+
htmlFor: inputId,
|
|
20124
|
+
children: [(0, react_jsx_runtime.jsx)("span", { children: "CLI 路径管理" }), (0, react_jsx_runtime.jsx)("span", {
|
|
20125
|
+
className: "cwn-setting-description",
|
|
20126
|
+
id: hintId,
|
|
20127
|
+
children: "自动识别安装位置,也可输入 CLI 可执行文件的完整路径。"
|
|
20128
|
+
})]
|
|
20129
|
+
}), (0, react_jsx_runtime.jsxs)("form", {
|
|
20130
|
+
onSubmit: (event) => {
|
|
20131
|
+
event.preventDefault();
|
|
20132
|
+
refresh(draftRef.current.trim() === baseline.current ? "refresh" : "manual");
|
|
20133
|
+
},
|
|
20134
|
+
children: [
|
|
20135
|
+
(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
|
|
20136
|
+
id: inputId,
|
|
20137
|
+
className: "cwn-control-input cwn-cli-path-input",
|
|
20138
|
+
"aria-label": `${CLI_LABELS[cli]} CLI 路径`,
|
|
20139
|
+
"aria-describedby": hintId,
|
|
20140
|
+
value: draft,
|
|
20141
|
+
disabled: blocked || saving,
|
|
20142
|
+
spellCheck: false,
|
|
20143
|
+
autoComplete: "off",
|
|
20144
|
+
placeholder: "输入 CLI 可执行文件的完整路径",
|
|
20145
|
+
onChange: (event) => {
|
|
20146
|
+
revision.current++;
|
|
20147
|
+
draftRef.current = event.target.value;
|
|
20148
|
+
setDraft(event.target.value);
|
|
20149
|
+
setError("");
|
|
20150
|
+
setFeedback("");
|
|
20151
|
+
}
|
|
20152
|
+
}),
|
|
20153
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
20154
|
+
className: "cwn-cli-path-actions",
|
|
20155
|
+
children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
20156
|
+
type: "button",
|
|
20157
|
+
variant: "ghost",
|
|
20158
|
+
size: "md",
|
|
20159
|
+
disabled: blocked || saving,
|
|
20160
|
+
onClick: () => void refresh("auto"),
|
|
20161
|
+
children: "恢复自动识别"
|
|
20162
|
+
}), (0, react_jsx_runtime.jsxs)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
20163
|
+
type: "submit",
|
|
20164
|
+
variant: "outline",
|
|
20165
|
+
size: "md",
|
|
20166
|
+
"aria-label": "刷新 CLI 路径",
|
|
20167
|
+
disabled: blocked || saving,
|
|
20168
|
+
children: [(loading || saving) && (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, {
|
|
20169
|
+
state: "ongoing",
|
|
20170
|
+
size: 14
|
|
20171
|
+
}), "刷新"]
|
|
20172
|
+
})]
|
|
20173
|
+
}),
|
|
20174
|
+
(0, react_jsx_runtime.jsx)("p", {
|
|
20175
|
+
className: "cwn-cli-path-feedback",
|
|
20176
|
+
role: "status",
|
|
20177
|
+
children: blocked ? "请先结束当前账号操作或设置保存" : error || feedback || (loading ? "正在检查 CLI 路径…" : "")
|
|
20178
|
+
})
|
|
20179
|
+
]
|
|
20180
|
+
})]
|
|
20181
|
+
})
|
|
20182
|
+
})
|
|
20183
|
+
})]
|
|
20184
|
+
});
|
|
20185
|
+
}
|
|
20186
|
+
//#endregion
|
|
19816
20187
|
//#region lib/types/client/settings-dialog.js
|
|
19817
20188
|
function readEnabled(raw) {
|
|
19818
20189
|
const parsed = JSON.parse(raw);
|
|
@@ -19911,13 +20282,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19911
20282
|
leaving.current = false;
|
|
19912
20283
|
}
|
|
19913
20284
|
};
|
|
19914
|
-
const refreshAccount = (0, react.useCallback)((id, replace = false) => {
|
|
20285
|
+
const refreshAccount = (0, react.useCallback)((id, replace = false, clearPrevious = false) => {
|
|
19915
20286
|
if (!enabledRef.current?.[id]) return;
|
|
19916
20287
|
if (probes.current.has(id) && !replace) return;
|
|
19917
20288
|
setAccounts((old) => ({
|
|
19918
20289
|
...old,
|
|
19919
20290
|
[id]: {
|
|
19920
|
-
data: old[id]?.data,
|
|
20291
|
+
data: clearPrevious ? void 0 : old[id]?.data,
|
|
19921
20292
|
loading: true
|
|
19922
20293
|
}
|
|
19923
20294
|
}));
|
|
@@ -20129,7 +20500,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20129
20500
|
enabled: enabled?.[cli],
|
|
20130
20501
|
account: accounts[cli],
|
|
20131
20502
|
connection: connectionStatus(enabled?.[cli], accounts[cli], settingsError),
|
|
20132
|
-
onRefreshAccount: (replace) => refreshAccount(cli, replace),
|
|
20503
|
+
onRefreshAccount: (replace, clearPrevious) => refreshAccount(cli, replace, clearPrevious),
|
|
20133
20504
|
onToggle: (next) => void toggleCli(cli, next),
|
|
20134
20505
|
toggleBusy: !!togglingCli,
|
|
20135
20506
|
toggling: togglingCli === cli,
|
|
@@ -20141,16 +20512,31 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20141
20512
|
}
|
|
20142
20513
|
function NativeChoice({ label, selected, choices, disabled, onChange }) {
|
|
20143
20514
|
const [open, setOpen] = (0, react.useState)(false);
|
|
20515
|
+
const anchor = (0, react.useRef)(null);
|
|
20516
|
+
const [anchorWidth, setAnchorWidth] = (0, react.useState)();
|
|
20517
|
+
const menuClass = `cwn-settings-choice-menu-${(0, react.useId)().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
20144
20518
|
(0, react.useEffect)(() => {
|
|
20145
20519
|
if (disabled) setOpen(false);
|
|
20146
20520
|
}, [disabled]);
|
|
20147
|
-
|
|
20521
|
+
(0, react.useEffect)(() => {
|
|
20522
|
+
const button = anchor.current;
|
|
20523
|
+
if (!open || !button) return;
|
|
20524
|
+
const measure = () => {
|
|
20525
|
+
const width = button.getBoundingClientRect().width;
|
|
20526
|
+
if (width > 0) setAnchorWidth(width);
|
|
20527
|
+
};
|
|
20528
|
+
measure();
|
|
20529
|
+
const observer = new ResizeObserver(measure);
|
|
20530
|
+
observer.observe(button);
|
|
20531
|
+
return () => observer.disconnect();
|
|
20532
|
+
}, [open]);
|
|
20533
|
+
return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)("style", { children: anchorWidth === void 0 ? "" : `.${menuClass}{--cwn-settings-choice-width:${anchorWidth}px}` }), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Menu, {
|
|
20148
20534
|
open: open && !disabled,
|
|
20149
20535
|
onClose: () => setOpen(false),
|
|
20150
20536
|
portal: true,
|
|
20151
20537
|
align: "start",
|
|
20152
20538
|
className: "cwn-settings-choice",
|
|
20153
|
-
listClassName:
|
|
20539
|
+
listClassName: `cwn-settings-choice-menu ${menuClass}`,
|
|
20154
20540
|
selectedId: selected,
|
|
20155
20541
|
items: choices,
|
|
20156
20542
|
onSelect: (id) => {
|
|
@@ -20158,6 +20544,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20158
20544
|
setOpen(false);
|
|
20159
20545
|
},
|
|
20160
20546
|
anchor: (0, react_jsx_runtime.jsxs)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
20547
|
+
ref: anchor,
|
|
20161
20548
|
type: "button",
|
|
20162
20549
|
variant: "outline",
|
|
20163
20550
|
size: "md",
|
|
@@ -20165,10 +20552,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20165
20552
|
"aria-haspopup": "menu",
|
|
20166
20553
|
"aria-expanded": open && !disabled,
|
|
20167
20554
|
disabled,
|
|
20168
|
-
onClick: () =>
|
|
20555
|
+
onClick: () => {
|
|
20556
|
+
if (!open) {
|
|
20557
|
+
const width = anchor.current?.getBoundingClientRect().width;
|
|
20558
|
+
if (width && width > 0) setAnchorWidth(width);
|
|
20559
|
+
}
|
|
20560
|
+
setOpen((old) => !old);
|
|
20561
|
+
},
|
|
20169
20562
|
children: [(0, react_jsx_runtime.jsx)("span", { children: choices.find((choice) => choice.id === selected)?.label ?? (label === "默认思考强度" ? "选择强度" : "选择模型") }), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { size: 14 })]
|
|
20170
20563
|
})
|
|
20171
|
-
});
|
|
20564
|
+
})] });
|
|
20172
20565
|
}
|
|
20173
20566
|
function SectionProgress({ loading, label }) {
|
|
20174
20567
|
return (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -20230,15 +20623,41 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20230
20623
|
const [saveError, setSaveError] = (0, react.useState)("");
|
|
20231
20624
|
const [saved, setSaved] = (0, react.useState)(false);
|
|
20232
20625
|
const [modelRevision, refreshModels] = (0, react.useState)(0);
|
|
20626
|
+
const forceCatalogRefresh = (0, react.useRef)(false);
|
|
20233
20627
|
const [model, setModel] = (0, react.useState)("");
|
|
20234
20628
|
const [effort, setEffort] = (0, react.useState)("default");
|
|
20235
20629
|
const [action, setAction] = (0, react.useState)();
|
|
20236
20630
|
const [chosenAction, setChosenAction] = (0, react.useState)();
|
|
20237
20631
|
const [accountSource, setAccountSource] = (0, react.useState)();
|
|
20238
20632
|
const [loginProvider, setLoginProvider] = (0, react.useState)();
|
|
20239
|
-
const
|
|
20240
|
-
(0, react.
|
|
20633
|
+
const [pathChanging, setPathChanging] = (0, react.useState)(false);
|
|
20634
|
+
const saves = (0, react.useRef)(new AccountQueryQueue(1));
|
|
20635
|
+
const saveRevision = (0, react.useRef)(0);
|
|
20636
|
+
const latestSave = (0, react.useRef)();
|
|
20637
|
+
const selection = (0, react.useRef)({
|
|
20638
|
+
model: "",
|
|
20639
|
+
effort: "default"
|
|
20640
|
+
});
|
|
20641
|
+
const mounted = (0, react.useRef)(true);
|
|
20642
|
+
const cancelSaves = (0, react.useCallback)((updateState = true) => {
|
|
20643
|
+
saveRevision.current++;
|
|
20644
|
+
latestSave.current = void 0;
|
|
20645
|
+
saves.current.clear();
|
|
20646
|
+
if (updateState) setSaving(false);
|
|
20647
|
+
}, []);
|
|
20241
20648
|
(0, react.useEffect)(() => {
|
|
20649
|
+
mounted.current = true;
|
|
20650
|
+
return () => {
|
|
20651
|
+
mounted.current = false;
|
|
20652
|
+
cancelSaves(false);
|
|
20653
|
+
};
|
|
20654
|
+
}, [cancelSaves]);
|
|
20655
|
+
(0, react.useEffect)(() => {
|
|
20656
|
+
cancelSaves();
|
|
20657
|
+
selection.current = {
|
|
20658
|
+
model: "",
|
|
20659
|
+
effort: "default"
|
|
20660
|
+
};
|
|
20242
20661
|
setCatalog(void 0);
|
|
20243
20662
|
setModel("");
|
|
20244
20663
|
setEffort("default");
|
|
@@ -20254,7 +20673,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20254
20673
|
const controller = new AbortController();
|
|
20255
20674
|
(async () => {
|
|
20256
20675
|
try {
|
|
20257
|
-
const
|
|
20676
|
+
const force = forceCatalogRefresh.current;
|
|
20677
|
+
forceCatalogRefresh.current = false;
|
|
20678
|
+
const next = JSON.parse(value(await (force ? api.cliworker.refreshCatalogForCli(sessionId, cli, controller.signal) : api.cliworker.catalogForCli(sessionId, cli, controller.signal))));
|
|
20258
20679
|
if (next.cli !== cli) throw new Error("收到不匹配的 CLI 模型目录,请重试");
|
|
20259
20680
|
if (controller.signal.aborted) return;
|
|
20260
20681
|
setCatalog(next);
|
|
@@ -20263,8 +20684,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20263
20684
|
const saved = next.models.find((item) => item.id === preferred || Object.values(item.variants ?? {}).includes(next.preference?.model ?? ""));
|
|
20264
20685
|
const chosen = next.preference ? saved : visibleModelChoices(next.models)[0];
|
|
20265
20686
|
if (next.preference && !saved && next.models.length) setModelError("原默认模型已不可用,请重新选择模型");
|
|
20266
|
-
|
|
20267
|
-
|
|
20687
|
+
const effort = next.preference && chosen?.efforts?.includes(next.preference.effort) ? next.preference.effort : chosen?.efforts?.[0] ?? "default";
|
|
20688
|
+
selection.current = {
|
|
20689
|
+
model: chosen?.id ?? "",
|
|
20690
|
+
effort
|
|
20691
|
+
};
|
|
20692
|
+
setModel(selection.current.model);
|
|
20693
|
+
setEffort(effort);
|
|
20268
20694
|
} catch (error) {
|
|
20269
20695
|
if (!controller.signal.aborted) {
|
|
20270
20696
|
setCatalog(void 0);
|
|
@@ -20284,41 +20710,77 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20284
20710
|
cli,
|
|
20285
20711
|
enabled,
|
|
20286
20712
|
account,
|
|
20287
|
-
modelRevision
|
|
20713
|
+
modelRevision,
|
|
20714
|
+
cancelSaves
|
|
20288
20715
|
]);
|
|
20289
20716
|
const inactive = !enabled || toggling;
|
|
20290
20717
|
const settingsPending = enabled === void 0 && !settingsError;
|
|
20291
20718
|
const accountLoading = !settingsError && enabled !== false && (!account || account.loading);
|
|
20292
20719
|
const supportedEfforts = catalog?.models.find((item) => item.id === model)?.efforts ?? [];
|
|
20293
|
-
const
|
|
20294
|
-
|
|
20295
|
-
|
|
20296
|
-
|
|
20297
|
-
|
|
20720
|
+
const choiceDisabled = inactive || pathChanging || modelLoading || accountLoading || !!action || !catalog;
|
|
20721
|
+
function savePreference(preference) {
|
|
20722
|
+
const key = JSON.stringify(preference);
|
|
20723
|
+
if (latestSave.current?.key === key && latestSave.current.state === "pending") return;
|
|
20724
|
+
const revision = ++saveRevision.current;
|
|
20725
|
+
latestSave.current = {
|
|
20726
|
+
key,
|
|
20727
|
+
revision,
|
|
20728
|
+
state: "pending"
|
|
20729
|
+
};
|
|
20298
20730
|
setSaving(true);
|
|
20299
20731
|
setSaveError("");
|
|
20300
20732
|
setSaved(false);
|
|
20301
|
-
|
|
20302
|
-
|
|
20303
|
-
|
|
20304
|
-
|
|
20305
|
-
|
|
20306
|
-
|
|
20307
|
-
|
|
20308
|
-
|
|
20309
|
-
|
|
20310
|
-
|
|
20311
|
-
|
|
20312
|
-
|
|
20313
|
-
|
|
20733
|
+
saves.current.enqueue("preference", async (signal) => {
|
|
20734
|
+
const current = () => mounted.current && !signal.aborted && latestSave.current?.revision === revision;
|
|
20735
|
+
try {
|
|
20736
|
+
value(await api.cliworker.configure(sessionId, JSON.stringify(preference), signal));
|
|
20737
|
+
if (current()) {
|
|
20738
|
+
latestSave.current.state = "saved";
|
|
20739
|
+
setSaved(true);
|
|
20740
|
+
}
|
|
20741
|
+
} catch (error) {
|
|
20742
|
+
if (current()) {
|
|
20743
|
+
latestSave.current.state = "failed";
|
|
20744
|
+
setSaveError(`${operationMessage(error)};请重新选择模型或思考强度重试`);
|
|
20745
|
+
}
|
|
20746
|
+
} finally {
|
|
20747
|
+
if (current()) setSaving(false);
|
|
20314
20748
|
}
|
|
20315
|
-
}
|
|
20749
|
+
}, true);
|
|
20316
20750
|
}
|
|
20317
20751
|
const changeModel = (id) => {
|
|
20752
|
+
if (choiceDisabled) return;
|
|
20753
|
+
const chosen = catalog?.models.find((item) => item.id === id);
|
|
20754
|
+
if (!chosen?.efforts?.length) return;
|
|
20755
|
+
const effort = chosen.efforts.includes(selection.current.effort) ? selection.current.effort : chosen.efforts[0];
|
|
20756
|
+
selection.current = {
|
|
20757
|
+
model: id,
|
|
20758
|
+
effort
|
|
20759
|
+
};
|
|
20318
20760
|
setModel(id);
|
|
20319
|
-
|
|
20320
|
-
|
|
20321
|
-
|
|
20761
|
+
setEffort(effort);
|
|
20762
|
+
setModelError("");
|
|
20763
|
+
savePreference({
|
|
20764
|
+
cli,
|
|
20765
|
+
model: id,
|
|
20766
|
+
effort
|
|
20767
|
+
});
|
|
20768
|
+
};
|
|
20769
|
+
const changeEffort = (id) => {
|
|
20770
|
+
if (choiceDisabled) return;
|
|
20771
|
+
const chosen = catalog?.models.find((item) => item.id === selection.current.model);
|
|
20772
|
+
const effort = chosen?.efforts?.find((effort) => effort === id);
|
|
20773
|
+
if (!chosen || !effort) return;
|
|
20774
|
+
selection.current = {
|
|
20775
|
+
model: chosen.id,
|
|
20776
|
+
effort
|
|
20777
|
+
};
|
|
20778
|
+
setEffort(effort);
|
|
20779
|
+
savePreference({
|
|
20780
|
+
cli,
|
|
20781
|
+
model: chosen.id,
|
|
20782
|
+
effort
|
|
20783
|
+
});
|
|
20322
20784
|
};
|
|
20323
20785
|
const finishedAccountAction = () => {
|
|
20324
20786
|
onRefreshAccount(true);
|
|
@@ -20346,7 +20808,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20346
20808
|
size: "md",
|
|
20347
20809
|
className: id === "logout" ? "cwn-account-logout" : id === "manage" ? "cwn-account-manage" : "cwn-account-login-action",
|
|
20348
20810
|
"aria-label": label,
|
|
20349
|
-
disabled: inactive || accountLoading || !!account?.error || !!action || !item || item.target === "models" && !openNativeSettings,
|
|
20811
|
+
disabled: inactive || accountLoading || !!account?.error || !!action || saving || pathChanging || !item || item.target === "models" && !openNativeSettings,
|
|
20350
20812
|
onClick: () => {
|
|
20351
20813
|
if (!inactive && item) {
|
|
20352
20814
|
if (item.target === "models") {
|
|
@@ -20387,7 +20849,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20387
20849
|
checked: enabled ?? false,
|
|
20388
20850
|
onChange: onToggle,
|
|
20389
20851
|
label: `启用 ${CLI_LABELS[cli]}`,
|
|
20390
|
-
disabled: enabled === void 0 || toggleBusy || saving || !!action,
|
|
20852
|
+
disabled: enabled === void 0 || toggleBusy || saving || !!action || pathChanging,
|
|
20391
20853
|
title: action ? "请先关闭账号终端" : void 0
|
|
20392
20854
|
})]
|
|
20393
20855
|
})]
|
|
@@ -20418,7 +20880,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20418
20880
|
size: "md",
|
|
20419
20881
|
className: "cwn-refresh",
|
|
20420
20882
|
"aria-label": "刷新状态",
|
|
20421
|
-
disabled: inactive || accountLoading || saving,
|
|
20883
|
+
disabled: inactive || accountLoading || saving || pathChanging,
|
|
20422
20884
|
onClick: () => onRefreshAccount(),
|
|
20423
20885
|
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconRefreshOutlineRegular, { size: 16 })
|
|
20424
20886
|
})
|
|
@@ -20510,8 +20972,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20510
20972
|
size: "md",
|
|
20511
20973
|
className: "cwn-refresh",
|
|
20512
20974
|
"aria-label": "刷新模型",
|
|
20513
|
-
disabled: inactive || modelLoading || saving,
|
|
20514
|
-
onClick: () =>
|
|
20975
|
+
disabled: inactive || modelLoading || saving || pathChanging,
|
|
20976
|
+
onClick: () => {
|
|
20977
|
+
forceCatalogRefresh.current = true;
|
|
20978
|
+
refreshModels((n) => n + 1);
|
|
20979
|
+
},
|
|
20515
20980
|
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconRefreshOutlineRegular, { size: 16 })
|
|
20516
20981
|
})
|
|
20517
20982
|
})]
|
|
@@ -20520,7 +20985,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20520
20985
|
className: "cwn-settings-form",
|
|
20521
20986
|
onSubmit: (event) => {
|
|
20522
20987
|
event.preventDefault();
|
|
20523
|
-
save();
|
|
20524
20988
|
},
|
|
20525
20989
|
children: [
|
|
20526
20990
|
(0, react_jsx_runtime.jsxs)("label", {
|
|
@@ -20538,7 +21002,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20538
21002
|
id: item.id,
|
|
20539
21003
|
label: item.label
|
|
20540
21004
|
})),
|
|
20541
|
-
disabled:
|
|
21005
|
+
disabled: choiceDisabled,
|
|
20542
21006
|
onChange: changeModel
|
|
20543
21007
|
})]
|
|
20544
21008
|
}),
|
|
@@ -20557,37 +21021,40 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20557
21021
|
id,
|
|
20558
21022
|
label: effortLabel(id)
|
|
20559
21023
|
})),
|
|
20560
|
-
disabled:
|
|
20561
|
-
onChange:
|
|
20562
|
-
setEffort(id);
|
|
20563
|
-
setSaved(false);
|
|
20564
|
-
}
|
|
21024
|
+
disabled: choiceDisabled || !supportedEfforts.length,
|
|
21025
|
+
onChange: changeEffort
|
|
20565
21026
|
})]
|
|
20566
21027
|
}),
|
|
20567
21028
|
(0, react_jsx_runtime.jsx)("p", {
|
|
20568
21029
|
className: "cwn-settings-notice cwn-settings-hint",
|
|
20569
21030
|
role: "status",
|
|
20570
|
-
children: modelError || ""
|
|
21031
|
+
children: modelError || (cli === "claude" && catalog?.notice?.includes("路由") ? catalog.notice : "")
|
|
20571
21032
|
}),
|
|
20572
|
-
(0, react_jsx_runtime.
|
|
21033
|
+
(saving || saved || saveError) && (0, react_jsx_runtime.jsx)("div", {
|
|
20573
21034
|
className: "cwn-settings-save",
|
|
20574
|
-
children:
|
|
20575
|
-
|
|
20576
|
-
|
|
20577
|
-
size: "md",
|
|
20578
|
-
disabled: inactive || modelLoading || saving || !validPreference,
|
|
21035
|
+
children: (0, react_jsx_runtime.jsxs)("span", {
|
|
21036
|
+
className: "cwn-settings-feedback-slot",
|
|
21037
|
+
role: "status",
|
|
20579
21038
|
children: [saving && (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, {
|
|
20580
21039
|
state: "ongoing",
|
|
20581
21040
|
size: 14
|
|
20582
|
-
}), "
|
|
20583
|
-
})
|
|
20584
|
-
className: "cwn-settings-feedback-slot",
|
|
20585
|
-
role: "status",
|
|
20586
|
-
children: saveError || (saved ? "默认设置已保存" : "")
|
|
20587
|
-
})]
|
|
21041
|
+
}), saveError || (saving ? "正在保存默认设置…" : "默认设置已保存")]
|
|
21042
|
+
})
|
|
20588
21043
|
})
|
|
20589
21044
|
]
|
|
20590
21045
|
})]
|
|
21046
|
+
}),
|
|
21047
|
+
(0, react_jsx_runtime.jsx)(CliExecutableSettings, {
|
|
21048
|
+
api,
|
|
21049
|
+
sessionId,
|
|
21050
|
+
cli,
|
|
21051
|
+
blocked: !!action || saving || toggling,
|
|
21052
|
+
accountLoading,
|
|
21053
|
+
accountRevision: account,
|
|
21054
|
+
onApplied: () => {
|
|
21055
|
+
if (enabled) onRefreshAccount(true, true);
|
|
21056
|
+
},
|
|
21057
|
+
onBusyChange: setPathChanging
|
|
20591
21058
|
})
|
|
20592
21059
|
]
|
|
20593
21060
|
});
|
|
@@ -21785,7 +22252,7 @@ body:not([data-ds-dark-theme]) .cwn button:disabled:not(.cwn-send):hover{backgro
|
|
|
21785
22252
|
.cwn-settings-dialog{width:min(800px,90vw);max-width:90vw;height:700px;max-height:100%}
|
|
21786
22253
|
.cwn-settings-content{padding-top:4px!important;min-height:0;flex:1;overflow:hidden}
|
|
21787
22254
|
.cwn-settings-content>div:last-child{flex:1;min-height:0}.cwn-settings-content>div:first-child{flex-shrink:0}
|
|
21788
|
-
.cwn-settings-layout{display:grid;grid-template-columns:188px minmax(0,1fr);gap:24px;height:100%;min-height:0;font-family:var(--dsw-font-family);font-size:var(--
|
|
22255
|
+
.cwn-settings-layout{--cwn-settings-label-size:var(--dsw-font-s-14-font-size);--cwn-settings-label-line:22px;--cwn-settings-label-weight:400;--cwn-settings-heading-weight:500;--cwn-settings-description-size:var(--dsw-font-xxs-12-font-size);--cwn-settings-description-line:18px;--cwn-settings-description-gap:4px;--cwn-settings-control-height:36px;--cwn-settings-header-gap:8px;--cwn-settings-row-padding:16px;--cwn-settings-column-gap:24px;--cwn-settings-field-gap:16px;--cwn-settings-action-gap:8px;--cwn-settings-feedback-line:20px;--cwn-settings-border:.5px solid var(--dsw-alias-border-l2);display:grid;grid-template-columns:188px minmax(0,1fr);gap:24px;height:100%;min-height:0;font-family:var(--dsw-font-family);font-size:var(--cwn-settings-label-size);line-height:var(--cwn-settings-label-line);font-weight:var(--cwn-settings-label-weight);color:var(--dsw-alias-label-primary)}
|
|
21789
22256
|
.cwn-settings-layout *{box-sizing:border-box}
|
|
21790
22257
|
.cwn-settings-nav{display:flex;flex-direction:column;gap:6px;align-self:stretch;min-height:0;overflow:auto;overscroll-behavior:contain}.cwn-settings-nav>button{flex-shrink:0}
|
|
21791
22258
|
.cwn-settings-nav button{justify-content:flex-start;gap:10px;width:100%;font-weight:400}
|
|
@@ -21812,21 +22279,23 @@ body:not([data-ds-dark-theme]) .cwn button:disabled:not(.cwn-send):hover{backgro
|
|
|
21812
22279
|
.cwn-settings-cli-name{gap:14px}.cwn-settings-cli-name h2{margin:0;font-size:24px;line-height:32px;font-weight:600;letter-spacing:-.02em}.cwn-cli-subtitle{margin:4px 0 0;font-size:var(--dsw-font-xxs-12-font-size);line-height:18px;color:var(--dsw-alias-label-tertiary)}
|
|
21813
22280
|
.cwn-cli-toggle-status{height:20px;overflow:auto;margin:4px 0 4px;font-size:var(--dsw-font-xxs-12-font-size);line-height:18px;color:var(--dsw-alias-label-tertiary)}
|
|
21814
22281
|
.cwn-section-progress{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;flex:none}
|
|
21815
|
-
.cwn-settings-section{min-width:0}.cwn-settings-section+.cwn-settings-section{margin-top:
|
|
21816
|
-
.cwn-settings-section-head,.cwn-account-terminal-head{display:flex;align-items:center;justify-content:space-between;gap:12px
|
|
21817
|
-
.cwn-settings-section-head h3{font-size:
|
|
21818
|
-
.cwn-settings-form{display:flex;flex-direction:column;gap:0}.cwn-settings-form label{display:flex;flex-direction:column;gap:
|
|
22282
|
+
.cwn-settings-section{min-width:0}.cwn-settings-section+.cwn-settings-section{margin-top:0;padding-top:var(--cwn-settings-row-padding);border-top:var(--cwn-settings-border)}
|
|
22283
|
+
.cwn-settings-section-head,.cwn-account-terminal-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.cwn-settings-section-head{margin-bottom:var(--cwn-settings-header-gap);min-height:var(--cwn-settings-control-height)}
|
|
22284
|
+
.cwn-settings-section-head h3{font-size:var(--cwn-settings-label-size);line-height:var(--cwn-settings-label-line);font-weight:var(--cwn-settings-heading-weight);margin:0}
|
|
22285
|
+
.cwn-settings-form{display:flex;flex-direction:column;gap:0}.cwn-settings-form label{display:flex;flex-direction:column;gap:var(--cwn-settings-action-gap);color:var(--dsw-alias-label-secondary)}
|
|
22286
|
+
.cwn-settings-form .cwn-setting-row,.cwn-account-row,.cwn-cli-path-settings{padding:var(--cwn-settings-row-padding) 0}.cwn-settings-form .cwn-setting-row+.cwn-setting-row{border-top:var(--cwn-settings-border)}
|
|
21819
22287
|
.cwn-settings-choice{display:block;width:min(240px,48%);min-width:0;flex-shrink:0}.cwn-settings-choice>button{width:100%;justify-content:space-between;gap:12px;background:var(--dsw-alias-interactive-bg-hover)}.cwn-settings-choice>button>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
21820
|
-
.cwn-settings-choice-menu{width:
|
|
21821
|
-
.cwn-settings-hint,.cwn-settings-feedback,.cwn-account-summary,.cwn-account-instruction{margin:0;font-size:var(--dsw-font-xxs-12-font-size);line-height:20px;color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere}
|
|
21822
|
-
.cwn-account-row{display:flex;align-items:center;gap:12px
|
|
21823
|
-
.cwn-account-status-line{display:flex;align-items:center;min-width:0;gap:
|
|
21824
|
-
.cwn-settings-notice{min-height:
|
|
21825
|
-
.cwn-settings-form .cwn-setting-row{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:
|
|
21826
|
-
.cwn-settings-feedback-slot{min-height:
|
|
22288
|
+
.cwn-settings-choice-menu{width:var(--cwn-settings-choice-width,auto);min-width:0;max-width:none;max-height:300px;overflow:auto}
|
|
22289
|
+
.cwn-settings-hint,.cwn-settings-feedback,.cwn-account-summary,.cwn-account-instruction{margin:0;font-size:var(--cwn-settings-description-size,var(--dsw-font-xxs-12-font-size));line-height:var(--cwn-settings-feedback-line,20px);font-weight:var(--cwn-settings-label-weight,400);color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere}
|
|
22290
|
+
.cwn-account-row{display:flex;align-items:center;gap:12px}.cwn-account-summary{display:flex;align-items:center;flex:1;min-width:0;min-height:var(--cwn-settings-control-height);margin:0;color:var(--dsw-alias-label-secondary)}
|
|
22291
|
+
.cwn-account-status-line{display:flex;align-items:center;min-width:0;gap:var(--cwn-settings-action-gap);min-height:24px;font-size:var(--cwn-settings-label-size);line-height:var(--cwn-settings-label-line);font-weight:var(--cwn-settings-label-weight)}.cwn-account-login{display:inline-flex;align-items:center;gap:6px;min-width:0}.cwn-account-login:not([data-state=failed]){flex-shrink:0;white-space:nowrap}.cwn-account-login[data-state=connected]{color:var(--dsw-alias-state-success-primary)}.cwn-account-login[data-state=failed]{color:var(--dsw-alias-state-error-primary)}.cwn-account-login[data-state=disabled]{color:var(--dsw-alias-label-caption)}.cwn-account-status-dot{display:inline-block;flex-shrink:0;width:6px;height:6px;border-radius:50%;background:var(--dsw-alias-label-caption)}.cwn-account-status-dot[data-state=connected]{background:var(--dsw-alias-state-success-primary)}.cwn-account-status-dot[data-state=failed]{background:var(--dsw-alias-state-error-primary)}.cwn-account-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-secondary)}
|
|
22292
|
+
.cwn-settings-notice{min-height:var(--cwn-settings-feedback-line);max-height:56px;overflow:auto;margin:0;padding-bottom:var(--cwn-settings-row-padding)}
|
|
22293
|
+
.cwn-settings-form .cwn-setting-row{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:var(--cwn-settings-column-gap);color:var(--dsw-alias-label-primary)}.cwn-setting-row-text{display:flex;flex-direction:column;gap:var(--cwn-settings-description-gap);flex:1;min-width:0;font-size:var(--cwn-settings-label-size);line-height:var(--cwn-settings-label-line);font-weight:var(--cwn-settings-label-weight)}.cwn-setting-description{font-size:var(--cwn-settings-description-size);line-height:var(--cwn-settings-description-line);font-weight:var(--cwn-settings-label-weight);color:var(--dsw-alias-label-tertiary)}.cwn-settings-save{margin-top:0;padding-bottom:var(--cwn-settings-row-padding);justify-content:flex-end}
|
|
22294
|
+
.cwn-settings-feedback-slot,.cwn-cli-path-feedback{min-height:var(--cwn-settings-feedback-line);margin:0;font-size:var(--cwn-settings-description-size);line-height:var(--cwn-settings-feedback-line);font-weight:var(--cwn-settings-label-weight);color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere}
|
|
22295
|
+
.cwn-settings-hint:empty,.cwn-settings-feedback-slot:empty,.cwn-cli-path-feedback:empty{display:none}
|
|
21827
22296
|
.cwn-account-summary[data-provider-logins=true] .cwn-account-status-line{width:100%}.cwn-account-summary[data-provider-logins=true] .cwn-account-login{flex-shrink:1}.cwn-account-logins{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
21828
|
-
.cwn-settings-feedback,.cwn-settings-save,.cwn-account-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
|
|
21829
|
-
.cwn-account-actions{min-height:36px;flex-shrink:0;justify-content:flex-end
|
|
22297
|
+
.cwn-settings-feedback,.cwn-settings-save,.cwn-account-actions{display:flex;align-items:center;gap:var(--cwn-settings-action-gap,8px);flex-wrap:wrap}
|
|
22298
|
+
.cwn-account-actions{min-height:var(--cwn-settings-control-height,36px);flex-shrink:0;justify-content:flex-end}.cwn-account-actions button{background:transparent}.cwn-account-logout{flex-shrink:0;gap:5px!important;padding:0 8px!important;color:var(--dsw-alias-state-error-primary)!important}.cwn-account-logout:hover:not(:disabled){background:color-mix(in srgb,var(--dsw-alias-state-error-primary) 9%,transparent)!important}.cwn-refresh{width:var(--cwn-settings-control-height,36px)!important;padding:0!important}.cwn-account-login-action,.cwn-account-manage{padding:0 10px!important}
|
|
21830
22299
|
.cwn-local-loading,.cwn-loading{display:flex;align-items:center;gap:8px;color:var(--dsw-alias-label-tertiary);font-size:var(--dsw-font-xxs-12-font-size);line-height:20px}
|
|
21831
22300
|
/* Native md Button owns the 36px height; native Switch keeps its own 36x20px geometry. */
|
|
21832
22301
|
.cwn-settings-choice-menu button{border:0;box-shadow:none;--dsw-elevation-stroke-color:transparent}.cwn-settings-layout button:not([role=switch]),.cwn-settings-choice-menu button{transition:background-color 180ms ease,color 180ms ease,opacity 180ms ease}
|
|
@@ -21836,11 +22305,11 @@ body:not([data-ds-dark-theme]) .cwn button:disabled:not(.cwn-send):hover{backgro
|
|
|
21836
22305
|
.cwn-settings-layout button:not([role=switch]):disabled:hover{background:var(--dsw-alias-interactive-bg-active);color:var(--dsw-alias-label-secondary)}
|
|
21837
22306
|
.cwn-settings-layout button:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px}
|
|
21838
22307
|
.cwn-account-terminal{margin-top:16px;padding:12px;border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-bg-layer-2);border:.5px solid var(--dsw-alias-border-l2);min-width:0}
|
|
21839
|
-
.cwn-account-terminal-head{margin-bottom:8px}.cwn-account-terminal-head strong{font-size:12px;font-weight:500}.cwn-account-terminal-view{height:300px;min-height:200px;margin:12px 0;overflow:hidden}.cwn-account-terminal-view .xterm{height:100%}.cwn-account-terminal-view .xterm-viewport{background-color:var(--dsw-alias-bg-layer-2)!important}.cwn-account-terminal-view .xterm-helper-textarea{resize:none!important;min-height:0!important;max-height:0!important}
|
|
22308
|
+
.cwn-account-terminal-head{margin-bottom:8px;min-height:36px}.cwn-account-terminal-head strong{font-size:12px;font-weight:500}.cwn-account-terminal-view{height:300px;min-height:200px;margin:12px 0;overflow:hidden}.cwn-account-terminal-view .xterm{height:100%}.cwn-account-terminal-view .xterm-viewport{background-color:var(--dsw-alias-bg-layer-2)!important}.cwn-account-terminal-view .xterm-helper-textarea{resize:none!important;min-height:0!important;max-height:0!important}
|
|
21840
22309
|
.cwn-native-model-settings>p{margin:0 0 16px;color:var(--dsw-alias-label-secondary);font-size:var(--cwn-font-sm);line-height:1.6}.cwn-account-dialog{width:min(720px,90vw);max-width:90vw}.cwn-account-dialog-content{min-height:0;overflow:auto}.cwn-account-dialog .cwn-account-terminal{margin:0;padding:0;border:0;background:transparent}.cwn-account-dialog .cwn-account-terminal-view{height:300px;max-height:48vh}.cwn-account-dialog .cwn-account-terminal button{border:0!important;transition:background-color 180ms ease,color 180ms ease}.cwn-account-dialog .cwn-account-terminal button:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-active)}
|
|
21841
22310
|
/* OMP onboarding needs room for its native header and provider list. Small screens scroll the modal body. */
|
|
21842
22311
|
.cwn-account-dialog .cwn-account-terminal[data-cli="omp"] .cwn-account-terminal-view{height:520px;max-height:none}
|
|
21843
|
-
@media(max-width:640px){.cwn-account-row{flex-wrap:wrap}.cwn-account-actions{margin-left:auto}.cwn-settings-content{overflow:auto}.cwn-settings-layout{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr);gap:16px}.cwn-settings-nav{max-height:190px}.cwn-settings-cli-group-inner{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.cwn-settings-nav button{min-width:0}.cwn-settings-pane{overflow:auto}.cwn-
|
|
22312
|
+
@media(max-width:640px){.cwn-account-row{flex-wrap:wrap}.cwn-account-actions{margin-left:auto}.cwn-settings-content{overflow:auto}.cwn-settings-layout{--cwn-settings-column-gap:12px;grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr);gap:16px}.cwn-settings-nav{max-height:190px}.cwn-settings-cli-group-inner{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.cwn-settings-nav button{min-width:0}.cwn-settings-pane{overflow:auto}.cwn-setting-description{max-width:180px}.cwn-account-terminal-view{height:240px}}
|
|
21844
22313
|
@media(prefers-reduced-motion:reduce){.cwn-settings-layout button,.cwn-settings-choice-menu button,.cwn-settings-nav-chevron,.cwn-settings-cli-group{transition:none}}
|
|
21845
22314
|
`;
|
|
21846
22315
|
const rolePresetStyles = `
|
|
@@ -21985,6 +22454,10 @@ body:not([data-ds-dark-theme]) .cwn button:disabled:not(.cwn-send):hover{backgro
|
|
|
21985
22454
|
//#endregion
|
|
21986
22455
|
//#region lib/types/client/management-styles.js
|
|
21987
22456
|
const workerManagementStyles = `
|
|
22457
|
+
.cwn-settings-advanced-heading{flex:1;min-width:0}.cwn-settings-section-head>.cwn-settings-advanced-toggle{flex:none;width:var(--cwn-settings-control-height);min-width:var(--cwn-settings-control-height);padding:0;color:inherit}.cwn-settings-advanced-toggle>svg{transition:transform 220ms cubic-bezier(.2,0,0,1)}.cwn-settings-advanced-toggle[aria-expanded=true]>svg{transform:rotate(180deg)}
|
|
22458
|
+
.cwn-settings-advanced-body{display:grid;grid-template-rows:1fr;opacity:1;transition:grid-template-rows 220ms cubic-bezier(.2,0,0,1),opacity 180ms ease,visibility 220ms}.cwn-settings-advanced-body[data-expanded=false]{grid-template-rows:0fr;opacity:0;visibility:hidden}.cwn-settings-advanced-body-inner{min-height:0;overflow:hidden}
|
|
22459
|
+
.cwn-cli-path-settings{display:flex;flex-direction:column;gap:var(--cwn-settings-field-gap);min-width:0}.cwn-cli-path-settings>.cwn-setting-row-text{flex:none;color:var(--dsw-alias-label-primary)}.cwn-cli-path-settings form{display:flex;flex-direction:column;gap:var(--cwn-settings-action-gap);min-width:0}.cwn-cli-path-settings .cwn-cli-path-input{width:100%;min-width:0}.cwn-cli-path-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:var(--cwn-settings-action-gap)}
|
|
22460
|
+
@media(prefers-reduced-motion:reduce){.cwn-settings-advanced-body,.cwn-settings-advanced-toggle>svg{transition:none}}
|
|
21988
22461
|
.cwn-worker{display:block;padding:12px;min-height:62px}
|
|
21989
22462
|
.cwn .cwn-worker-menu-anchor{display:block;width:100%}
|
|
21990
22463
|
.cwn-worker-layout{display:grid;grid-template-columns:minmax(0,1fr) 14px;column-gap:10px;align-items:center;min-width:0}
|