chore: pre-release cleanup — remove debug logs, fix clippy warning, add missing ja translations, and format code

- Remove 2 console.log statements from DeepLinkImportDialog
- Fix clippy unnecessary_map_or: use is_some_and in live.rs
- Add 17 missing Japanese i18n keys (skills, proxy, circuitBreaker, universalProvider)
- Run prettier and cargo fmt to fix pre-existing formatting drift
This commit is contained in:
Jason
2026-02-26 15:11:13 +08:00
parent 434392a669
commit 2b30819510
10 changed files with 42 additions and 49 deletions
+1 -1
View File
@@ -357,7 +357,7 @@ fn json_merge_patch(target: &mut Value, patch: &Value) {
let entry = target_obj.entry(key.clone()).or_insert(json!({}));
json_merge_patch(entry, value);
// Clean up empty container objects
if entry.as_object().map_or(false, |o| o.is_empty()) {
if entry.as_object().is_some_and(|o| o.is_empty()) {
target_obj.remove(key);
}
} else {
@@ -16,10 +16,8 @@ use super::utils::{
const PROVIDER_ID: &str = "codex";
static UUID_RE: LazyLock<Regex> = LazyLock::new(|| {
Regex::new(
r"[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}",
)
.unwrap()
Regex::new(r"[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}")
.unwrap()
});
pub fn scan_sessions() -> Vec<SessionMeta> {
@@ -132,13 +130,10 @@ fn parse_session(path: &Path) -> Option<SessionMeta> {
if last_active_at.is_none() {
last_active_at = value.get("timestamp").and_then(parse_timestamp_to_ms);
}
if summary.is_none()
&& value.get("type").and_then(Value::as_str) == Some("response_item")
{
if summary.is_none() && value.get("type").and_then(Value::as_str) == Some("response_item") {
if let Some(payload) = value.get("payload") {
if payload.get("type").and_then(Value::as_str) == Some("message") {
let text =
payload.get("content").map(extract_text).unwrap_or_default();
let text = payload.get("content").map(extract_text).unwrap_or_default();
if !text.trim().is_empty() {
summary = Some(text);
}
@@ -27,11 +27,7 @@ pub fn read_head_tail_lines(
// Read head lines from the beginning
let reader = BufReader::new(file);
let head: Vec<String> = reader
.lines()
.take(head_n)
.map_while(Result::ok)
.collect();
let head: Vec<String> = reader.lines().take(head_n).map_while(Result::ok).collect();
// Seek to last ~16 KB for tail lines
let seek_pos = file_len.saturating_sub(16_384);