✨ feat(vscode): 注释卡片可按规范重写注释
This commit is contained in:
1 parent
724c81188c
commit
299acb979f
11 files changed
+717
-5
No files matched your search
@@ -37,6 +37,9 @@ export interface BlockTreeState {
|
||||
onToggleFold: (id: string) => void
|
||||
/** 一次记下几块、几行折叠还是展开(点子行展开一块、同一行里别的收起) */
|
||||
onSetFolds: (folds: Record<string, boolean>) => void
|
||||
/** 正在按注释规范重写的注释块(记号) */
|
||||
rewriting: ReadonlySet<string>
|
||||
onRewriteComment: (anchor: string) => void
|
||||
/** 问 AI;文件不在工作区文件夹里(问答没地方存)时没有 */
|
||||
qa?: QaTree
|
||||
/** 代码差异:新增、修改的块和删掉的块;侧栏开着「未提交的更改」或审查工单、基准里有这个文件时才有 */
|
||||
@@ -276,6 +279,8 @@ function BlockCard({ block, tree }: { block: BlockView, tree: BlockTreeState }):
|
||||
onToggleEdit={() => tree.onToggleEdit(block.id)}
|
||||
asking={tree.qa?.state.open.includes(block.anchor)}
|
||||
onToggleAsk={tree.qa && (() => tree.qa?.onToggle(block.anchor))}
|
||||
rewriting={tree.rewriting.has(block.anchor)}
|
||||
onRewrite={block.kind === 'comment' ? () => tree.onRewriteComment(block.anchor) : undefined}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user