Skip to content

Commit 9c0d09c

Browse files
authored
refactor: clean up cortex (#6003)
* refactor: clean up cortex * chore: clean up * refactor: clean up
1 parent 9573329 commit 9c0d09c

File tree

13 files changed

+2
-147
lines changed

13 files changed

+2
-147
lines changed
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
declare const NODE: string
22
declare const VERSION: string
3-
declare const CORTEX_API_URL: string

extensions/conversational-extension/rolldown.config.mjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,5 @@ export default defineConfig({
77
file: 'dist/index.js',
88
},
99
platform: 'browser',
10-
define: {
11-
API_URL: JSON.stringify(`http://127.0.0.1:${process.env.CORTEX_API_PORT ?? "39291"}`),
12-
},
10+
define: {},
1311
})

extensions/conversational-extension/src/@types/global.d.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
declare const API_URL: string
2-
31
interface Core {
42
api: APIFunctions
53
events: EventEmitter

src-tauri/src/core/mcp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ async fn monitor_mcp_server_handle(
260260
}
261261
}
262262

263-
/// Starts an MCP server with restart monitoring (similar to cortex restart)
263+
/// Starts an MCP server with restart monitoring
264264
/// Returns the result of the first start attempt, then continues with restart monitoring
265265
async fn start_mcp_server_with_restart<R: Runtime>(
266266
app: AppHandle<R>,

src-tauri/src/lib.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use core::{
66
state::{generate_app_token, AppState},
77
utils::download::DownloadManagerState,
88
};
9-
use reqwest::Client;
109
use std::{collections::HashMap, sync::Arc};
1110
use tauri::{Emitter, Manager, RunEvent};
1211
use tokio::sync::Mutex;
@@ -143,10 +142,6 @@ pub fn run() {
143142
cleanup_processes(state).await;
144143
});
145144
}
146-
147-
let client = Client::new();
148-
let url = "http://127.0.0.1:39291/processManager/destroy";
149-
let _ = client.delete(url).send();
150145
}
151146
_ => {}
152147
})
@@ -171,15 +166,6 @@ pub fn run() {
171166

172167
// Quick cleanup with shorter timeout
173168
cleanup_processes(state).await;
174-
175-
// Stop HTTP server with shorter timeout
176-
let client = Client::new();
177-
let url = "http://127.0.0.1:39291/processManager/destroy";
178-
let _ = tokio::time::timeout(
179-
tokio::time::Duration::from_secs(2),
180-
client.delete(url).send(),
181-
)
182-
.await;
183169
});
184170
});
185171
}

web-app/src/containers/dialogs/CortexFailureDialog.tsx

Lines changed: 0 additions & 88 deletions
This file was deleted.

web-app/src/locales/de-DE/common.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -257,11 +257,5 @@
257257
"title": "Download abgebrochen",
258258
"description": "Der Download-Prozess wurde abgebrochen"
259259
}
260-
},
261-
"cortexFailureDialog": {
262-
"title": "Problem mit der lokalen KI-Engine",
263-
"description": "Die Lokale KI-Engine (Cortex) konnte nach mehreren Versuchen nicht gestartet werden. Dies verhindert möglicherweise die korrekte Ausführung diverser Funktionalitäten.",
264-
"contactSupport": "Support kontaktieren",
265-
"restartJan": "Jan neu starten"
266260
}
267261
}

web-app/src/locales/en/common.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,5 @@
258258
"title": "Download Cancelled",
259259
"description": "The download process was cancelled"
260260
}
261-
},
262-
"cortexFailureDialog": {
263-
"title": "Local AI Engine Issue",
264-
"description": "The local AI engine (Cortex) failed to start after multiple attempts. This might prevent some features from working correctly.",
265-
"contactSupport": "Contact Support",
266-
"restartJan": "Restart Jan"
267261
}
268262
}

web-app/src/locales/id/common.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,5 @@
250250
"title": "Unduhan Dibatalkan",
251251
"description": "Proses unduhan telah dibatalkan"
252252
}
253-
},
254-
"cortexFailureDialog": {
255-
"title": "Cortex gagal dimulai",
256-
"description": "Cortex gagal dimulai. Silakan periksa log untuk detail lebih lanjut.",
257-
"contactSupport": "Hubungi Dukungan",
258-
"restartJan": "Restart Jan"
259253
}
260254
}

web-app/src/locales/vn/common.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,5 @@
250250
"title": "Đã hủy tải xuống",
251251
"description": "Quá trình tải xuống đã bị hủy"
252252
}
253-
},
254-
"cortexFailureDialog": {
255-
"title": "Cortex không khởi động được",
256-
"description": "Cortex không khởi động được. Vui lòng kiểm tra log để biết thêm chi tiết.",
257-
"contactSupport": "Liên hệ Hỗ trợ",
258-
"restartJan": "Khởi động lại Jan"
259253
}
260254
}

0 commit comments

Comments
 (0)