mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-09 20:50:58 +00:00
feat: expose Workspace-scoped rotating plugin debug keys (#2395)
* feat: add Workspace-scoped rotating plugin debug tokens * chore: pin formatted Workspace debug runtime * chore: pin merged Workspace debug runtime * chore: pin tenant-safe debug runtime --------- Co-authored-by: dadachann <185672915+dadachann@users.noreply.github.com>
This commit is contained in:
@@ -57,6 +57,7 @@ function PluginListView() {
|
||||
const [debugInfo, setDebugInfo] = useState<{
|
||||
debug_url: string;
|
||||
plugin_debug_key: string;
|
||||
expires_at: string;
|
||||
} | null>(null);
|
||||
const [debugPopoverOpen, setDebugPopoverOpen] = useState(false);
|
||||
const [copiedDebugUrl, setCopiedDebugUrl] = useState(false);
|
||||
@@ -275,6 +276,13 @@ function PluginListView() {
|
||||
)}
|
||||
</Button>
|
||||
</div>
|
||||
{debugInfo?.expires_at && (
|
||||
<p className="text-xs text-muted-foreground pl-[58px]">
|
||||
{t('plugins.debugKeyExpires', {
|
||||
time: new Date(debugInfo.expires_at).toLocaleString(),
|
||||
})}
|
||||
</p>
|
||||
)}
|
||||
{!debugInfo?.plugin_debug_key && (
|
||||
<p className="text-xs text-muted-foreground ml-[58px]">
|
||||
{t('plugins.debugKeyDisabled')}
|
||||
|
||||
@@ -1091,6 +1091,7 @@ export class BackendClient extends BaseHttpClient {
|
||||
public getPluginDebugInfo(): Promise<{
|
||||
debug_url: string;
|
||||
plugin_debug_key: string;
|
||||
expires_at: string;
|
||||
}> {
|
||||
return this.get('/api/v1/plugins/debug-info');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user