MCPcopy Index your code
hub / github.com/anomalyco/opencode / handle

Method handle

packages/opencode/src/acp/permission.ts:37–49  ·  view source on GitHub ↗
(event: PermissionEvent)

Source from the content-addressed store, hash-verified

35 ) {}
36
37 handle(event: PermissionEvent) {
38 const permission = event.properties
39 const previous = this.queues.get(permission.sessionID) ?? Promise.resolve()
40 const next = previous
41 .then(() => this.process(event))
42 .catch(() => {})
43 .finally(() => {
44 if (this.queues.get(permission.sessionID) === next) {
45 this.queues.delete(permission.sessionID)
46 }
47 })
48 this.queues.set(permission.sessionID, next)
49 }
50
51 private async process(event: PermissionEvent) {
52 const permission = event.properties

Calls 4

processMethod · 0.95
getMethod · 0.65
deleteMethod · 0.45
setMethod · 0.45

Tested by 1

serveProbesFunction · 0.36