From 0b820594d94a113cb39b873d00201523564cdba8 Mon Sep 17 00:00:00 2001 From: xintaofei Date: Sat, 14 Mar 2026 21:25:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=90=88=E5=B9=B6=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E6=97=B6=E7=9A=84=E4=BB=A3=E7=A0=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/layout/branch-dropdown.tsx | 3 +-- src/components/merge/three-pane-merge-editor.tsx | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/components/layout/branch-dropdown.tsx b/src/components/layout/branch-dropdown.tsx index 0c07165..cc90d8a 100644 --- a/src/components/layout/branch-dropdown.tsx +++ b/src/components/layout/branch-dropdown.tsx @@ -361,7 +361,6 @@ export function BranchDropdown({ // Remote has new commits — auto-pull then retry push updateTask(taskId, { status: "running", - label: t("tasks.pullCode"), }) try { const pullResult = await gitPull(folderPath) @@ -371,7 +370,7 @@ export function BranchDropdown({ setConflictInfo(pullResult.conflict) } else { // Pull succeeded, retry push - updateTask(taskId, { status: "running", label }) + updateTask(taskId, { status: "running" }) const pushResult = await gitPush(folderPath) updateTask(taskId, { status: "completed" }) onBranchChange() diff --git a/src/components/merge/three-pane-merge-editor.tsx b/src/components/merge/three-pane-merge-editor.tsx index 3db6d27..e2eecc8 100644 --- a/src/components/merge/three-pane-merge-editor.tsx +++ b/src/components/merge/three-pane-merge-editor.tsx @@ -3,7 +3,7 @@ import { useCallback, useEffect, useMemo, useRef, useState } from "react" import dynamic from "next/dynamic" import type { OnMount } from "@monaco-editor/react" -import type { editor as MonacoEditorNs } from "monaco-editor" +import type { editor as MonacoEditorNs, IRange } from "monaco-editor" import { ArrowLeft, ArrowRight, CheckCheck } from "lucide-react" import { useTranslations } from "next-intl" import { defineMonacoThemes, useMonacoThemeSync } from "@/lib/monaco-themes" @@ -676,8 +676,6 @@ function ArrowGutter({ title, }: ArrowGutterProps) { const editor = editorRef.current - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const _tick = scrollTick // read to establish dependency const positioned = useMemo(() => { if (!editor) return [] @@ -729,7 +727,7 @@ function hunkToEditorRange( hunk: DiffHunk, allHunks: DiffHunk[], totalLines: number -): MonacoEditorNs.IRange | null { +): IRange | null { let offset = 0 for (const h of allHunks) { if (h.baseStart >= hunk.baseStart) break