Remove unused Codex protocol registries and session APIs
This commit is contained in:
@@ -19,8 +19,6 @@ var clientMethods = []string{
|
||||
"thread/start",
|
||||
"thread/resume",
|
||||
"thread/fork",
|
||||
"thread/read",
|
||||
"thread/compact/start",
|
||||
"turn/start",
|
||||
"turn/steer",
|
||||
"turn/interrupt",
|
||||
@@ -269,22 +267,11 @@ func (g *gen) generate(version string) []byte {
|
||||
}
|
||||
h.WriteString(")\n\n")
|
||||
|
||||
writeTable := func(name string, ms []method, field func(method) string) {
|
||||
fmt.Fprintf(&h, "var %s = map[string]func() any{\n", name)
|
||||
for _, m := range ms {
|
||||
t := field(m)
|
||||
if t == "" {
|
||||
fmt.Fprintf(&h, "Method%s: nil,\n", pascal(m.name))
|
||||
continue
|
||||
}
|
||||
fmt.Fprintf(&h, "Method%s: func() any { return &%s{} },\n", pascal(m.name), t)
|
||||
}
|
||||
h.WriteString("}\n\n")
|
||||
h.WriteString("var notificationMethods = map[string]struct{}{\n")
|
||||
for _, m := range notifications {
|
||||
fmt.Fprintf(&h, "Method%s: {},\n", pascal(m.name))
|
||||
}
|
||||
writeTable("clientResults", client, func(m method) string { return m.response })
|
||||
writeTable("notificationParams", notifications, func(m method) string { return m.params })
|
||||
writeTable("serverRequestParams", requests, func(m method) string { return m.params })
|
||||
writeTable("serverRequestResponses", requests, func(m method) string { return m.response })
|
||||
h.WriteString("}\n\n")
|
||||
|
||||
h.Write(g.consts.Bytes())
|
||||
h.Write(g.out.Bytes())
|
||||
|
||||
Reference in New Issue
Block a user