✨ feat(vscode): 代码阅读的调用与构造:跨多行写的调用排成「新建 / 调用 名字 · N 个参数」一行,实参摊成参数 / 值表;Python 查被调用名字的定义分新建和调用,查到后刷新

This commit is contained in:
cruldra committed 2026-09-27 22:08:16 +08:00
1 parent ebf228cdc7
commit ecc415d763
30 files changed
+1033 -157

No files matched your search

@@ -0,0 +1,37 @@
import { window } from 'vscode'
import { DefinitionSources } from './definitionSources'
export async function removeWorktree(panel: Panel, relPath: string, issueNumber: number): Promise<void> {
const state = await panel.readIssueState(issueNumber)
const branch = typeof state.branch === 'string' ? state.branch : ''
const choice = await window.showWarningMessage(
branch ? `确认删除 worktree ${relPath} 及其分支 ${branch}?` : `确认删除 worktree ${relPath}?`,
{ modal: true },
'删除',
)
if (choice !== '删除')
return
}
class Preview {
constructor(document: TextDocument, owner: Owner) {
this.definitions = new DefinitionSources({
rule: async reference => ruleDefinitions(await owner.resolveReference(reference)),
language: offset => languageDefinitions(document.uri, document.positionAt(offset)),
})
}
}
export function commentsUrl(opts: Options): URL {
const url = new URL(
`${baseUrl(opts.host)}/repos/${opts.owner}/${opts.repo}/issues/${opts.index}/comments`,
)
return url
}
export function merged(base: string[], extra: string[]): string[] {
return concatAll(
base,
...extra,
)
}