Skip to content

Commit

Permalink
Merge branch 'feat/0.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
dolphin0618 committed Dec 6, 2024
2 parents df4e6f9 + ca12f96 commit 2d62fb1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/frontend/src/controllers/API/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ const workflowTemplate = [
"key": "knowledge_id",
"label": "检索知识库范围",
"type": "knowledge_select_multi",
"placeholder": "请选择知识库",
"value": {
"tab": "knowledge",
"value": []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ type KnowledgeTypeValues = `${KnowledgeType}`;
export default function KnowledgeSelectItem({ data, onChange, onValidate }) {
const { flow } = useFlowStore()

const currentTabRef = useRef(data.value.type)
const [tabType, setTabType] = useState<KnowledgeTypeValues>(data.value.type)
const currentTabRef = useRef(data.value.tab)
const [tabType, setTabType] = useState<KnowledgeTypeValues>(data.value.tab)
const [value, setValue] = useState<any>(() => data.value.value.map(el => {
return { label: el.label, value: el.key }
}))
Expand Down Expand Up @@ -134,7 +134,7 @@ export default function KnowledgeSelectItem({ data, onChange, onValidate }) {
hideSearch={tabType === KnowledgeType.Temp}
value={value}
options={tabType === KnowledgeType.Knowledge ? options : fileOptions}
placeholder={data.help || ''}
placeholder={data.placeholder || ''}
searchPlaceholder={t('build.searchBaseName')}
onChange={handleSelect}
onLoad={() => reload(1, '')}
Expand Down
1 change: 1 addition & 0 deletions src/frontend/vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import svgr from "vite-plugin-svgr";

// Use environment variable to determine the target.
// const target = process.env.VITE_PROXY_TARGET || "http://127.0.0.1:7860";
const target = process.env.VITE_PROXY_TARGET || "http://192.168.106.120:3002";
const apiRoutes = ["^/api/", "/health"];

const proxyTargets = apiRoutes.reduce((proxyObj, route) => {
Expand Down

0 comments on commit 2d62fb1

Please sign in to comment.