Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,547 changes: 720 additions & 827 deletions app/package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,15 @@
"vitest": "^4.1.4"
},
"dependencies": {
"@ant-design/icons": "^6.2.2",
"@babel/polyfill": "^7.0.0",
"@geoffcox/react-splitter": "^2.1.2",
"@types/tinycolor2": "^1.4.3",
"@typescript-eslint/eslint-plugin": "^5.57.1",
"@typescript-eslint/parser": "^5.57.1",
"@ungap/structured-clone": "^1.0.2",
"ahooks": "^3.7.6",
"antd": "^3.26.20",
"antd": "^4.24.16",
"classnames": "^2.3.2",
"core-js": "^3.30.1",
"lodash.capitalize": "^4.2.1",
Expand Down
13 changes: 9 additions & 4 deletions app/src/components/AiContextPathPicker/AiContextPathPicker.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { Fragment, useEffect, useRef, useState } from 'react';
import { Alert, Icon, List, Spin } from 'antd';
import { Alert, List, Spin } from 'antd';
import { ArrowUpOutlined, FileTextOutlined, FolderAddOutlined, FolderOutlined } from '@ant-design/icons';
import classnames from 'classnames';
import sortBy from 'lodash.sortby';

Expand All @@ -20,9 +21,13 @@ type Props = {
};

function getItemIcon(item: FileSystemItemType) {
if (item.isFile) return <Icon type="file-text" className="ai-context-path-picker__file-icon" />;
if (item.name === '..') return <Icon type="arrow-up" className="ai-context-path-picker__directory-icon" />;
return <Icon type={item.hasChildren ? 'folder-add' : 'folder'} className="ai-context-path-picker__directory-icon" />;
if (item.isFile) return <FileTextOutlined className="ai-context-path-picker__file-icon" />;
if (item.name === '..') return <ArrowUpOutlined className="ai-context-path-picker__directory-icon" />;
return item.hasChildren ? (
<FolderAddOutlined className="ai-context-path-picker__directory-icon" />
) : (
<FolderOutlined className="ai-context-path-picker__directory-icon" />
);
}

function AiContextPathPicker({ globalModalId, initialPath, onSelectPath }: Props) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect, useMemo, useRef, useState } from 'react';
import { Icon } from 'antd';
import { BranchesOutlined } from '@ant-design/icons';
import { useSize } from 'ahooks';
import { Tree, NodeRendererProps, RowRendererProps, CursorProps, TreeApi } from 'react-arborist';

Expand Down Expand Up @@ -166,7 +166,7 @@ export function AiDraftConversationTreePreview({ conversationAsset }: Props) {
<div className="ai-draft-preview-tree">
<div className="ai-draft-preview-tree__toolbar">
<span>
<Icon type="branches" /> Conversation tree preview
<BranchesOutlined /> Conversation tree preview
</span>
<span>Read-only</span>
</div>
Expand Down
78 changes: 53 additions & 25 deletions app/src/components/AiDraftModal/AiDraftModal.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
}

.ai-draft-modal .ant-input,
.ai-draft-modal .ant-select-selection {
.ai-draft-modal .ant-select:not(.ant-select-customize-input) .ant-select-selector {
border-color: #5f6b7a;
}

Expand Down Expand Up @@ -122,23 +122,32 @@
}

.ai-draft-modal__reasoning-dropdown .ai-draft-modal__select-option span {
color: #dbe7f3;
color: #d2d2d2;
}

.ai-draft-modal__reasoning-dropdown .ai-draft-modal__select-option small {
color: #8fb2d2;
color: #2ab0f7;
}

