✨ feat(vscode): webhook 副作用按 assignee 门禁,适配多人协作
This commit is contained in:
1 parent
c20bd86370
commit
c370214d12
11 files changed
+450
-22
No files matched your search
@@ -71,6 +71,22 @@ export function injectIntoImplTerminal(panel: KanbanWebviewPanel, issueNumber: n
|
||||
return true
|
||||
}
|
||||
|
||||
/**
|
||||
* 本机是否开着该工单的存活终端(exitStatus undefined)——webhook 门禁对
|
||||
* 无 assignee 存量工单的兜底证据。不依赖 panel:看板关闭时实施终端
|
||||
* 仍活着,归属判定不能因此失明。前缀匹配策略与 injectIntoImplTerminal
|
||||
* 一致(shell OSC 会在名字后追加分支后缀)。
|
||||
*/
|
||||
export function hasLiveIssueSessionTerminal(
|
||||
issueNumber: number,
|
||||
kinds: readonly string[] = ['实施', '测试'],
|
||||
): boolean {
|
||||
const prefixes = kinds.map(k => `issue-${issueNumber}-${k}`)
|
||||
return window.terminals.some(t =>
|
||||
t.exitStatus === undefined && prefixes.some(p => t.name.startsWith(p)),
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Scan `vscode.window.terminals` for an existing terminal whose name
|
||||
* matches `expectedName`. Matches exact, or `startsWith(expectedName + ' ')`
|
||||
|
||||
Reference in new issue
Block a user