Skip to content

Commit

Permalink
feat: support mutiple webview connect socket
Browse files Browse the repository at this point in the history
  • Loading branch information
2214962083 committed Dec 26, 2024
1 parent e4555f6 commit 2312214
Show file tree
Hide file tree
Showing 54 changed files with 1,995 additions and 1,077 deletions.
44 changes: 44 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@
{
"id": "aide.chatHistoriesTree",
"name": "%view.chatHistoriesTree%"
},
{
"id": "aide.promptSnippetTree",
"name": "%view.promptSnippetTree%"
}
]
},
Expand Down Expand Up @@ -200,6 +204,26 @@
"command": "aide.chatHistoriesTree.duplicateSession",
"title": "%command.chatHistoriesTree.duplicateSession%",
"icon": "$(copy)"
},
{
"command": "aide.promptSnippetTree.refresh",
"title": "%command.promptSnippetTree.refresh%",
"icon": "$(refresh)"
},
{
"command": "aide.promptSnippetTree.createSnippet",
"title": "%command.promptSnippetTree.createSnippet%",
"icon": "$(plus)"
},
{
"command": "aide.promptSnippetTree.deleteSnippet",
"title": "%command.promptSnippetTree.deleteSnippet%",
"icon": "$(trash)"
},
{
"command": "aide.promptSnippetTree.duplicateSnippet",
"title": "%command.promptSnippetTree.duplicateSnippet%",
"icon": "$(copy)"
}
],
"menus": {
Expand Down Expand Up @@ -270,6 +294,16 @@
"command": "aide.chatHistoriesTree.refresh",
"when": "view == aide.chatHistoriesTree",
"group": "navigation"
},
{
"command": "aide.promptSnippetTree.createSnippet",
"when": "view == aide.promptSnippetTree",
"group": "navigation"
},
{
"command": "aide.promptSnippetTree.refresh",
"when": "view == aide.promptSnippetTree",
"group": "navigation"
}
],
"view/item/context": [
Expand All @@ -282,6 +316,16 @@
"command": "aide.chatHistoriesTree.duplicateSession",
"when": "view == aide.chatHistoriesTree && viewItem =~ /action:duplicateSession/",
"group": "inline"
},
{
"command": "aide.promptSnippetTree.deleteSnippet",
"when": "view == aide.promptSnippetTree && viewItem =~ /action:deleteSnippet/",
"group": "inline"
},
{
"command": "aide.promptSnippetTree.duplicateSnippet",
"when": "view == aide.promptSnippetTree && viewItem =~ /action:duplicateSnippet/",
"group": "inline"
}
]
},
Expand Down
5 changes: 5 additions & 0 deletions package.nls.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@
"command.chatHistoriesTree.createAndOpenSession": "Create and Open Chat",
"command.chatHistoriesTree.deleteSession": "Delete Chat",
"command.chatHistoriesTree.duplicateSession": "Duplicate Chat",
"command.promptSnippetTree.refresh": "Refresh Prompt Snippets",
"command.promptSnippetTree.createSnippet": "Create Prompt Snippet",
"command.promptSnippetTree.deleteSnippet": "Delete Prompt Snippet",
"command.promptSnippetTree.duplicateSnippet": "Duplicate Prompt Snippet",
"view.chatHistoriesTree": "Aide Chat Histories",
"view.promptSnippetTree": "Aide Prompt Snippets",
"config.title": "Aide Configuration",
"config.openaiKey.description": "OpenAI Key, [click to view online documentation](https://aide.nicepkg.cn/guide/getting-started/how-to-configure-openai-key) or [I Don't Have an OpenAI Key](https://aide.nicepkg.cn/guide/getting-started/how-to-configure-openai-key#i-don-t-have-an-openai-key)",
"config.openaiModel.description": "OpenAI Model, [click to view online documentation](https://aide.nicepkg.cn/guide/configuration/openai-model)",
Expand Down
5 changes: 5 additions & 0 deletions package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@
"command.chatHistoriesTree.createAndOpenSession": "Create and Open Chat",
"command.chatHistoriesTree.deleteSession": "Delete Chat",
"command.chatHistoriesTree.duplicateSession": "Duplicate Chat",
"command.promptSnippetTree.refresh": "Refresh Prompt Snippets",
"command.promptSnippetTree.createSnippet": "Create Prompt Snippet",
"command.promptSnippetTree.deleteSnippet": "Delete Prompt Snippet",
"command.promptSnippetTree.duplicateSnippet": "Duplicate Prompt Snippet",
"view.chatHistoriesTree": "Aide Chat Histories",
"view.promptSnippetTree": "Aide Prompt Snippets",
"config.title": "Aide Configuration",
"config.openaiKey.description": "OpenAI Key, [click to view online documentation](https://aide.nicepkg.cn/guide/getting-started/how-to-configure-openai-key) or [I Don't Have an OpenAI Key](https://aide.nicepkg.cn/guide/getting-started/how-to-configure-openai-key#i-don-t-have-an-openai-key)",
"config.openaiModel.description": "OpenAI Model, [click to view online documentation](https://aide.nicepkg.cn/guide/configuration/openai-model)",
Expand Down
5 changes: 5 additions & 0 deletions package.nls.zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@
"command.chatHistoriesTree.createAndOpenSession": "新建聊天并打开",
"command.chatHistoriesTree.deleteSession": "删除聊天记录",
"command.chatHistoriesTree.duplicateSession": "复制聊天记录",
"command.promptSnippetTree.refresh": "刷新提示词片段",
"command.promptSnippetTree.createSnippet": "新建提示词片段",
"command.promptSnippetTree.deleteSnippet": "删除提示词片段",
"command.promptSnippetTree.duplicateSnippet": "复制提示词片段",
"view.chatHistoriesTree": "Aide 聊天历史",
"view.promptSnippetTree": "Aide 提示词片段",
"config.title": "Aide 配置",
"config.openaiKey.description": "OpenAI Key, [点击查看在线文档](https://aide.nicepkg.cn/zh/guide/getting-started/how-to-configure-openai-key) 或者 [我没有 OpenAI Key](https://aide.nicepkg.cn/zh/guide/getting-started/how-to-configure-openai-key#%E6%88%91%E6%B2%A1%E6%9C%89-openai-key)",
"config.openaiModel.description": "OpenAI Model, [点击查看在线文档](https://aide.nicepkg.cn/zh/guide/configuration/openai-model)",
Expand Down
3 changes: 1 addition & 2 deletions src/extension/actions/mention-actions.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import { ActionRegister } from '@extension/registers/action-register'
import { ServerPluginRegister } from '@extension/registers/server-plugin-register'
import { tryParseJSON } from '@extension/utils'
import { ServerActionCollection } from '@shared/actions/server-action-collection'
import type { ActionContext } from '@shared/actions/types'
import type { Conversation, Mention } from '@shared/entities'
import type {
RefreshMentionFn,
ServerUtilsProvider
} from '@shared/plugins/base/server/create-provider-manager'
import { settledPromiseResults } from '@shared/utils/common'
import { settledPromiseResults, tryParseJSON } from '@shared/utils/common'

export class MentionActionsCollection extends ServerActionCollection {
readonly categoryName = 'mention'
Expand Down
Loading

0 comments on commit 2312214

Please sign in to comment.