.ai-draft-modal__reasoning-dropdown .ant-select-dropdown-menu-item:hover .ai-draft-modal__select-option span,
.ai-draft-modal__reasoning-dropdown .ant-select-dropdown-menu-item-active .ai-draft-modal__select-option span,
.ai-draft-modal__reasoning-dropdown .ant-select-dropdown-menu-item-selected .ai-draft-modal__select-option span {
.ai-draft-modal__reasoning-dropdown .ant-select-item-option:not(.ant-select-item-option-selected):hover .ai-draft-modal__select-option span,
.ai-draft-modal__reasoning-dropdown .ant-select-item-option-active:not(.ant-select-item-option-selected) .ai-draft-modal__select-option span {
color: #ffffff;
}

.ai-draft-modal__reasoning-dropdown .ant-select-dropdown-menu-item:hover .ai-draft-modal__select-option small,
.ai-draft-modal__reasoning-dropdown .ant-select-dropdown-menu-item-active .ai-draft-modal__select-option small,
.ai-draft-modal__reasoning-dropdown .ant-select-dropdown-menu-item-selected .ai-draft-modal__select-option small {
color: #d7ebff;
.ai-draft-modal__reasoning-dropdown .ant-select-item-option:not(.ant-select-item-option-selected):hover .ai-draft-modal__select-option small,
.ai-draft-modal__reasoning-dropdown .ant-select-item-option-active:not(.ant-select-item-option-selected) .ai-draft-modal__select-option small {
color: #ffffff;
}

.ai-draft-modal__reasoning-dropdown .ant-select-item-option-selected .ai-draft-modal__select-option span,
.ai-draft-modal__reasoning-dropdown .ant-select-item-option-selected .ai-draft-modal__select-option small {
color: #ffffff;
}

.ai-draft-modal__reasoning-dropdown .ant-select-item-option-selected:hover,
.ai-draft-modal__reasoning-dropdown .ant-select-item-option-selected.ant-select-item-option-active {
background-color: rgba(42, 176, 247, 0.14);
color: #ffffff;
}

.ai-draft-modal__field-actions {
Expand Down Expand Up @@ -296,6 +305,23 @@
min-width: 80px;
}

.ai-draft-personalities__search {
min-width: 0;
}

.ai-draft-personalities__search .ant-input-affix-wrapper {
padding-left: 12px;
}

.ai-draft-personalities__search .ant-input-affix-wrapper .ant-input-prefix {
margin-right: 12px;
color: #40556c;
}

.ai-draft-personalities__search .ant-input-affix-wrapper > input.ant-input {
padding-left: 10px !important;
}

.ai-draft-personalities__toolbar .ant-btn,
.ai-draft-personalities__list-actions .ant-btn,
.ai-draft-personalities__editor-heading .ant-btn {
Expand Down Expand Up @@ -342,22 +368,25 @@
margin-top: 8px;
}

.ai-draft-personalities__item:hover,
.ai-draft-personalities__item:focus {
.ai-draft-personalities__item:not(.ai-draft-personalities__item--active):hover,
.ai-draft-personalities__item:not(.ai-draft-personalities__item--active):focus {
outline: none;
background: #f6f8fb;
box-shadow: 0 0 0 1px rgba(31, 95, 139, 0.3), 0 4px 12px rgba(31, 47, 67, 0.12);
}

.ai-draft-personalities__item:active {
transform: scale(0.96);
}

.ai-draft-personalities__item--active {
outline: none;
background: #eef6fb;
box-shadow: 0 0 0 2px rgba(31, 95, 139, 0.34), 0 4px 12px rgba(31, 47, 67, 0.14);
}

.ai-draft-personalities__item--active:hover,
.ai-draft-personalities__item--active:focus {
background: #eef6fb;
box-shadow: 0 0 0 2px rgba(31, 95, 139, 0.42), 0 4px 12px rgba(31, 47, 67, 0.14);
}

.ai-draft-personalities__item--disabled {
opacity: 0.58;
}
Expand Down Expand Up @@ -440,36 +469,35 @@
padding-bottom: 4px;
}

.ai-draft-personalities__editor .ant-select-selection--multiple {
.ai-draft-personalities__editor .ant-select-multiple .ant-select-selector {
min-height: 34px;
padding-bottom: 2px;
}

.ai-draft-personalities__editor .ant-select-selection--multiple .ant-select-selection__rendered {
.ai-draft-personalities__editor .ant-select-multiple .ant-select-selection-overflow {
min-height: 30px;
margin-right: 6px;
margin-bottom: -2px;
margin-left: 6px;
padding-right: 6px;
padding-left: 6px;
line-height: 30px;
}

.ai-draft-personalities__editor .ant-select-selection__choice {
.ai-draft-personalities__editor .ant-select-selection-item {
max-width: 100%;
}

.ai-draft-personalities__editor .ant-select-selection--multiple .ant-select-selection__choice {
.ai-draft-personalities__editor .ant-select-multiple .ant-select-selection-item {
height: 24px;
margin-right: 5px;
margin-top: 4px;
line-height: 22px;
}

.ai-draft-personalities__editor .ant-select-selection--multiple .ant-select-search--inline {
.ai-draft-personalities__editor .ant-select-multiple .ant-select-selection-search {
height: 28px;
line-height: 28px;
}

.ai-draft-personalities__editor .ant-select-selection--multiple .ant-select-search__field {
.ai-draft-personalities__editor .ant-select-multiple .ant-select-selection-search-input {
height: 24px;
margin-top: 3px;
}
Expand Down
Loading
Loading