cabi: 新增 CORE_INJECT_INPUT_SYNC(47) 同步注入桥(内部 SDK 4 参版取回复文本回传插件)

This commit is contained in:
root
2026-08-02 16:25:39 +08:00
parent b19eeca0cf
commit 3f252edf20
2 changed files with 8 additions and 0 deletions

View File

@ -84,4 +84,5 @@ const (
CoreSettingsDump = 44
CoreSettingsPlugins = 45
CoreRegisterInputCh = 46
CoreInjectInputSync = 47
)

View File

@ -359,6 +359,13 @@ func go_core_dispatch(methodID C.int, ctx unsafe.Pointer, s1, s2, s3 *C.char, i1
s.InjectTextNoMemory(a1, a2, a3)
return 0
case 47: // CORE_INJECT_INPUT_SYNC
if out := s.InjectInputSync(a1, a2, "text", map[string]interface{}{"content": a3}); out != nil {
reply, _ := out.Payload["content"].(string)
setResult(result, reply)
}
return 0
case 8: // CORE_SET_AUTO_RESTART
s.SetAutoRestart(n1 != 0)
return 0