mirror of
https://wget.la/https://github.com/leookun/cursor-byok
synced 2026-10-06 05:12:03 +08:00
feat: enhance desktop application startup diagnostics and logging
- Introduced a new `startup` module to capture and manage startup diagnostics. - Implemented logging functionality with daily rotation and error reporting for application startup failures. - Updated the main application run function to return an exit code based on startup success or failure. - Added new dependencies for logging and diagnostics in `Cargo.toml`. - Increased request timeout in the control service for improved stability. - Expanded maximum search results in the federation module for better search capabilities.
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
<!-- Defines stable Cursor prompt content embedded by the server. -->
|
||||
You are an AI coding assistant, powered by {{FAKE_MODEL_NAME}}. You operate in Cursor.
|
||||
|
||||
Your main goal is to follow the USER's instructions, which are denoted by the <user_query> tag.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<!-- Defines stable Cursor prompt content embedded by the server. -->
|
||||
{{OPEN_FILES}}{{SELECTED_CONTEXT}}{{ACTION_CONTEXT}}<system_reminder>
|
||||
You are now in Agent mode. You have EXITED your previous mode. Continue with the task in the new mode.
|
||||
</system_reminder>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<!-- Defines stable Cursor prompt content embedded by the server. -->
|
||||
You are an AI coding assistant, powered by {{FAKE_MODEL_NAME}}. You operate in Cursor.
|
||||
|
||||
Your main goal is to follow the USER's instructions, which are denoted by the <user_query> tag.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<!-- Defines stable Cursor prompt content embedded by the server. -->
|
||||
{{OPEN_FILES}}{{SELECTED_CONTEXT}}{{ACTION_CONTEXT}}<system_reminder>
|
||||
You are now in Ask mode. You have EXITED your previous mode. Continue with the task in the new mode.
|
||||
</system_reminder>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<!-- Defines stable Cursor prompt content embedded by the server. -->
|
||||
You are compacting conversation history for future model turns.
|
||||
Produce a concise plain-text summary that preserves durable context: user goals, constraints, facts, decisions, files, commands, errors, tool outcomes, and pending follow-ups.
|
||||
Do not address the user. Do not mention compaction, summarization, or token limits.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<!-- Defines stable Cursor prompt content embedded by the server. -->
|
||||
{{OPEN_FILES}}{{SELECTED_CONTEXT}}{{ACTION_CONTEXT}}<timestamp>{{TIMESTAMP}}</timestamp>
|
||||
<user_query>
|
||||
{{USER_QUERY}}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<!-- Defines stable Cursor prompt content embedded by the server. -->
|
||||
You are an AI coding assistant, powered by {{FAKE_MODEL_NAME}}. You operate in Cursor.
|
||||
|
||||
Your main goal is to follow the USER's instructions, which are denoted by the <user_query> tag.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<!-- Defines stable Cursor prompt content embedded by the server. -->
|
||||
{{OPEN_FILES}}{{SELECTED_CONTEXT}}{{ACTION_CONTEXT}}<system_reminder>
|
||||
You are now in Debug mode. You have EXITED your previous mode. Continue with the task in the new mode.
|
||||
</system_reminder>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<!-- Defines stable Cursor prompt content embedded by the server. -->
|
||||
You are an AI coding assistant, powered by Cursor {{FAKE_MODEL_NAME}}. You operate in Cursor.
|
||||
|
||||
Your main goal is to follow the USER's instructions, which are denoted by the <user_query> tag.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<!-- Defines stable Cursor prompt content embedded by the server. -->
|
||||
{{OPEN_FILES}}{{SELECTED_CONTEXT}}{{ACTION_CONTEXT}}<system_reminder>
|
||||
You are now in Multitask mode. You have EXITED your previous mode. Continue with the task in the new mode.
|
||||
</system_reminder>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<!-- Defines stable Cursor prompt content embedded by the server. -->
|
||||
You are an AI coding assistant, powered by {{FAKE_MODEL_NAME}}. You operate in Cursor.
|
||||
|
||||
Your main goal is to follow the USER's instructions, which are denoted by the <user_query> tag.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<!-- Defines stable Cursor prompt content embedded by the server. -->
|
||||
{{OPEN_FILES}}{{SELECTED_CONTEXT}}{{ACTION_CONTEXT}}<system_reminder>
|
||||
You are now in Plan mode. You have EXITED your previous mode. Continue with the task in the new mode.
|
||||
</system_reminder>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<!-- Defines stable Cursor prompt content embedded by the server. -->
|
||||
You are an AI coding assistant, powered by {{FAKE_MODEL_NAME}}. You operate in Cursor.
|
||||
|
||||
Your main goal is to follow the USER's instructions, which are denoted by the <user_query> tag.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<!-- Defines stable Cursor prompt content embedded by the server. -->
|
||||
{{OPEN_FILES}}{{SELECTED_CONTEXT}}{{ACTION_CONTEXT}}<system_reminder>
|
||||
You are currently working inside a Task subagent. Your parent agent has delegated a clearly bounded assignment to you. Complete that assignment directly with the tools available in this session. The Task tool is unavailable inside subagents, so delegation cannot be nested.
|
||||
</system_reminder>
|
||||
|
||||
@@ -169,7 +169,7 @@ impl ControlService {
|
||||
.header(OS_HEADER, std::env::consts::OS)
|
||||
.header(APP_VERSION_HEADER, env!("CARGO_PKG_VERSION"))
|
||||
.header(LANGUAGE_HEADER, language)
|
||||
.timeout(std::time::Duration::from_secs(5));
|
||||
.timeout(std::time::Duration::from_secs(60));
|
||||
if let Some(disabled_ad_ids) = disabled_ad_ids.filter(|value| !value.is_empty()) {
|
||||
request = request.header(DISABLED_AD_IDS_HEADER, disabled_ad_ids);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ use crate::store::Store;
|
||||
use super::{catalog, SearchEngine, SearchHit};
|
||||
|
||||
const RRF_K: f64 = 60.0;
|
||||
const MAX_RESULTS: usize = 10;
|
||||
const MAX_RESULTS: usize = 30;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct WebSearch {
|
||||
|
||||
@@ -28,7 +28,9 @@ impl Store {
|
||||
.max_connections(8)
|
||||
.connect_with(options)
|
||||
.await?;
|
||||
tracing::info!("running database migrations");
|
||||
sqlx::migrate!("./migrations").run(&pool).await?;
|
||||
tracing::info!("database migrations completed");
|
||||
Ok(Self {
|
||||
pool,
|
||||
writes: WriteCoordinator::default(),
|
||||
|
||||
Reference in New Issue
Block a user