feat: add CLI session sharing functionality

- Implemented share token creation and revocation for CLI sessions.
- Added a new page for viewing shared CLI sessions with SSE support.
- Introduced hooks for fetching and managing CLI session shares.
- Enhanced the IssueTerminalTab component to handle share tokens and display active shares.
- Updated API routes to support fetching and revoking share tokens.
- Added unit tests for the CLI session share manager and rate limiter.
- Updated localization files to include new strings for sharing functionality.
This commit is contained in:
catlog22
2026-02-09 22:57:05 +08:00
parent 362f354f1c
commit d0cdee2e68
18 changed files with 748 additions and 23 deletions

View File

@@ -120,7 +120,18 @@
"refresh": "Refresh",
"new": "New Session",
"close": "Close",
"share": "Share (Read-only)"
"share": "Share (Read-only)",
"revokeShare": "Revoke",
"expiresAt": "Expires at",
"activeShares": "Active shares"
},
"share": {
"pageTitle": "Shared CLI Session",
"missingParams": "Missing sessionKey or shareToken in URL",
"connecting": "Connecting",
"connected": "Live",
"error": "Error",
"linkLabel": "Share link"
},
"exec": {
"tool": "Tool",

View File

@@ -120,7 +120,18 @@
"refresh": "刷新",
"new": "新建会话",
"close": "关闭",
"share": "分享(只读)"
"share": "分享(只读)",
"revokeShare": "撤销分享",
"expiresAt": "过期时间",
"activeShares": "分享列表"
},
"share": {
"pageTitle": "共享终端会话",
"missingParams": "链接缺少 sessionKey 或 shareToken 参数",
"connecting": "连接中",
"connected": "实时",
"error": "错误",
"linkLabel": "分享链接"
},
"exec": {
"tool": "工具",