feat(chat): unify resource chips and browse recent files in @ mention
Add recent=true to knowledge search so the mention picker can list recent files without a keyword, and consolidate KB/FAQ/file chip styling across chat input and message history.
This commit is contained in:
@@ -328,59 +328,11 @@ onBeforeUnmount(() => {
|
||||
}
|
||||
|
||||
.mentioned_items {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
justify-content: flex-start;
|
||||
max-width: 100%;
|
||||
margin-bottom: 2px;
|
||||
.chat-mentioned-items();
|
||||
}
|
||||
|
||||
.mentioned_tag {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 3px 8px;
|
||||
border-radius: 4px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
max-width: 200px;
|
||||
cursor: default;
|
||||
transition: all 0.15s;
|
||||
background: rgba(7, 192, 95, 0.06);
|
||||
border: 1px solid rgba(7, 192, 95, 0.2);
|
||||
color: var(--td-text-color-primary);
|
||||
|
||||
&.kb-tag {
|
||||
.tag_icon {
|
||||
color: var(--td-brand-color);
|
||||
}
|
||||
}
|
||||
|
||||
&.faq-tag {
|
||||
.tag_icon {
|
||||
color: var(--td-warning-color);
|
||||
}
|
||||
}
|
||||
|
||||
&.file-tag {
|
||||
.tag_icon {
|
||||
color: var(--td-text-color-secondary);
|
||||
}
|
||||
}
|
||||
|
||||
.tag_icon {
|
||||
font-size: 13px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.tag_name {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: currentColor;
|
||||
}
|
||||
.chat-mentioned-tag();
|
||||
}
|
||||
|
||||
.fallback-icon-btn {
|
||||
|
||||
@@ -147,6 +147,8 @@ const closePreImg = () => {
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
@import '../../../components/css/chat-resource-chips.less';
|
||||
|
||||
.user_msg_container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -156,59 +158,11 @@ const closePreImg = () => {
|
||||
}
|
||||
|
||||
.mentioned_items {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
justify-content: flex-end;
|
||||
max-width: 100%;
|
||||
margin-bottom: 2px;
|
||||
.chat-mentioned-items(flex-end);
|
||||
}
|
||||
|
||||
.mentioned_tag {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 3px 8px;
|
||||
border-radius: 5px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
max-width: 200px;
|
||||
cursor: default;
|
||||
transition: all 0.15s;
|
||||
background: rgba(7, 192, 95, 0.06);
|
||||
border: 1px solid rgba(7, 192, 95, 0.2);
|
||||
color: var(--td-text-color-primary);
|
||||
|
||||
&.kb-tag {
|
||||
.tag_icon {
|
||||
color: var(--td-brand-color);
|
||||
}
|
||||
}
|
||||
|
||||
&.faq-tag {
|
||||
.tag_icon {
|
||||
color: var(--td-warning-color);
|
||||
}
|
||||
}
|
||||
|
||||
&.file-tag {
|
||||
.tag_icon {
|
||||
color: var(--td-text-color-secondary);
|
||||
}
|
||||
}
|
||||
|
||||
.tag_icon {
|
||||
font-size: 13px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.tag_name {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: currentColor;
|
||||
}
|
||||
.chat-mentioned-tag();
|
||||
}
|
||||
|
||||
.user_msg_container {
|
||||
|
||||
Reference in New Issue
Block a user