✨ feat(vscode): 「未提交的更改」分暂存区两组、单文件暂存、隐藏测试文件
- 照源代码管理视图分「暂存的更改」「更改」两组(空的不摆,分组行写文件数),部分暂存的文件两组都有 - 「更改」组的文件行上加「暂存」按钮,走 git 扩展的 repository.add - 标题栏「隐藏测试文件 / 显示测试文件」开关,按工作区记住,藏了几个写在标题后面;测试文件的判断集中在 isTestFile - 以上只在「未提交的更改」里有:普通文件树、审查模式的行和菜单不变
This commit is contained in:
1 parent
a3b04a443b
commit
87d4360704
14 files changed
+528
-129
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import type { ExtensionContext, Uri } from 'vscode'
|
||||
import type { CodeReaderApi, RuleLocation, RuleReference } from './contract'
|
||||
import type { FileNode } from './explorer/fileTree'
|
||||
import type { IndexedName } from './nameResolution'
|
||||
import { commands, window, workspace } from 'vscode'
|
||||
import { logger } from '../logging/logger'
|
||||
@@ -110,6 +111,10 @@ export function registerCodeReader(context: ExtensionContext): CodeReaderApi {
|
||||
commands.registerCommand('superpowers.codeReader.refresh', () => filters.active ? filters.active.reload() : files.refresh()),
|
||||
commands.registerCommand('superpowers.codeReader.pickReviewIssue', () => review.pick()),
|
||||
commands.registerCommand('superpowers.codeReader.showUncommitted', () => uncommitted.enter()),
|
||||
commands.registerCommand('superpowers.codeReader.hideTests', () => uncommitted.setTestsHidden(true)),
|
||||
commands.registerCommand('superpowers.codeReader.showTests', () => uncommitted.setTestsHidden(false)),
|
||||
// 「更改」组文件行上的按钮传来的是这一行的节点
|
||||
commands.registerCommand('superpowers.codeReader.stage', (node?: FileNode) => uncommitted.stage(node)),
|
||||
commands.registerCommand('superpowers.codeReader.showAllFiles', () => filters.active?.exit()),
|
||||
commands.registerCommand(OPEN_COMMAND, (uri: Uri) => openFile(uri, registry)),
|
||||
// 标题栏按钮传来的是 (文件 Uri, { groupId }),原样转给 VS Code 定位是哪一组的哪个标签
|
||||
|
||||
Reference in new issue
Block a user