ai_agent/commands/
remote_setup_api.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, Serialize, Deserialize)]
4pub struct ImportTokenResult {
5 pub github_username: String,
6}
7
8#[derive(Debug, Clone, Serialize, Deserialize)]
9pub struct ImportTokenError {
10 pub kind: String,
11 pub status: Option<u16>,
12}
13
14pub struct RedactedGithubToken(String);
15
16impl RedactedGithubToken {
17 pub fn new(raw: String) -> Self {
18 Self(raw)
19 }
20
21 pub fn reveal(&self) -> &str {
22 &self.0
23 }
24}
25
26impl std::fmt::Display for RedactedGithubToken {
27 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
28 write!(f, "[REDACTED:gh-token]")
29 }
30}
31
32pub async fn import_github_token(
33 _token: RedactedGithubToken,
34) -> Result<ImportTokenResult, ImportTokenError> {
35 Err(ImportTokenError {
36 kind: "not_signed_in".to_string(),
37 status: None,
38 })
39}
40
41pub async fn create_default_environment() -> bool {
42 false
43}
44
45pub async fn is_signed_in() -> bool {
46 false
47}
48
49pub fn get_code_web_url() -> String {
50 "https://claude.ai/code".to_string()
51}