Download apps/vscode/src/utils/context.ts from SaylorTwift/kimi-code: direct link, hf CLI and curl.
- Browser
- Download file 406 Bytes
-
https://huggingface.co/SaylorTwift/kimi-code/resolve/main/apps/vscode/src/utils/context.ts
- Command line
-
hf download hf://SaylorTwift/kimi-code/apps/vscode/src/utils/context.ts
-
curl -L -o context.ts https://huggingface.co/SaylorTwift/kimi-code/resolve/main/apps/vscode/src/utils/context.ts
406 Bytes
| import * as vscode from "vscode"; | |
| import type { KimiHarness } from "@moonshot-ai/kimi-code-sdk"; | |
| export async function updateLoginContext(harness: KimiHarness): Promise<boolean> { | |
| const status = await harness.auth.status(); | |
| const loggedIn = status.providers.some((provider) => provider.hasToken); | |
| await vscode.commands.executeCommand("setContext", "kimi.isLoggedIn", loggedIn); | |
| return loggedIn; | |
| } | |