🎨 style(vscode): eslint 自动修复格式与排序

Claude-Session: https://claude.ai/code/session_01HTMgwaE3woqM5yvsHiuSAa
This commit is contained in:
cruldra committed 2026-08-31 22:30:42 +08:00
1 parent df35bcfd49
commit 8c22a29ce5
41 files changed
+248 -167

No files matched your search

@@ -1,18 +1,20 @@
import type { Ref } from 'react'
import { forwardRef } from 'react'
import type { Issue } from '../types'
import { useSortable } from '@dnd-kit/sortable'
import { CSS } from '@dnd-kit/utilities'
import { Lock } from 'lucide-react'
import { forwardRef } from 'react'
import { cn } from '@/lib/utils'
import { Card } from './ui/card'
import type { Issue } from '../types'
interface IssueCardProps {
issue: Issue
selected?: boolean
onSelect?: (id: string) => void
/** Visual nesting level for prerequisite-chain rendering in the todo column.
* Each level adds 16px of left margin. Defaults to 0 (flat). */
/**
* Visual nesting level for prerequisite-chain rendering in the todo column.
* Each level adds 16px of left margin. Defaults to 0 (flat).
*/
depth?: number
/** 锁定态:前置工单尚未完成。显示锁图标 + tooltip。 */
locked?: boolean
@@ -1,11 +1,11 @@
import type { ReactNode } from 'react'
import { useMemo, useRef } from 'react'
import { ArrowRightLeft, CircleSlash, Download, ExternalLink, GitMerge, Loader2, Play, RotateCcw, Terminal, Trash2, X } from 'lucide-react'
import type { ClaudeProfile } from '../hooks/useIssues'
import type { Issue, IssueColumn } from '../types'
import { COLUMN_LABELS, COLUMN_ORDER } from '../types'
import { isIssueLocked } from '../lib/dependencies'
import type { PropertyGroup } from './property-grid'
import { ArrowRightLeft, CircleSlash, Download, ExternalLink, GitMerge, Loader2, Play, RotateCcw, Terminal, Trash2, X } from 'lucide-react'
import { useMemo, useRef } from 'react'
import { isIssueLocked } from '../lib/dependencies'
import { COLUMN_LABELS, COLUMN_ORDER } from '../types'
import { PropertyGrid } from './property-grid'
/** 跨机绝对路径只比 basename(同名 .json)映射到本机 profiles 列表。 */
@@ -37,14 +37,20 @@ interface IssueDetailPanelProps {
globalAutoReview: boolean
onOpenInBrowser: (url: string) => void
onResumeSession: (sessionId: string, profilePath?: string, cwd?: string, issueNumber?: number) => void
/** Open a new terminal that runs `codex resume <id>` for the auto-review
* conversation associated with this issue. */
/**
* Open a new terminal that runs `codex resume <id>` for the auto-review
* conversation associated with this issue.
*/
onResumeReviewSession: (sessionId: string, issueNumber: number, cwd?: string) => void
/** Open a new terminal that runs `claude --resume <id>` for the test
* conversation associated with this issue. */
/**
* Open a new terminal that runs `claude --resume <id>` for the test
* conversation associated with this issue.
*/
onResumeTestSession: (sessionId: string, issueNumber: number, cwd?: string) => void
/** Spawn a fresh "测试" cc tab for an issue whose PR has merged. Bound to the
* Play button next to the "测试会话 id" row (only shown when `issue.pr` exists). */
/**
* Spawn a fresh "测试" cc tab for an issue whose PR has merged. Bound to the
* Play button next to the "测试会话 id" row (only shown when `issue.pr` exists).
*/
onStartTestSession: (issueNumber: number) => void
/** Open a workspace-relative file in the editor. */
onOpenFile: (path: string) => void
@@ -60,23 +66,31 @@ interface IssueDetailPanelProps {
onOpenWorktree: (path: string) => void
/** Delete the worktree (`git worktree remove`) and clear it from state. */
onDeleteWorktree: (issueNumber: number, path: string) => void
/** Pre-merge the issue's feature branch into the main worktree's current branch
* (`git merge --no-commit --no-ff <branch>`) so the user can inspect locally. */
/**
* Pre-merge the issue's feature branch into the main worktree's current branch
* (`git merge --no-commit --no-ff <branch>`) so the user can inspect locally.
*/
onMergeBranch: (issueNumber: number, branch: string) => void
/** 硬删整个工单 + 关联资源(worktree / PR / feature branch / cc tabs)。
* 顶部垃圾桶按钮触发,扩展端做 modal confirm,可选。 */
/**
* 硬删整个工单 + 关联资源(worktree / PR / feature branch / cc tabs)。
* 顶部垃圾桶按钮触发,扩展端做 modal confirm,可选。
*/
onDeleteIssue?: (issueNumber: number) => void
/** 关闭 Gitea 工单,不清理本地会话、worktree、PR 或分支。 */
onCloseIssue: (issueNumber: number) => void
/** 将实施中 / 审查中的工单重置回待办(清 worktree / 未合并 PR / feature 分支)。 */
onResetToTodo: (issueNumber: number) => void
/** Close the matching session terminal tab. The extension watches
/**
* Close the matching session terminal tab. The extension watches
* onDidCloseTerminal and clears the corresponding `*TabOpen` flag, which
* makes the X button vanish on its own. */
* makes the X button vanish on its own.
*/
onCloseSessionTab: (issueNumber: number, kind: 'brainstorm' | 'implement' | 'review' | 'test') => void
/** Spawn a fresh "规划" cc tab for an issue whose sessionId is still empty
/**
* Spawn a fresh "规划" cc tab for an issue whose sessionId is still empty
* (created out-of-band via spx without webhook linking). Bound to the Play
* button next to the "头脑风暴会话 id" row. */
* button next to the "头脑风暴会话 id" row.
*/
onStartBrainstormSession: (issueNumber: number) => void
/** Persist a per-issue `autoReview` override into the state JSON. */
onUpdateAutoReview: (issueNumber: number, value: boolean) => void
@@ -649,7 +663,11 @@ export function IssueDetailPanel({
{issue.source === 'youtrack' && issue.attachments && issue.attachments.length > 0 && (
<div className="flex flex-col gap-1 text-xs">
<span className="opacity-60">附件({issue.attachments.length})</span>
<span className="opacity-60">
附件(
{issue.attachments.length}
)
</span>
<div className="flex flex-wrap gap-2">
{issue.attachments.map(att => (
<button
@@ -1,10 +1,10 @@
import type { ReactNode } from 'react'
import type { Issue, IssueColumn } from '../types'
import { useDroppable } from '@dnd-kit/core'
import { Plus } from 'lucide-react'
import { cn } from '@/lib/utils'
import { Badge } from './ui/badge'
import type { Issue, IssueColumn } from '../types'
import { COLUMN_LABELS } from '../types'
import { Badge } from './ui/badge'
interface KanbanColumnProps {
column: IssueColumn
@@ -12,9 +12,9 @@
*/
import type { ReactElement } from 'react'
import { useEffect, useLayoutEffect, useRef, useState } from 'react'
import { Copy, Trash2, X } from 'lucide-react'
import type { LogEntry } from '../lib/messages'
import { Copy, Trash2, X } from 'lucide-react'
import { useEffect, useLayoutEffect, useRef, useState } from 'react'
export interface LogModalProps {
open: boolean
@@ -1,5 +1,5 @@
import { useCallback, useEffect, useRef, useState } from 'react'
import { X } from 'lucide-react'
import { useCallback, useEffect, useRef, useState } from 'react'
import { getPastedImageFiles, readClipboardImages } from '../lib/imagePaste'
export interface PastedImage {
@@ -13,8 +13,8 @@
import type { PastedImage } from '../lib/imagePaste'
import { X } from 'lucide-react'
import { useEffect, useRef, useState } from 'react'
import { getPastedImageFiles, readClipboardImages } from '../lib/imagePaste'
import { useProfileAssets } from '../hooks/useProfileAssets'
import { getPastedImageFiles, readClipboardImages } from '../lib/imagePaste'
interface Props {
keyLabel: string
@@ -1,5 +1,5 @@
import { useEffect } from 'react'
import { CheckCircle2, Loader2, X, XCircle } from 'lucide-react'
import { useEffect } from 'react'
export interface ToastItem {
id: string
@@ -55,7 +55,7 @@ export function statusColorVar(status: string): string {
/** PR diff 里跳过测试代码:路径任一段为 `tests` 即视为忽略(匹配 `tests/…` 或 `…/tests/…`)。 */
export function isIgnoredPath(path: string): boolean {
return path.split('/').some(seg => seg === 'tests')
return path.split('/').includes('tests')
}
/**
@@ -29,18 +29,18 @@ import { SelectMenu } from './ui/select-menu'
// --- 类型定义 ---
/** 字段类型枚举 */
export type FieldType =
| 'string'
| 'multiline'
| 'number'
| 'boolean'
| 'select'
| 'color'
| 'theme-color'
| 'password'
| 'action'
| 'file-link'
| 'pr-link'
export type FieldType
= | 'string'
| 'multiline'
| 'number'
| 'boolean'
| 'select'
| 'color'
| 'theme-color'
| 'password'
| 'action'
| 'file-link'
| 'pr-link'
/** 属性定义 */
export interface PropertyDef {
@@ -1,4 +1,5 @@
import { cva, type VariantProps } from 'class-variance-authority'
import type { VariantProps } from 'class-variance-authority'
import { cva } from 'class-variance-authority'
import * as React from 'react'
import { cn } from '@/lib/utils'