fix: enhance MCP token handling (#14483)

fix #14475 

#### PR Dependency Tree


* **PR #14483** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

## Release Notes

* **New Features**
* Enhanced MCP server token management with improved security—tokens now
display only once with redaction support.
* Updated token creation and deletion workflows with clearer UI state
controls.
* Added tooltip guidance when copying configuration with redacted
tokens.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
DarkSky
2026-02-21 04:14:14 +08:00
committed by GitHub
parent c9bffc13b5
commit da57bfe8e7
4 changed files with 33 additions and 9 deletions
@@ -24,7 +24,7 @@ export class AccessTokenService extends Service {
isRevalidating$ = new LiveData(false);
error$ = new LiveData<any>(null);
async generateUserAccessToken(name: string) {
async generateUserAccessToken(name: string): Promise<AccessToken> {
const accessToken =
await this.accessTokenStore.generateUserAccessToken(name);
this.accessTokens$.value = [
@@ -33,6 +33,8 @@ export class AccessTokenService extends Service {
];
await this.waitForRevalidation();
return accessToken as AccessToken;
}
async revokeUserAccessToken(id: string) {