✨ feat(vscode): 有说明的函数、类卡片也能重写注释
重写按钮不再只挂在单独的注释卡片上。只替换说明那几行,上下文用这块代码,不当成文件顶上的说明。
This commit is contained in:
1 parent
b608f6cb87
commit
a66e4410e7
5 files changed
+46
-7
No files matched your search
@@ -291,7 +291,7 @@ function BlockCard({ block, tree }: { block: BlockView, tree: BlockTreeState }):
|
||||
asking={tree.qa?.state.open.includes(block.anchor)}
|
||||
onToggleAsk={tree.qa && (() => tree.qa?.onToggle(block.anchor))}
|
||||
rewriting={tree.rewrites.get(block.anchor)?.status === 'running'}
|
||||
onRewrite={block.kind === 'comment' ? () => tree.onRewriteComment(block.anchor) : undefined}
|
||||
onRewrite={block.commentStartLine !== undefined ? () => tree.onRewriteComment(block.anchor) : undefined}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user