add mcp
This commit is contained in:
@ -45,7 +45,7 @@ fn load_openai_api_key() -> Option<String> {
|
||||
pub fn ask_chat(c: &Context, question: &str) -> Option<String> {
|
||||
let config = ConfigPaths::new();
|
||||
let base_dir = config.base_dir.join("mcp");
|
||||
let script_path = base_dir.join("scripts/ask.py");
|
||||
let script_path = base_dir.join("ask");
|
||||
let user_path = config.base_dir.join("user.json");
|
||||
|
||||
let mut user = load_user_data(&user_path);
|
||||
@ -53,9 +53,9 @@ pub fn ask_chat(c: &Context, question: &str) -> Option<String> {
|
||||
|
||||
// Python 実行パス
|
||||
let python_path = if cfg!(target_os = "windows") {
|
||||
base_dir.join(".venv/Scripts/python.exe")
|
||||
base_dir.join(".venv/Scripts/mcp.exe")
|
||||
} else {
|
||||
base_dir.join(".venv/bin/python")
|
||||
base_dir.join(".venv/bin/mcp")
|
||||
};
|
||||
|
||||
// 各種オプション
|
||||
|
@ -32,6 +32,7 @@ pub fn mcp_setup() {
|
||||
"cli.py",
|
||||
"setup.py",
|
||||
"scripts/ask.py",
|
||||
"scripts/summarize.py",
|
||||
"scripts/context_loader.py",
|
||||
"scripts/prompt_template.py",
|
||||
];
|
||||
@ -76,6 +77,7 @@ pub fn mcp_setup() {
|
||||
let output = OtherCommand::new(&pip_path)
|
||||
.arg("install")
|
||||
.arg("openai")
|
||||
.arg("requests")
|
||||
.current_dir(&dest_dir)
|
||||
.output()
|
||||
.expect("pip install に失敗しました");
|
||||
|
Reference in New Issue
Block a user