Skip to content

Conversation

@ecoArcGaming
Copy link
Collaborator

@ecoArcGaming ecoArcGaming commented Jul 10, 2025

This PR implements BridgeTools that pass the parameters back to TypeScript instead of somehow translating the TypeScript functions to Swift, using RCTEventRemitter (reference). Also refactored an LLM session into a class for better state management and race condition avoidance (with backward compatibility for v1.0.10). Another reference: https://developer.apple.com/forums/thread/793471
image

  • Add manual and automated testing
  • Add docs and examples
@ecoArcGaming ecoArcGaming changed the title [WIP] Tool Calling Adaptors [Need Testing] Tool Calling Adaptors Jul 16, 2025
@ecoArcGaming
Copy link
Collaborator Author

@deveix hey I think this is mostly working now, leave any reviews if you want. There's some refactoring which I documented

@ecoArcGaming ecoArcGaming changed the title [Need Testing] Tool Calling Adaptors [In Review] Tool Calling Adaptors Jul 17, 2025
@deveix
Copy link
Owner

deveix commented Jul 17, 2025

@ecoArcGaming Really great work! I was trying to get the Event emitters to work, but I guess I was looking in the wrong direction. Also I made a class but figured I won't need it for now till I manage to fix the Event Emitting.
I just left a small comment since arrays are not handled yet by the workaround I made.

I haven't tested yet also will check and let you know on the test project.

ecoArcGaming and others added 2 commits July 17, 2025 13:58
Co-authored-by: Ahmed kasem <ahmed.a.kasem18@gmail.com>
@ecoArcGaming
Copy link
Collaborator Author

Sounds good. I think classes are needed so different sessions don't share the same toolbox, thought it'd be the easiest way to achieve this.

@deveix
Copy link
Owner

deveix commented Jul 17, 2025

I'm getting this error, the same error I got when I tried Event Emitter.
simulator_screenshot_DE0B4221-AC66-464D-9358-D53DFB018C75

@ecoArcGaming
Copy link
Collaborator Author

ecoArcGaming commented Jul 17, 2025

Hmm I haven't gotten this error on my end. I've only seen that error when I was trying to use a library that was incompatible with iOS 26. Are we using different react-native versions? Locally I have:

"react": "19.1.0",
"react-native": "0.80.1",

I am also using a separate app I made to test this (you can see a screenshot if you scroll up), I can share it if you want.

@deveix
Copy link
Owner

deveix commented Jul 17, 2025

Please do, I thought there is something wrong with the plugin implementation when I was trying to add Event Emitters.

@ecoArcGaming
Copy link
Collaborator Author

ecoArcGaming commented Jul 17, 2025

here https://github.com/ecoArcGaming/foundation-model-react-native-test, I renamed my local package and installed it differently (using npm pack), so you might have to change the package.json a little

@deveix
Copy link
Owner

deveix commented Jul 17, 2025

Ok thanks, will accept PR and add you to collaborators! Great work!

@deveix deveix merged commit 811dab1 into deveix:main Jul 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants