修复警告和错误

This commit is contained in:
xintaofei
2026-03-21 19:29:29 +08:00
parent 94ca32f421
commit 048b8a8480
4 changed files with 5 additions and 2 deletions

View File

@@ -1309,6 +1309,7 @@ struct ForkExitInfo {
/// caller. We attach to the forked session (S2) directly using the /// caller. We attach to the forked session (S2) directly using the
/// `ForkSessionResponse` — no separate `session/load` is needed because S2 was /// `ForkSessionResponse` — no separate `session/load` is needed because S2 was
/// just created in-memory by the agent on this connection. /// just created in-memory by the agent on this connection.
#[allow(clippy::too_many_arguments)]
async fn handle_fork_or_exit( async fn handle_fork_or_exit(
loop_result: Result<Option<ForkExitInfo>, sacp::Error>, loop_result: Result<Option<ForkExitInfo>, sacp::Error>,
conn_id: &str, conn_id: &str,
@@ -1385,6 +1386,7 @@ async fn handle_fork_or_exit(
/// ///
/// Returns `Ok(None)` on normal exit (disconnect / channel closed) or /// Returns `Ok(None)` on normal exit (disconnect / channel closed) or
/// `Ok(Some(ForkExitInfo))` when the loop should be restarted on a forked session. /// `Ok(Some(ForkExitInfo))` when the loop should be restarted on a forked session.
#[allow(clippy::too_many_arguments)]
async fn run_conversation_loop<'a>( async fn run_conversation_loop<'a>(
session: &mut sacp::ActiveSession<'a, Agent>, session: &mut sacp::ActiveSession<'a, Agent>,
conn_id: &str, conn_id: &str,

View File

@@ -75,6 +75,7 @@ function AccountRow({
return ( return (
<div className="flex items-center gap-3 rounded-lg border bg-muted/10 px-3 py-2.5"> <div className="flex items-center gap-3 rounded-lg border bg-muted/10 px-3 py-2.5">
{account.avatar_url ? ( {account.avatar_url ? (
// eslint-disable-next-line @next/next/no-img-element
<img <img
src={account.avatar_url} src={account.avatar_url}
alt={account.username} alt={account.username}

View File

@@ -1561,7 +1561,7 @@ export function AcpConnectionsProvider({ children }: { children: ReactNode }) {
const title = fn ? `${fn} - Codeg` : "Codeg" const title = fn ? `${fn} - Codeg` : "Codeg"
notifyTurnComplete( notifyTurnComplete(
title, title,
t("notificationTurnComplete", { agent: agentLabel }), t("notificationTurnComplete", { agent: agentLabel })
).catch(() => {}) ).catch(() => {})
} }
} }

View File

@@ -2,7 +2,7 @@ import { invoke } from "@tauri-apps/api/core"
export async function notifyTurnComplete( export async function notifyTurnComplete(
title: string, title: string,
body: string, body: string
): Promise<void> { ): Promise<void> {
if (!document.hidden) return if (!document.hidden) return
await invoke("send_notification", { title, body }) await invoke("send_notification", { title, body })