@huyooo/ai-chat-frontend-react 0.2.36 → 0.2.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.css CHANGED
@@ -3996,547 +3996,3 @@ body {
3996
3996
  transform: translateX(-50%) translateY(0);
3997
3997
  }
3998
3998
  }
3999
-
4000
- /* src/components/common/ToggleSwitch.css */
4001
- .toggle-switch {
4002
- position: relative;
4003
- display: inline-block;
4004
- width: 44px;
4005
- height: 24px;
4006
- cursor: pointer;
4007
- }
4008
- .toggle-switch input {
4009
- opacity: 0;
4010
- width: 0;
4011
- height: 0;
4012
- }
4013
- .toggle-slider {
4014
- position: absolute;
4015
- top: 0;
4016
- left: 0;
4017
- right: 0;
4018
- bottom: 0;
4019
- background-color: var(--chat-muted, #3c3c3c);
4020
- border-radius: 24px;
4021
- transition: all 0.2s;
4022
- border: 1px solid rgba(255, 255, 255, 0.1);
4023
- }
4024
- .toggle-slider::before {
4025
- position: absolute;
4026
- content: "";
4027
- height: 18px;
4028
- width: 18px;
4029
- left: 3px;
4030
- top: 50%;
4031
- transform: translateY(-50%);
4032
- background-color: #fff;
4033
- border-radius: 50%;
4034
- transition: all 0.2s;
4035
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
4036
- }
4037
- .toggle-switch input:checked + .toggle-slider {
4038
- background-color: rgb(153, 207, 140);
4039
- border-color: rgba(255, 255, 255, 0.2);
4040
- }
4041
- .toggle-switch input:checked + .toggle-slider::before {
4042
- transform: translate(20px, -50%);
4043
- }
4044
- .toggle-switch input:focus + .toggle-slider {
4045
- box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
4046
- }
4047
-
4048
- /* src/components/common/IndexingSettings.css */
4049
- .indexing-settings {
4050
- display: flex;
4051
- flex-direction: column;
4052
- gap: 0;
4053
- }
4054
- .indexing-section {
4055
- align-items: flex-start;
4056
- }
4057
- .indexing-content {
4058
- display: flex;
4059
- flex-direction: column;
4060
- gap: 12px;
4061
- margin-top: 12px;
4062
- width: 100%;
4063
- min-width: 0;
4064
- }
4065
- .progress-container {
4066
- display: flex;
4067
- flex-direction: column;
4068
- gap: 6px;
4069
- }
4070
- .progress-bar {
4071
- width: 100%;
4072
- height: 4px;
4073
- background: var(--chat-border, #333);
4074
- border-radius: 2px;
4075
- overflow: hidden;
4076
- }
4077
- .progress-fill {
4078
- height: 100%;
4079
- background: var(--chat-accent, #3b82f6);
4080
- border-radius: 2px;
4081
- transition: width 0.3s ease;
4082
- }
4083
- .progress-text {
4084
- font-size: 13px;
4085
- color: var(--chat-text-muted, #888);
4086
- }
4087
- .stats-info {
4088
- display: flex;
4089
- flex-wrap: wrap;
4090
- gap: 12px;
4091
- padding: 8px 0;
4092
- }
4093
- .stat-item {
4094
- display: flex;
4095
- align-items: center;
4096
- gap: 6px;
4097
- font-size: 12px;
4098
- color: var(--chat-text-muted, #888);
4099
- }
4100
- .current-file {
4101
- display: flex;
4102
- align-items: center;
4103
- gap: 6px;
4104
- font-size: 12px;
4105
- color: var(--chat-text-muted, #888);
4106
- padding: 6px 8px;
4107
- background: var(--chat-muted, #2a2a2a);
4108
- border-radius: 4px;
4109
- width: 100%;
4110
- min-width: 0;
4111
- }
4112
- .file-path {
4113
- flex: 1;
4114
- overflow: hidden;
4115
- text-overflow: ellipsis;
4116
- white-space: nowrap;
4117
- min-width: 0;
4118
- }
4119
- .action-buttons {
4120
- display: flex;
4121
- gap: 8px;
4122
- }
4123
- .action-buttons .edit-btn {
4124
- margin: 0;
4125
- }
4126
- .action-buttons .edit-btn:disabled {
4127
- opacity: 0.5;
4128
- cursor: not-allowed;
4129
- }
4130
- .action-buttons .delete-btn {
4131
- color: #ef4444;
4132
- }
4133
- .action-buttons .delete-btn:hover:not(:disabled) {
4134
- color: #ef4444;
4135
- }
4136
- .spinning {
4137
- animation: spin 1s linear infinite;
4138
- }
4139
- @keyframes spin {
4140
- from {
4141
- transform: rotate(0deg);
4142
- }
4143
- to {
4144
- transform: rotate(360deg);
4145
- }
4146
- }
4147
- .spinning {
4148
- animation: spin 1s linear infinite;
4149
- }
4150
- @keyframes spin {
4151
- from {
4152
- transform: rotate(0deg);
4153
- }
4154
- to {
4155
- transform: rotate(360deg);
4156
- }
4157
- }
4158
- .indexing-settings .setting-item {
4159
- display: flex;
4160
- align-items: center;
4161
- justify-content: space-between;
4162
- padding: 16px 0;
4163
- border-bottom: 1px solid var(--chat-border, #333);
4164
- }
4165
- .indexing-settings .setting-item:last-child {
4166
- border-bottom: none;
4167
- }
4168
- .indexing-settings .setting-info {
4169
- flex: 1;
4170
- margin-right: 24px;
4171
- min-width: 0;
4172
- }
4173
- .indexing-settings .setting-label {
4174
- font-size: 14px;
4175
- font-weight: 500;
4176
- color: var(--chat-text, #fff);
4177
- margin-bottom: 4px;
4178
- }
4179
- .indexing-settings .setting-description {
4180
- font-size: 13px;
4181
- color: var(--chat-text-muted, #888);
4182
- line-height: 1.5;
4183
- margin-bottom: 0;
4184
- }
4185
- .link-btn {
4186
- display: inline;
4187
- padding: 0;
4188
- background: transparent;
4189
- border: none;
4190
- color: var(--chat-accent, #3b82f6);
4191
- cursor: pointer;
4192
- text-decoration: underline;
4193
- font-size: inherit;
4194
- }
4195
- .link-btn:hover {
4196
- color: var(--chat-accent-hover, #60a5fa);
4197
- }
4198
- .indexing-settings .setting-control {
4199
- flex-shrink: 0;
4200
- }
4201
- .edit-btn {
4202
- display: flex;
4203
- align-items: center;
4204
- gap: 6px;
4205
- padding: 6px 12px;
4206
- font-size: 13px;
4207
- font-weight: 500;
4208
- border: 1px solid var(--chat-border, #333);
4209
- border-radius: 6px;
4210
- background: transparent;
4211
- color: var(--chat-text, #fff);
4212
- cursor: pointer;
4213
- transition: all 0.15s;
4214
- }
4215
- .edit-btn:hover {
4216
- background: var(--chat-muted, #2a2a2a);
4217
- border-color: var(--chat-border, #444);
4218
- }
4219
-
4220
- /* src/components/common/SettingsPanel.css */
4221
- .settings-panel-overlay {
4222
- position: fixed;
4223
- top: 0;
4224
- left: 0;
4225
- right: 0;
4226
- bottom: 0;
4227
- background: rgba(0, 0, 0, 0.7);
4228
- display: flex;
4229
- align-items: center;
4230
- justify-content: center;
4231
- z-index: 1000;
4232
- }
4233
- .settings-panel {
4234
- background: var(--chat-bg, #1e1e1e);
4235
- border: 1px solid var(--chat-border, #333);
4236
- border-radius: 12px;
4237
- width: 90%;
4238
- max-width: 900px;
4239
- height: 80vh;
4240
- max-height: 700px;
4241
- display: flex;
4242
- flex-direction: row;
4243
- box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
4244
- overflow: hidden;
4245
- }
4246
- .settings-sidebar {
4247
- width: 240px;
4248
- background: var(--chat-muted, #2a2a2a);
4249
- border-right: 1px solid var(--chat-border, #333);
4250
- display: flex;
4251
- flex-direction: column;
4252
- flex-shrink: 0;
4253
- }
4254
- .sidebar-header {
4255
- display: flex;
4256
- align-items: center;
4257
- height: 50px;
4258
- padding: 0 16px;
4259
- border-bottom: 1px solid var(--chat-border, #333);
4260
- }
4261
- .sidebar-title {
4262
- margin: 0;
4263
- font-size: 15px;
4264
- font-weight: 600;
4265
- color: var(--chat-text, #fff);
4266
- letter-spacing: 0.2px;
4267
- line-height: 1;
4268
- }
4269
- .sidebar-content {
4270
- flex: 1;
4271
- overflow-y: auto;
4272
- padding: 8px;
4273
- }
4274
- .sidebar-item {
4275
- display: flex;
4276
- align-items: center;
4277
- gap: 12px;
4278
- width: 100%;
4279
- padding: 10px 12px;
4280
- margin-bottom: 2px;
4281
- background: transparent;
4282
- border: none;
4283
- border-radius: 8px;
4284
- font-size: 14px;
4285
- font-weight: 500;
4286
- color: var(--chat-text-muted, #888);
4287
- cursor: pointer;
4288
- transition: all 0.15s ease;
4289
- text-align: left;
4290
- position: relative;
4291
- }
4292
- .sidebar-item:hover {
4293
- background: rgba(255, 255, 255, 0.05);
4294
- color: var(--chat-text, #ccc);
4295
- }
4296
- .sidebar-item.active {
4297
- background: rgba(255, 255, 255, 0.1);
4298
- color: var(--chat-text, #fff);
4299
- }
4300
- .settings-content {
4301
- flex: 1;
4302
- display: flex;
4303
- flex-direction: column;
4304
- overflow: hidden;
4305
- }
4306
- .content-header {
4307
- display: flex;
4308
- align-items: center;
4309
- justify-content: space-between;
4310
- height: 50px;
4311
- padding: 0 16px;
4312
- border-bottom: 1px solid var(--chat-border, #333);
4313
- }
4314
- .content-title {
4315
- margin: 0;
4316
- font-size: 15px;
4317
- font-weight: 600;
4318
- color: var(--chat-text, #fff);
4319
- letter-spacing: 0.2px;
4320
- line-height: 1;
4321
- }
4322
- .close-btn {
4323
- display: flex;
4324
- align-items: center;
4325
- justify-content: center;
4326
- width: 32px;
4327
- height: 32px;
4328
- padding: 0;
4329
- background: transparent;
4330
- border: none;
4331
- border-radius: 6px;
4332
- color: var(--chat-text-muted, #888);
4333
- cursor: pointer;
4334
- transition: all 0.15s;
4335
- }
4336
- .close-btn:hover {
4337
- background: var(--chat-muted, #2a2a2a);
4338
- color: var(--chat-text, #fff);
4339
- }
4340
- .content-body {
4341
- flex: 1;
4342
- overflow-y: auto;
4343
- display: flex;
4344
- flex-direction: column;
4345
- gap: 24px;
4346
- padding: 0 16px;
4347
- }
4348
- .setting-section {
4349
- }
4350
- .section-title {
4351
- font-size: 16px;
4352
- font-weight: 500;
4353
- color: var(--chat-text, #fff);
4354
- margin-bottom: 4px;
4355
- }
4356
- .section-description {
4357
- font-size: 13px;
4358
- color: var(--chat-text-muted, #888);
4359
- margin-bottom: 16px;
4360
- }
4361
- .setting-item {
4362
- display: flex;
4363
- align-items: center;
4364
- justify-content: space-between;
4365
- padding: 16px 0;
4366
- border-bottom: 1px solid var(--chat-border, #333);
4367
- }
4368
- .setting-item:last-child {
4369
- border-bottom: none;
4370
- }
4371
- .setting-info {
4372
- flex: 1;
4373
- margin-right: 24px;
4374
- }
4375
- .setting-label {
4376
- font-size: 14px;
4377
- font-weight: 500;
4378
- color: var(--chat-text, #fff);
4379
- margin-bottom: 4px;
4380
- }
4381
- .setting-description {
4382
- font-size: 13px;
4383
- color: var(--chat-text-muted, #888);
4384
- line-height: 1.5;
4385
- }
4386
- .setting-control {
4387
- flex-shrink: 0;
4388
- }
4389
- .dropdown-wrapper {
4390
- }
4391
- .dropdown-wrapper .dropdown-selector .selector-text {
4392
- max-width: none;
4393
- white-space: nowrap;
4394
- }
4395
- .toggle-switch {
4396
- position: relative;
4397
- display: inline-block;
4398
- width: 44px;
4399
- height: 24px;
4400
- cursor: pointer;
4401
- }
4402
- .toggle-switch input {
4403
- opacity: 0;
4404
- width: 0;
4405
- height: 0;
4406
- }
4407
- .toggle-slider {
4408
- position: absolute;
4409
- top: 0;
4410
- left: 0;
4411
- right: 0;
4412
- bottom: 0;
4413
- background-color: var(--chat-muted, #3c3c3c);
4414
- border-radius: 24px;
4415
- transition: all 0.2s;
4416
- border: 1px solid rgba(255, 255, 255, 0.1);
4417
- }
4418
- .toggle-slider:before {
4419
- position: absolute;
4420
- content: "";
4421
- height: 18px;
4422
- width: 18px;
4423
- left: 3px;
4424
- top: 50%;
4425
- transform: translateY(-50%);
4426
- background-color: #fff;
4427
- border-radius: 50%;
4428
- transition: all 0.2s;
4429
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
4430
- }
4431
- .toggle-switch input:checked + .toggle-slider {
4432
- background-color: rgb(153, 207, 140);
4433
- border-color: rgba(255, 255, 255, 0.2);
4434
- }
4435
- .toggle-switch input:checked + .toggle-slider:before {
4436
- transform: translate(20px, -50%);
4437
- }
4438
- .toggle-switch input:focus + .toggle-slider {
4439
- box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
4440
- }
4441
- .setting-section-header {
4442
- display: flex;
4443
- align-items: flex-start;
4444
- justify-content: space-between;
4445
- gap: 16px;
4446
- padding: 16px 0 8px;
4447
- border-bottom: 1px solid var(--chat-border, #333);
4448
- }
4449
- .disable-all-btn {
4450
- flex-shrink: 0;
4451
- height: 32px;
4452
- padding: 0 12px;
4453
- border-radius: 8px;
4454
- border: 1px solid var(--chat-border, #333);
4455
- background: rgba(255, 255, 255, 0.06);
4456
- color: var(--chat-text, #fff);
4457
- font-size: 13px;
4458
- cursor: pointer;
4459
- transition: all 0.15s ease;
4460
- }
4461
- .disable-all-btn:hover {
4462
- background: rgba(255, 255, 255, 0.1);
4463
- }
4464
- .disable-all-btn:disabled {
4465
- opacity: 0.5;
4466
- cursor: not-allowed;
4467
- }
4468
- .tools-list {
4469
- display: flex;
4470
- flex-direction: column;
4471
- }
4472
- .tool-item {
4473
- display: flex;
4474
- align-items: center;
4475
- justify-content: space-between;
4476
- gap: 16px;
4477
- padding: 14px 0;
4478
- border-bottom: 1px solid var(--chat-border, #333);
4479
- }
4480
- .tool-item:last-child {
4481
- border-bottom: none;
4482
- }
4483
- .tool-info {
4484
- flex: 1;
4485
- min-width: 0;
4486
- }
4487
- .tool-name {
4488
- font-size: 14px;
4489
- font-weight: 500;
4490
- color: var(--chat-text, #fff);
4491
- margin-bottom: 4px;
4492
- word-break: break-all;
4493
- }
4494
- .tool-description {
4495
- font-size: 13px;
4496
- color: var(--chat-text-muted, #888);
4497
- line-height: 1.5;
4498
- word-break: break-word;
4499
- }
4500
- .no-tools {
4501
- padding: 16px 0;
4502
- color: var(--chat-text, #fff);
4503
- }
4504
- .no-tools-hint {
4505
- font-size: 12px;
4506
- color: var(--chat-text-muted, #888);
4507
- margin-top: 8px;
4508
- }
4509
- .skill-actions {
4510
- display: flex;
4511
- align-items: center;
4512
- gap: 4px;
4513
- flex-shrink: 0;
4514
- }
4515
- .skill-action-btn {
4516
- display: flex;
4517
- align-items: center;
4518
- justify-content: center;
4519
- width: 28px;
4520
- height: 28px;
4521
- border: none;
4522
- background: transparent;
4523
- color: var(--chat-text-muted, #888);
4524
- border-radius: 4px;
4525
- cursor: pointer;
4526
- }
4527
- .skill-action-btn:hover {
4528
- background: var(--chat-border, #333);
4529
- color: var(--chat-text, #fff);
4530
- }
4531
- .skill-action-delete:hover {
4532
- color: var(--chat-error, #ef4444);
4533
- }
4534
- .skill-badge {
4535
- display: inline-block;
4536
- margin-left: 6px;
4537
- padding: 1px 6px;
4538
- font-size: 11px;
4539
- color: var(--chat-text-muted, #888);
4540
- background: var(--chat-border, #333);
4541
- border-radius: 4px;
4542
- }
package/dist/index.d.ts CHANGED
@@ -625,8 +625,6 @@ interface ChatHeaderProps {
625
625
  onCopyId?: () => void;
626
626
  /** 反馈 */
627
627
  onFeedback?: () => void;
628
- /** Agent 设置 */
629
- onSettings?: () => void;
630
628
  }
631
629
  declare const ChatHeader: FC<ChatHeaderProps>;
632
630