1use super::SupportedApp;
2
3#[derive(Debug, Clone)]
5pub struct AppInfo {
6 pub name: String,
7 pub description: String,
8 pub port: u16,
9 pub protocol: String,
10 pub endpoints: Vec<String>,
11 pub auth_required: bool,
12}
13
14pub struct AppInfoProvider;
16
17impl AppInfoProvider {
18 pub fn get_app_info(app: &SupportedApp) -> AppInfo {
20 match app {
21 SupportedApp::CodexCLI => AppInfo {
22 name: "Codex CLI".to_string(),
23 description: "OpenAI Codex CLI tool for AI-powered coding assistance".to_string(),
24 port: 8088,
25 protocol: "OpenAI API".to_string(),
26 endpoints: vec![
27 "POST /v1/chat/completions".to_string(),
28 "GET /v1/models".to_string(),
29 ],
30 auth_required: true,
31 },
32 SupportedApp::Zed => AppInfo {
33 name: "Zed".to_string(),
34 description: "Zed editor with AI assistant integration".to_string(),
35 port: 11434,
36 protocol: "Ollama API".to_string(),
37 endpoints: vec![
38 "POST /api/chat".to_string(),
39 "POST /api/generate".to_string(),
40 "GET /api/tags".to_string(),
41 ],
42 auth_required: false,
43 },
44 SupportedApp::Aider => AppInfo {
45 name: "Aider".to_string(),
46 description: "AI pair programming in your terminal".to_string(),
47 port: 8090,
48 protocol: "OpenAI API".to_string(),
49 endpoints: vec![
50 "POST /v1/chat/completions".to_string(),
51 "GET /v1/models".to_string(),
52 ],
53 auth_required: true,
54 },
55 SupportedApp::OpenHands => AppInfo {
56 name: "OpenHands".to_string(),
57 description: "AI agent framework for software development".to_string(),
58 port: 8091,
59 protocol: "OpenAI API".to_string(),
60 endpoints: vec![
61 "POST /v1/chat/completions".to_string(),
62 "GET /v1/models".to_string(),
63 ],
64 auth_required: true,
65 },
66 }
67 }
68}
69