mirror of
https://github.com/github/awesome-copilot.git
synced 2026-09-07 08:15:58 +00:00
chore: publish from main
This commit is contained in:
@@ -108,11 +108,13 @@ export function startServer({ port = 0, onRefresh, onAction, onWorkSelected, onR
|
||||
periods: PERIODS,
|
||||
projects: state.getProjects(),
|
||||
projectsOrg: state.getProjectsOrg(),
|
||||
projectsComplete: state.getProjectsComplete(),
|
||||
connections: state.getConnections(),
|
||||
prTargets: state.getPrTargets(),
|
||||
availableModels: state.getAvailableModels(),
|
||||
prSettingsOpen: state.getPrSettingsOpen(),
|
||||
plainEnglishView: state.getPlainEnglishView(),
|
||||
plainEnglishEnriching: state.getPlainEnglishEnriching(),
|
||||
issueTrackers: state.getIssueTrackers(),
|
||||
selectedTracker: state.getSelectedTracker(),
|
||||
workByIssueKey: state.getWorkByIssueKey(),
|
||||
@@ -153,6 +155,15 @@ export function startServer({ port = 0, onRefresh, onAction, onWorkSelected, onR
|
||||
}
|
||||
}
|
||||
|
||||
// Broadcast plain-English enrichment start/stop so the client can disable the
|
||||
// toggle (and show a "preparing…" hint) until summaries are ready.
|
||||
function notifyPlainEnglishEnriching(isEnriching) {
|
||||
const data = JSON.stringify({ plainEnglishEnriching: Boolean(isEnriching) })
|
||||
for (const res of sseClients) {
|
||||
res.write(`data: ${data}\n\n`)
|
||||
}
|
||||
}
|
||||
|
||||
function handleRequest(req, res) {
|
||||
// Reject DNS-rebinding hosts on EVERY request (see the trust-model comment):
|
||||
// a rebinding page still carries its own hostname in `Host`, so anything but
|
||||
@@ -546,6 +557,7 @@ export function startServer({ port = 0, onRefresh, onAction, onWorkSelected, onR
|
||||
notifyWork,
|
||||
notifyFlash,
|
||||
notifyScanning,
|
||||
notifyPlainEnglishEnriching,
|
||||
close,
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user