mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-09-22 01:48:11 +00:00
cabi: 新增 CORE_INJECT_INPUT_SYNC(47) 同步注入桥(内部 SDK 4 参版取回复文本回传插件)
This commit is contained in:
@ -84,4 +84,5 @@ const (
|
||||
CoreSettingsDump = 44
|
||||
CoreSettingsPlugins = 45
|
||||
CoreRegisterInputCh = 46
|
||||
CoreInjectInputSync = 47
|
||||
)
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user