Skip to content

Commit e1ff05e

Browse files
author
smallstone
committed
Fix user input handling in ChatStore and ideaBridge
This commit fixes the user input handling in the ChatStore and ideaBridge files. It ensures that the user input is correctly passed to the JSJavaBridge and that the appropriate action is taken.
1 parent 46aca68 commit e1ff05e

3 files changed

Lines changed: 328 additions & 270 deletions

File tree

src/util/ideaBridge.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,20 @@ const JStoIdea = {
240240
},
241241
};
242242

243+
window.JSJavaBridge.callJava(JSON.stringify(params));
244+
},
245+
userInput: (message) => {
246+
const params = {
247+
action: "userInput/request",
248+
metadata: {
249+
callback: "IdeaToJSMessage",
250+
},
251+
payload: {
252+
data: message?.text || "",
253+
},
254+
};
255+
console.log("userInput params: ", params);
256+
243257
window.JSJavaBridge.callJava(JSON.stringify(params));
244258
},
245259
};
@@ -498,6 +512,9 @@ class IdeaBridge {
498512
case "openLink":
499513
JStoIdea.openLink(message);
500514
break;
515+
case "userInput":
516+
JStoIdea.userInput(message);
517+
break;
501518
default:
502519
break;
503520
}

0 commit comments

Comments
 (0)