✨ feat(vscode): 代码阅读标出项目写明的入口文件和入口函数
This commit is contained in:
1 parent
78d5748b81
commit
718bbb7f6c
19 files changed
+761
-83
No files matched your search
@@ -1,10 +1,10 @@
|
||||
import { readFileSync } from 'node:fs'
|
||||
import * as path from 'node:path'
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { noteDecoration } from '../notes/noteItem'
|
||||
import { UNSTAGED_MARKER } from '../uncommitted/uncommittedFiles'
|
||||
import { COPY_COMMANDS } from './copyText'
|
||||
import { entryContext, GROUP_CONTEXT } from './fileEntries'
|
||||
import { rowDecoration } from './rowDecoration'
|
||||
|
||||
interface MenuItem { command?: string, submenu?: string, when: string, group?: string }
|
||||
interface Manifest {
|
||||
@@ -28,7 +28,7 @@ const root = entryContext({ isDirectory: true, isRoot: true })
|
||||
const unstaged = entryContext({ isDirectory: false, isRoot: false }, UNSTAGED_MARKER)
|
||||
const STAGE = 'superpowers.codeReader.stage'
|
||||
const ASK = 'superpowers.codeReader.askPath'
|
||||
const noted = (context: string): string => noteDecoration(context, 'x', '注释')!.contextValue
|
||||
const noted = (context: string): string => rowDecoration(context, 'x', '注释', undefined)!.contextValue
|
||||
|
||||
const orderOf = (item: MenuItem): number => Number(item.group?.split('@')[1] ?? 0)
|
||||
|
||||
|
||||
Reference in new issue
Block a user