mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 19:52:02 +00:00
fix: 重写 AuthenticateStep 使用正确的 OAuth 流程
- 按照 mcpCommand.ts 中的 auth 实现重写 AuthenticateStep - 使用 MCPOAuthProvider + MCPOAuthTokenStorage 进行实际 OAuth 认证 - 通过 appEvents/AppEvent.OauthDisplayMessage 展示认证过程消息 - 认证成功后自动触发 tool re-discovery 和 client tools 更新 - 只在 server.config.oauth?.enabled 为 true 时显示 Authenticate 选项 - 认证成功后 reload servers 刷新列表
This commit is contained in:
parent
8c693ba738
commit
9e34b5db4a
5 changed files with 192 additions and 168 deletions
|
|
@ -529,8 +529,7 @@ export const MCPManagementDialog: React.FC<MCPManagementDialogProps> = ({
|
|||
<AuthenticateStep
|
||||
server={selectedServer}
|
||||
onSuccess={() => {
|
||||
// TODO: 认证成功后重新加载服务器列表
|
||||
handleNavigateBack();
|
||||
void reloadServers();
|
||||
}}
|
||||
onBack={handleNavigateBack}
|
||||
/>
|
||||
|
|
@ -558,6 +557,7 @@ export const MCPManagementDialog: React.FC<MCPManagementDialogProps> = ({
|
|||
handleSelectTool,
|
||||
handleSelectDisableScope,
|
||||
getServerTools,
|
||||
reloadServers,
|
||||
]);
|
||||
|
||||
// Render step footer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue