refactor(layout): 重构布局组件并添加新功能
- 更新 Header 组件,增加项目标题和历史记录切换按钮 - 新增 DataNavigation 组件用于数据导航 - 添加 Playground 相关新组件,包括数据、场景、团队等信息展示 - 重构 Layout 组件,使用 Context 管理历史记录状态 - 更新 zh/option.json 文件,添加新的项目标题和对话相关翻译
This commit is contained in:
@@ -26,10 +26,10 @@ export const tokenizeInput = function (input: string): string[] {
|
||||
}
|
||||
//doipUrl = tcp://reg01.public.internetofdata.cn:21037
|
||||
export const iodConfig = {
|
||||
"gatewayUrl": "tcp://127.0.0.1:21036",
|
||||
"registry":"bdware/Registry",
|
||||
"localRepository":"bdtest.local/myrepo1",
|
||||
"doBrowser":"http://127.0.0.1:21030/SCIDE/SCManager"
|
||||
"gatewayUrl": "tcp://021.node.internetapi.cn:21052",
|
||||
"registry":"data/Registry",
|
||||
"localRepository":"data/Repository",
|
||||
"doBrowser":"http://021.node.internetapi.cn:21030/SCIDE/SCManager"
|
||||
}
|
||||
function inGrepList(str: string){
|
||||
return "什么|问题|需要|合适|设计|考虑|合作|精度|传感器|最新|研究|药物".indexOf(str)!=-1;
|
||||
@@ -88,7 +88,7 @@ export const makeDOIPParams = (doId:string, op:string, attributes:Object, reques
|
||||
attributes: attributes,
|
||||
body: requestBody
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
export const retrieveDoc = function(doId: string) : Promise<Document> {
|
||||
console.log("retriveDoc:"+doId)
|
||||
@@ -185,6 +185,7 @@ export async function localIodSearch(
|
||||
const abortController = new AbortController();
|
||||
setTimeout(() => abortController.abort(), 10000);
|
||||
const params = makeRegSearchParams(TOTAL_SEARCH_RESULTS, keywords);
|
||||
console.log('params------->',params)
|
||||
try {
|
||||
const response = await fetch(iodConfig.doBrowser, {
|
||||
method: "POST",
|
||||
@@ -194,13 +195,11 @@ export async function localIodSearch(
|
||||
|
||||
const res = await response.json();
|
||||
if (res.status !== "Success") {
|
||||
console.log(res);
|
||||
return [];
|
||||
}
|
||||
|
||||
const body = JSON.parse(res.result.body);
|
||||
if (body.code !== 0) {
|
||||
console.log(body);
|
||||
return [];
|
||||
}
|
||||
|
||||
@@ -363,7 +362,7 @@ export const searchIod = async (query: string, keywords: string[]) => {
|
||||
}
|
||||
}
|
||||
return searchResults
|
||||
|
||||
|
||||
/*
|
||||
const ollamaUrl = await getOllamaURL()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user