✨ feat(vscode): 会话 tab 可交接对话给同事
This commit is contained in:
@@ -225,6 +225,35 @@ func fetchPRStatus(ctx context.Context, client GiteaClient, owner, repo, prStr s
|
||||
// LoadIssues loads all issues assigned to or created by the current user,
|
||||
// resolves state from comment blobs, and enriches with live PR and dependency
|
||||
// data (skipped for done-column issues).
|
||||
const mailboxTitle = "spx-session-mailbox"
|
||||
const mailboxLabel = "spx-session-mailbox"
|
||||
const mailboxMarker = "<!-- spx:session-mailbox -->"
|
||||
|
||||
func isMailboxIssue(iss gitea.Issue) bool {
|
||||
if iss.Title == mailboxTitle {
|
||||
return true
|
||||
}
|
||||
if strings.Contains(iss.Body, mailboxMarker) {
|
||||
return true
|
||||
}
|
||||
for _, l := range iss.Labels {
|
||||
if l.Name == mailboxLabel {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func filterMailboxIssues(issues []gitea.Issue) []gitea.Issue {
|
||||
out := issues[:0]
|
||||
for _, iss := range issues {
|
||||
if !isMailboxIssue(iss) {
|
||||
out = append(out, iss)
|
||||
}
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
func LoadIssues(ctx context.Context, client GiteaClient, owner, repo, workspaceRoot string) ([]Issue, error) {
|
||||
// Kick off user + repo-wide comments in parallel.
|
||||
userCh := make(chan *gitea.User, 1)
|
||||
@@ -291,6 +320,7 @@ func LoadIssues(ctx context.Context, client GiteaClient, owner, repo, workspaceR
|
||||
}
|
||||
|
||||
issues := mergeIssues(assigned, created)
|
||||
issues = filterMailboxIssues(issues)
|
||||
buckets := groupComments(allComments)
|
||||
|
||||
// Pre-compute columns to decide which issues need live PR/deps queries.
|
||||
|
||||
Reference in New Issue
Block a user