Add Maestro login button

This commit is contained in:
Saoud Rizwan
2024-08-22 11:02:25 -04:00
parent e8df2400bf
commit f6fd76823b
18 changed files with 375 additions and 11 deletions

View File

@@ -108,6 +108,20 @@ export function activate(context: vscode.ExtensionContext) {
context.subscriptions.push(
vscode.workspace.registerTextDocumentContentProvider("claude-dev-diff", diffContentProvider)
)
// URI Handler
const handleUri = async (uri: vscode.Uri) => {
const query = new URLSearchParams(uri.query)
const token = query.get("token")
const fixedToken = token?.replaceAll("jwt?token=", "")
console.log(fixedToken)
console.log(uri)
if (fixedToken) {
await sidebarProvider.saveMaestroToken(fixedToken)
}
}
context.subscriptions.push(vscode.window.registerUriHandler({ handleUri }))
}
// This method is called when your extension is deactivated