@opensumi/ide-ai-native 3.9.1-next-1749175927.0 → 3.9.1-next-1749181695.0
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/lib/browser/chat/chat-manager.service.d.ts +0 -1
- package/lib/browser/chat/chat-manager.service.d.ts.map +1 -1
- package/lib/browser/chat/chat-manager.service.js +3 -9
- package/lib/browser/chat/chat-manager.service.js.map +1 -1
- package/lib/browser/chat/chat-model.d.ts +1 -8
- package/lib/browser/chat/chat-model.d.ts.map +1 -1
- package/lib/browser/chat/chat-model.js +78 -113
- package/lib/browser/chat/chat-model.js.map +1 -1
- package/lib/browser/chat/chat.view.d.ts.map +1 -1
- package/lib/browser/chat/chat.view.js +16 -32
- package/lib/browser/chat/chat.view.js.map +1 -1
- package/lib/browser/components/ChatMentionInput.d.ts.map +1 -1
- package/lib/browser/components/ChatMentionInput.js +25 -3
- package/lib/browser/components/ChatMentionInput.js.map +1 -1
- package/lib/browser/components/ChatReply.js +2 -2
- package/lib/browser/components/ChatReply.js.map +1 -1
- package/lib/browser/components/components.module.less +30 -8
- package/lib/browser/components/mention-input/mention-input.d.ts.map +1 -1
- package/lib/browser/components/mention-input/mention-input.js +30 -36
- package/lib/browser/components/mention-input/mention-input.js.map +1 -1
- package/lib/browser/components/mention-input/mention-input.module.less +0 -1
- package/lib/browser/components/mention-input/mention-select.d.ts +28 -0
- package/lib/browser/components/mention-input/mention-select.d.ts.map +1 -0
- package/lib/browser/components/mention-input/mention-select.js +136 -0
- package/lib/browser/components/mention-input/mention-select.js.map +1 -0
- package/lib/browser/components/mention-input/mention-select.module.less +297 -0
- package/lib/browser/components/mention-input/types.d.ts +13 -0
- package/lib/browser/components/mention-input/types.d.ts.map +1 -1
- package/lib/browser/components/mention-input/types.js.map +1 -1
- package/lib/browser/model/msg-history-manager.d.ts +1 -47
- package/lib/browser/model/msg-history-manager.d.ts.map +1 -1
- package/lib/browser/model/msg-history-manager.js +2 -127
- package/lib/browser/model/msg-history-manager.js.map +1 -1
- package/lib/browser/rules/rules.module.less +1 -0
- package/lib/browser/rules/rules.view.js +1 -1
- package/lib/browser/rules/rules.view.js.map +1 -1
- package/lib/browser/types.d.ts +0 -4
- package/lib/browser/types.d.ts.map +1 -1
- package/lib/browser/types.js.map +1 -1
- package/lib/common/model.d.ts +1 -0
- package/lib/common/model.d.ts.map +1 -1
- package/lib/common/model.js.map +1 -1
- package/lib/node/anthropic/anthropic-language-model.d.ts +1 -1
- package/lib/node/base-language-model.js +2 -1
- package/lib/node/base-language-model.js.map +1 -1
- package/lib/node/deepseek/deepseek-language-model.d.ts +1 -1
- package/package.json +26 -26
- package/src/browser/chat/chat-manager.service.ts +7 -16
- package/src/browser/chat/chat-model.ts +75 -130
- package/src/browser/chat/chat.view.tsx +14 -46
- package/src/browser/components/ChatMentionInput.tsx +37 -4
- package/src/browser/components/ChatReply.tsx +4 -4
- package/src/browser/components/components.module.less +30 -8
- package/src/browser/components/mention-input/mention-input.module.less +0 -1
- package/src/browser/components/mention-input/mention-input.tsx +38 -52
- package/src/browser/components/mention-input/mention-select.module.less +297 -0
- package/src/browser/components/mention-input/mention-select.tsx +256 -0
- package/src/browser/components/mention-input/types.ts +14 -0
- package/src/browser/model/msg-history-manager.ts +2 -181
- package/src/browser/rules/rules.module.less +1 -0
- package/src/browser/rules/rules.view.tsx +1 -1
- package/src/browser/types.ts +0 -6
- package/src/common/model.ts +1 -0
- package/src/node/base-language-model.ts +1 -1
- package/lib/common/MDC_PARSER_README.md +0 -171
- package/src/common/MDC_PARSER_README.md +0 -171
|
@@ -24,6 +24,8 @@ import { FileSearchServicePath, IFileSearchService } from '@opensumi/ide-file-se
|
|
|
24
24
|
import { OutlineCompositeTreeNode, OutlineTreeNode } from '@opensumi/ide-outline/lib/browser/outline-node.define';
|
|
25
25
|
import { OutlineTreeService } from '@opensumi/ide-outline/lib/browser/services/outline-tree.service';
|
|
26
26
|
import { IMessageService } from '@opensumi/ide-overlay';
|
|
27
|
+
import { IconType } from '@opensumi/ide-theme';
|
|
28
|
+
import { IconService } from '@opensumi/ide-theme/lib/browser';
|
|
27
29
|
import { IWorkspaceService } from '@opensumi/ide-workspace';
|
|
28
30
|
|
|
29
31
|
import { IChatInternalService } from '../../common';
|
|
@@ -80,6 +82,7 @@ export const ChatMentionInput = (props: IChatMentionInputProps) => {
|
|
|
80
82
|
const workspaceService = useInjectable<IWorkspaceService>(IWorkspaceService);
|
|
81
83
|
const editorService = useInjectable<WorkbenchEditorService>(WorkbenchEditorService);
|
|
82
84
|
const labelService = useInjectable<LabelService>(LabelService);
|
|
85
|
+
const iconService = useInjectable<IconService>(IconService);
|
|
83
86
|
const messageService = useInjectable<IMessageService>(IMessageService);
|
|
84
87
|
const chatFeatureRegistry = useInjectable<ChatFeatureRegistry>(ChatFeatureRegistryToken);
|
|
85
88
|
const outlineTreeService = useInjectable<OutlineTreeService>(OutlineTreeService);
|
|
@@ -418,12 +421,42 @@ export const ChatMentionInput = (props: IChatMentionInputProps) => {
|
|
|
418
421
|
},
|
|
419
422
|
},
|
|
420
423
|
];
|
|
421
|
-
|
|
422
424
|
const defaultMentionInputFooterOptions: FooterConfig = useMemo(
|
|
423
425
|
() => ({
|
|
424
426
|
modelOptions: [
|
|
425
|
-
{
|
|
426
|
-
|
|
427
|
+
{
|
|
428
|
+
value: 'qwen-plus-latest',
|
|
429
|
+
label: 'Qwen 3',
|
|
430
|
+
iconClass: iconService.fromIcon(
|
|
431
|
+
'',
|
|
432
|
+
'https://img.alicdn.com/imgextra/i3/O1CN01LFMrZj28YrnrzeebY_!!6000000007945-55-tps-16-16.svg',
|
|
433
|
+
IconType.Background,
|
|
434
|
+
),
|
|
435
|
+
tags: ['思考链', '擅长代码'],
|
|
436
|
+
description: '高性能代码模型,支持思考链',
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
label: 'Claude 4 Sonnet',
|
|
440
|
+
value: 'claude_sonnet4',
|
|
441
|
+
iconClass: iconService.fromIcon(
|
|
442
|
+
'',
|
|
443
|
+
'https://img.alicdn.com/imgextra/i3/O1CN01p0mziz1Nsl40lp1HO_!!6000000001626-55-tps-92-65.svg',
|
|
444
|
+
IconType.Background,
|
|
445
|
+
),
|
|
446
|
+
tags: ['多模态', '长上下文理解', '思考模式'],
|
|
447
|
+
description: '高性能模型,支持多模态输入',
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
label: 'DeepSeek R1',
|
|
451
|
+
value: 'DeepSeek-R1-0528',
|
|
452
|
+
iconClass: iconService.fromIcon(
|
|
453
|
+
'',
|
|
454
|
+
'https://img.alicdn.com/imgextra/i3/O1CN01ClcK2w1JwdxcbAB3a_!!6000000001093-55-tps-30-30.svg',
|
|
455
|
+
IconType.Background,
|
|
456
|
+
),
|
|
457
|
+
tags: ['思考模式', '长上下文理解'],
|
|
458
|
+
description: '专业创作,支持多模态输入',
|
|
459
|
+
},
|
|
427
460
|
],
|
|
428
461
|
defaultModel:
|
|
429
462
|
props.sessionModelId || preferenceService.get<string>(AINativeSettingSectionsId.ModelID) || 'deepseek-r1',
|
|
@@ -464,7 +497,7 @@ export const ChatMentionInput = (props: IChatMentionInputProps) => {
|
|
|
464
497
|
showModelSelector: true,
|
|
465
498
|
disableModelSelector: props.disableModelSelector,
|
|
466
499
|
}),
|
|
467
|
-
[handleShowMCPConfig, props.disableModelSelector, props.sessionModelId],
|
|
500
|
+
[iconService, handleShowMCPConfig, handleShowRules, props.disableModelSelector, props.sessionModelId],
|
|
468
501
|
);
|
|
469
502
|
|
|
470
503
|
const handleStop = useCallback(() => {
|
|
@@ -342,10 +342,10 @@ export const ChatReply = (props: IChatReplyProps) => {
|
|
|
342
342
|
}}
|
|
343
343
|
>
|
|
344
344
|
<Icon iconClass='codicon codicon-sparkle' />
|
|
345
|
-
{
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
345
|
+
<span style={{ marginLeft: 4 }} className={isThinking ? styles.shiny_text : ''}>
|
|
346
|
+
{localize('aiNative.chat.thinking')}
|
|
347
|
+
</span>
|
|
348
|
+
{isThinking ? null : collapseThinkingIndexSet.has(index) ? (
|
|
349
349
|
<Icon iconClass='codicon codicon-chevron-right' />
|
|
350
350
|
) : (
|
|
351
351
|
<Icon iconClass='codicon codicon-chevron-down' />
|
|
@@ -524,7 +524,6 @@
|
|
|
524
524
|
display: flex;
|
|
525
525
|
font-size: 11px;
|
|
526
526
|
align-items: center;
|
|
527
|
-
min-width: 150px;
|
|
528
527
|
}
|
|
529
528
|
|
|
530
529
|
.mcp_desc {
|
|
@@ -585,7 +584,6 @@
|
|
|
585
584
|
.reasoning_content {
|
|
586
585
|
padding: 8px 12px;
|
|
587
586
|
margin-top: 4px;
|
|
588
|
-
border-left: 2px solid var(--descriptionForeground);
|
|
589
587
|
color: var(--descriptionForeground);
|
|
590
588
|
background: var(--design-block-background);
|
|
591
589
|
border-radius: 4px;
|
|
@@ -597,8 +595,8 @@
|
|
|
597
595
|
align-items: center;
|
|
598
596
|
padding: 0 4px;
|
|
599
597
|
margin: 0 2px;
|
|
600
|
-
background: var(--
|
|
601
|
-
color: var(--
|
|
598
|
+
background-color: var(--chat-slashCommandBackground);
|
|
599
|
+
color: var(--chat-slashCommandForeground);
|
|
602
600
|
border-radius: 3px;
|
|
603
601
|
vertical-align: middle;
|
|
604
602
|
font-size: 12px;
|
|
@@ -609,10 +607,6 @@
|
|
|
609
607
|
margin-right: 3px;
|
|
610
608
|
}
|
|
611
609
|
}
|
|
612
|
-
&:hover {
|
|
613
|
-
background-color: var(--chat-slashCommandBackground);
|
|
614
|
-
color: var(--chat-slashCommandForeground);
|
|
615
|
-
}
|
|
616
610
|
}
|
|
617
611
|
|
|
618
612
|
.attachment_text {
|
|
@@ -679,3 +673,31 @@
|
|
|
679
673
|
border-radius: 3px;
|
|
680
674
|
overflow: hidden;
|
|
681
675
|
}
|
|
676
|
+
|
|
677
|
+
.shiny_text {
|
|
678
|
+
color: #b5b5b5a4; /* Adjust this color to change intensity/style */
|
|
679
|
+
background: linear-gradient(
|
|
680
|
+
120deg,
|
|
681
|
+
rgba(255, 255, 255, 0) 40%,
|
|
682
|
+
rgba(255, 255, 255, 0.8) 50%,
|
|
683
|
+
rgba(255, 255, 255, 0) 60%
|
|
684
|
+
);
|
|
685
|
+
background-size: 200% 100%;
|
|
686
|
+
-webkit-background-clip: text;
|
|
687
|
+
background-clip: text;
|
|
688
|
+
display: inline-block;
|
|
689
|
+
animation: shine 5s linear infinite;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
@keyframes shine {
|
|
693
|
+
0% {
|
|
694
|
+
background-position: 100%;
|
|
695
|
+
}
|
|
696
|
+
100% {
|
|
697
|
+
background-position: -100%;
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
.shiny_text.disabled {
|
|
702
|
+
animation: none;
|
|
703
|
+
}
|
|
@@ -11,6 +11,7 @@ import { ProjectRule } from '../../../common/types';
|
|
|
11
11
|
|
|
12
12
|
import styles from './mention-input.module.less';
|
|
13
13
|
import { MentionPanel } from './mention-panel';
|
|
14
|
+
import { ExtendedModelOption, MentionSelect } from './mention-select';
|
|
14
15
|
import {
|
|
15
16
|
FooterButtonPosition,
|
|
16
17
|
MENTION_KEYWORD,
|
|
@@ -1162,6 +1163,29 @@ export const MentionInput: React.FC<MentionInputProps> = ({
|
|
|
1162
1163
|
[footerConfig.disableModelSelector],
|
|
1163
1164
|
);
|
|
1164
1165
|
|
|
1166
|
+
// 转换模型选项为扩展格式
|
|
1167
|
+
const getExtendedModelOptions = React.useMemo((): ExtendedModelOption[] => {
|
|
1168
|
+
// 如果有扩展模型选项,直接使用
|
|
1169
|
+
if (footerConfig.extendedModelOptions) {
|
|
1170
|
+
return footerConfig.extendedModelOptions.map((option) => ({
|
|
1171
|
+
...option,
|
|
1172
|
+
selected: option.value === selectedModel,
|
|
1173
|
+
}));
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
// 否则从基础模型选项转换
|
|
1177
|
+
return (footerConfig.modelOptions || []).map((option): ExtendedModelOption => {
|
|
1178
|
+
const extendedOption: ExtendedModelOption = {
|
|
1179
|
+
...option,
|
|
1180
|
+
};
|
|
1181
|
+
|
|
1182
|
+
// 设置选中状态:如果当前模型匹配选中的模型,则标记为选中
|
|
1183
|
+
extendedOption.selected = option.value === selectedModel;
|
|
1184
|
+
|
|
1185
|
+
return extendedOption;
|
|
1186
|
+
});
|
|
1187
|
+
}, [footerConfig.modelOptions, footerConfig.extendedModelOptions, selectedModel]);
|
|
1188
|
+
|
|
1165
1189
|
const removeContext = React.useCallback(
|
|
1166
1190
|
(type: MentionType, uri: URI) => {
|
|
1167
1191
|
if (type === MentionType.FILE) {
|
|
@@ -1175,6 +1199,8 @@ export const MentionInput: React.FC<MentionInputProps> = ({
|
|
|
1175
1199
|
[contextService],
|
|
1176
1200
|
);
|
|
1177
1201
|
|
|
1202
|
+
const getFileNameFromPath = (path: string) => decodeURIComponent(path.split('/').pop() || 'Unknown Rule');
|
|
1203
|
+
|
|
1178
1204
|
const renderContextPreview = React.useCallback(
|
|
1179
1205
|
() => (
|
|
1180
1206
|
<div className={styles.context_preview_container}>
|
|
@@ -1185,12 +1211,7 @@ export const MentionInput: React.FC<MentionInputProps> = ({
|
|
|
1185
1211
|
{!hasContext ? localize('aiNative.chat.context.title') : ''}
|
|
1186
1212
|
</span>
|
|
1187
1213
|
{attachedFiles.files.map((file, index) => (
|
|
1188
|
-
<div
|
|
1189
|
-
key={`file-${index}`}
|
|
1190
|
-
className={styles.context_preview_item}
|
|
1191
|
-
data-type={MentionType.FILE}
|
|
1192
|
-
onClick={() => contextService?.removeFileFromContext(file.uri, true)}
|
|
1193
|
-
>
|
|
1214
|
+
<div key={`file-${index}`} className={styles.context_preview_item} data-type={MentionType.FILE}>
|
|
1194
1215
|
<Icon
|
|
1195
1216
|
iconClass={cls(
|
|
1196
1217
|
labelService?.getIcon(file.uri) || MentionType.FILE,
|
|
@@ -1202,74 +1223,36 @@ export const MentionInput: React.FC<MentionInputProps> = ({
|
|
|
1202
1223
|
iconClass={cls(styles.close_icon, getIcon('close'))}
|
|
1203
1224
|
onClick={() => removeContext(MentionType.FILE, file.uri)}
|
|
1204
1225
|
/>
|
|
1205
|
-
<span className={styles.context_preview_item_text}>
|
|
1206
|
-
{workspaceService?.workspace
|
|
1207
|
-
? file.uri.toString().replace(workspaceService.workspace.uri.toString(), '').slice(1)
|
|
1208
|
-
: file.uri.toString()}
|
|
1209
|
-
</span>
|
|
1226
|
+
<span className={styles.context_preview_item_text}>{new URI(file.uri.toString()).displayName}</span>
|
|
1210
1227
|
</div>
|
|
1211
1228
|
))}
|
|
1212
1229
|
|
|
1213
1230
|
{attachedFiles.folders.map((folder, index) => (
|
|
1214
|
-
<div
|
|
1215
|
-
key={`folder-${index}`}
|
|
1216
|
-
className={styles.context_preview_item}
|
|
1217
|
-
data-type='folder'
|
|
1218
|
-
onClick={() => contextService?.removeFileFromContext(folder.uri, true)}
|
|
1219
|
-
>
|
|
1231
|
+
<div key={`folder-${index}`} className={styles.context_preview_item} data-type='folder'>
|
|
1220
1232
|
<Icon iconClass={cls(getIcon('folder'), styles.context_preview_item_icon, styles.icon)} />
|
|
1221
1233
|
<Icon
|
|
1222
1234
|
iconClass={cls(styles.close_icon, getIcon('close'))}
|
|
1223
1235
|
onClick={() => removeContext(MentionType.FOLDER, folder.uri)}
|
|
1224
1236
|
/>
|
|
1225
|
-
<span className={styles.context_preview_item_text}>
|
|
1226
|
-
{workspaceService?.workspace
|
|
1227
|
-
? folder.uri.toString().replace(workspaceService.workspace.uri.toString(), '').slice(1)
|
|
1228
|
-
: folder.uri.toString()}
|
|
1229
|
-
</span>
|
|
1237
|
+
<span className={styles.context_preview_item_text}>{new URI(folder.uri.toString()).displayName}</span>
|
|
1230
1238
|
</div>
|
|
1231
1239
|
))}
|
|
1232
1240
|
|
|
1233
1241
|
{attachedFiles.rules.map((rule, index) => (
|
|
1234
|
-
<div
|
|
1235
|
-
key={`rule-${index}`}
|
|
1236
|
-
className={styles.context_preview_item}
|
|
1237
|
-
data-type='rule'
|
|
1238
|
-
onClick={() => {
|
|
1239
|
-
// 由于没有专门的删除规则方法,我们重新构建规则列表
|
|
1240
|
-
contextService?.cleanFileContext();
|
|
1241
|
-
// 重新添加除了当前要删除的规则之外的所有上下文
|
|
1242
|
-
attachedFiles.files.forEach((file) => contextService?.addFileToContext(file.uri, file.selection, true));
|
|
1243
|
-
attachedFiles.folders.forEach((folder) => contextService?.addFolderToContext(folder.uri, true));
|
|
1244
|
-
attachedFiles.rules.forEach((r, i) => {
|
|
1245
|
-
if (i !== index) {
|
|
1246
|
-
contextService?.addRuleToContext(new URI(r.path), true);
|
|
1247
|
-
}
|
|
1248
|
-
});
|
|
1249
|
-
}}
|
|
1250
|
-
>
|
|
1242
|
+
<div key={`rule-${index}`} className={styles.context_preview_item} data-type='rule'>
|
|
1251
1243
|
<Icon iconClass={cls(getIcon('rules'), styles.context_preview_item_icon, styles.icon)} />
|
|
1252
1244
|
<Icon
|
|
1253
1245
|
iconClass={cls(styles.close_icon, getIcon('close'))}
|
|
1254
1246
|
onClick={() => removeContext(MentionType.RULE, new URI(rule.path))}
|
|
1255
1247
|
/>
|
|
1256
1248
|
<span className={styles.context_preview_item_text}>
|
|
1257
|
-
{rule.path
|
|
1249
|
+
{getFileNameFromPath(rule.path).replace('.mdc', '')}
|
|
1258
1250
|
</span>
|
|
1259
1251
|
</div>
|
|
1260
1252
|
))}
|
|
1261
1253
|
</div>
|
|
1262
1254
|
),
|
|
1263
|
-
[
|
|
1264
|
-
handleClearContext,
|
|
1265
|
-
hasContext,
|
|
1266
|
-
attachedFiles,
|
|
1267
|
-
workspaceService,
|
|
1268
|
-
labelService,
|
|
1269
|
-
contextService,
|
|
1270
|
-
handleTitleClick,
|
|
1271
|
-
removeContext,
|
|
1272
|
-
],
|
|
1255
|
+
[handleClearContext, hasContext, attachedFiles, labelService, contextService, handleTitleClick, removeContext],
|
|
1273
1256
|
);
|
|
1274
1257
|
|
|
1275
1258
|
return (
|
|
@@ -1304,13 +1287,16 @@ export const MentionInput: React.FC<MentionInputProps> = ({
|
|
|
1304
1287
|
<div className={styles.left_control}>
|
|
1305
1288
|
{footerConfig.showModelSelector &&
|
|
1306
1289
|
renderModelSelectorTip(
|
|
1307
|
-
<
|
|
1308
|
-
options={
|
|
1290
|
+
<MentionSelect
|
|
1291
|
+
options={getExtendedModelOptions}
|
|
1309
1292
|
value={selectedModel}
|
|
1310
1293
|
onChange={handleModelChange}
|
|
1311
1294
|
className={styles.model_selector}
|
|
1312
1295
|
size='small'
|
|
1313
1296
|
disabled={footerConfig.disableModelSelector}
|
|
1297
|
+
showThinking={footerConfig.showThinking}
|
|
1298
|
+
thinkingEnabled={footerConfig.thinkingEnabled}
|
|
1299
|
+
onThinkingChange={footerConfig.onThinkingChange}
|
|
1314
1300
|
/>,
|
|
1315
1301
|
)}
|
|
1316
1302
|
{renderButtons(FooterButtonPosition.LEFT)}
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
.mention_select {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: inline-block;
|
|
4
|
+
|
|
5
|
+
&.size_small {
|
|
6
|
+
.select_trigger {
|
|
7
|
+
height: 20px;
|
|
8
|
+
padding: 0 6px;
|
|
9
|
+
font-size: 12px;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&.size_medium {
|
|
14
|
+
.select_trigger {
|
|
15
|
+
height: 32px;
|
|
16
|
+
padding: 0 12px;
|
|
17
|
+
font-size: 14px;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&.size_large {
|
|
22
|
+
.select_trigger {
|
|
23
|
+
height: 40px;
|
|
24
|
+
padding: 0 16px;
|
|
25
|
+
font-size: 16px;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.disabled {
|
|
30
|
+
opacity: 0.6;
|
|
31
|
+
cursor: not-allowed;
|
|
32
|
+
|
|
33
|
+
.select_trigger {
|
|
34
|
+
cursor: not-allowed;
|
|
35
|
+
background-color: var(--input-background-disabled);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.select_trigger {
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
justify-content: space-between;
|
|
43
|
+
background-color: var(--input-background);
|
|
44
|
+
border: 1px solid var(--input-border);
|
|
45
|
+
border-radius: 4px;
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
transition: all 0.2s;
|
|
48
|
+
opacity: 0.7;
|
|
49
|
+
|
|
50
|
+
&:hover:not(.disabled) {
|
|
51
|
+
opacity: 1;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.select_content {
|
|
56
|
+
flex: 1;
|
|
57
|
+
overflow: hidden;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.selected_option {
|
|
61
|
+
display: flex;
|
|
62
|
+
align-items: center;
|
|
63
|
+
gap: 6px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.option_icon {
|
|
67
|
+
flex-shrink: 0;
|
|
68
|
+
font-size: 14px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.option_label {
|
|
72
|
+
flex: 1;
|
|
73
|
+
white-space: nowrap;
|
|
74
|
+
overflow: hidden;
|
|
75
|
+
text-overflow: ellipsis;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.option_badge {
|
|
79
|
+
display: inline-block;
|
|
80
|
+
padding: 2px 6px;
|
|
81
|
+
border-radius: 10px;
|
|
82
|
+
font-size: 10px;
|
|
83
|
+
color: white;
|
|
84
|
+
background-color: var(--badge-background);
|
|
85
|
+
white-space: nowrap;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.placeholder {
|
|
89
|
+
color: var(--input-placeholder-foreground);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.dropdown_arrow {
|
|
93
|
+
margin-left: 8px;
|
|
94
|
+
transition: transform 0.2s;
|
|
95
|
+
color: var(--icon-foreground);
|
|
96
|
+
|
|
97
|
+
&.open {
|
|
98
|
+
transform: rotate(180deg);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.dropdown {
|
|
103
|
+
position: absolute;
|
|
104
|
+
left: 0;
|
|
105
|
+
right: 0;
|
|
106
|
+
z-index: 1000;
|
|
107
|
+
background-color: var(--editor-background);
|
|
108
|
+
border: 1px solid var(--dropdown-border);
|
|
109
|
+
border-radius: 6px;
|
|
110
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.05);
|
|
111
|
+
max-height: 400px;
|
|
112
|
+
min-width: 300px;
|
|
113
|
+
overflow-y: auto;
|
|
114
|
+
padding: 4px;
|
|
115
|
+
animation: dropdownFadeIn 0.15s ease-out;
|
|
116
|
+
|
|
117
|
+
// 滚动条样式
|
|
118
|
+
&::-webkit-scrollbar {
|
|
119
|
+
width: 6px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&::-webkit-scrollbar-track {
|
|
123
|
+
background: transparent;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&::-webkit-scrollbar-thumb {
|
|
127
|
+
background: var(--scrollbar-thumb);
|
|
128
|
+
border-radius: 3px;
|
|
129
|
+
transition: background-color 0.2s;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&::-webkit-scrollbar-thumb:hover {
|
|
133
|
+
background: var(--scrollbar-thumb-hover);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
@keyframes dropdownFadeIn {
|
|
138
|
+
from {
|
|
139
|
+
opacity: 0;
|
|
140
|
+
transform: translateY(-4px);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
to {
|
|
144
|
+
opacity: 1;
|
|
145
|
+
transform: translateY(0);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.thinking_section {
|
|
150
|
+
padding: 8px 12px 4px;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.thinking_toggle {
|
|
154
|
+
display: flex;
|
|
155
|
+
align-items: center;
|
|
156
|
+
gap: 8px;
|
|
157
|
+
padding: 6px 0;
|
|
158
|
+
cursor: pointer;
|
|
159
|
+
border-radius: 4px;
|
|
160
|
+
|
|
161
|
+
&:hover {
|
|
162
|
+
background-color: var(--list-hover-background);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.thinking_icon {
|
|
167
|
+
flex-shrink: 0;
|
|
168
|
+
color: var(--icon-foreground);
|
|
169
|
+
|
|
170
|
+
&.enabled {
|
|
171
|
+
color: var(--list-active-selection-foreground);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.thinking_label {
|
|
176
|
+
font-size: 13px;
|
|
177
|
+
color: var(--foreground);
|
|
178
|
+
font-weight: 500;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.divider {
|
|
182
|
+
height: 1px;
|
|
183
|
+
background-color: var(--separator-border);
|
|
184
|
+
margin: 8px 0 4px;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// 向上展开(默认)
|
|
188
|
+
&.dropdown_up .dropdown {
|
|
189
|
+
bottom: 100%;
|
|
190
|
+
margin-bottom: 4px;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// 向下展开
|
|
194
|
+
&.dropdown_down .dropdown {
|
|
195
|
+
top: 100%;
|
|
196
|
+
margin-top: 4px;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.option {
|
|
200
|
+
padding: 8px 12px;
|
|
201
|
+
border-radius: 4px;
|
|
202
|
+
cursor: pointer;
|
|
203
|
+
transition: all 0.2s;
|
|
204
|
+
position: relative;
|
|
205
|
+
border: 1px solid transparent;
|
|
206
|
+
box-sizing: content-box;
|
|
207
|
+
margin-bottom: 4px;
|
|
208
|
+
&:last-child {
|
|
209
|
+
margin-bottom: 0;
|
|
210
|
+
}
|
|
211
|
+
&:hover:not(.disabled) {
|
|
212
|
+
border-color: var(--dropdown-border);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
&.active {
|
|
216
|
+
border-color: var(--dropdown-border);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
&.selected {
|
|
220
|
+
background-color: var(--dropdown-background);
|
|
221
|
+
|
|
222
|
+
&::after {
|
|
223
|
+
content: '✓';
|
|
224
|
+
position: absolute;
|
|
225
|
+
top: 50%;
|
|
226
|
+
right: 12px;
|
|
227
|
+
transform: translateY(-50%);
|
|
228
|
+
color: var(--list-active-selection-foreground);
|
|
229
|
+
font-weight: bold;
|
|
230
|
+
font-size: 14px;
|
|
231
|
+
z-index: 1;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
&.disabled {
|
|
236
|
+
opacity: 0.5;
|
|
237
|
+
cursor: not-allowed;
|
|
238
|
+
|
|
239
|
+
&:hover {
|
|
240
|
+
transform: none;
|
|
241
|
+
box-shadow: none;
|
|
242
|
+
border-color: transparent;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.option_main {
|
|
248
|
+
display: flex;
|
|
249
|
+
flex-direction: column;
|
|
250
|
+
gap: 6px;
|
|
251
|
+
padding-right: 24px;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.option_header {
|
|
255
|
+
display: flex;
|
|
256
|
+
align-items: center;
|
|
257
|
+
justify-content: space-between;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.option_title {
|
|
261
|
+
display: flex;
|
|
262
|
+
align-items: center;
|
|
263
|
+
gap: 8px;
|
|
264
|
+
flex: 1;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.option_description {
|
|
268
|
+
font-size: 12px;
|
|
269
|
+
color: var(--descriptionForeground);
|
|
270
|
+
line-height: 1.4;
|
|
271
|
+
margin-top: 4px;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.option_tags {
|
|
275
|
+
display: flex;
|
|
276
|
+
flex-wrap: wrap;
|
|
277
|
+
gap: 4px;
|
|
278
|
+
margin-top: 6px;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.tag {
|
|
282
|
+
display: inline-block;
|
|
283
|
+
padding: 2px 6px;
|
|
284
|
+
border-radius: 10px;
|
|
285
|
+
font-size: 10px;
|
|
286
|
+
background-color: var(--badge-background);
|
|
287
|
+
color: var(--badge-foreground);
|
|
288
|
+
white-space: nowrap;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.status_indicator {
|
|
292
|
+
width: 8px;
|
|
293
|
+
height: 8px;
|
|
294
|
+
border-radius: 50%;
|
|
295
|
+
flex-shrink: 0;
|
|
296
|
+
}
|
|
297
|
+
}
|