mahaloz / DAILA

A decompiler-agnostic plugin for interacting with AI in your decompiler. GPT-4, Claude, and local models supported!
526 stars 45 forks source link

BinSync AI User is Deprecated #33

Open VisualEhrmanntraut opened 5 months ago

VisualEhrmanntraut commented 5 months ago

there's no binsync.api.

[Default] Traceback (most recent call last):
[Default]   File "/Users/visual/Library/Application Support/Binary Ninja/python310/site-packages/binsync/ui/panel_tabs/util_panel.py", line 181, in _handle_add_ai_user
[Default]     from dailalib.binsync_plugin.ai_user_config_ui import AIUserConfigDialog
[Default]   File "/Users/visual/Library/Application Support/Binary Ninja/python310/site-packages/dailalib/binsync_plugin/__init__.py", line 6, in <module>
[Default]     from dailalib.binsync_plugin.ai_bs_user import AIBSUser
[Default]   File "/Users/visual/Library/Application Support/Binary Ninja/python310/site-packages/dailalib/binsync_plugin/ai_bs_user.py", line 10, in <module>
[Default]     from binsync.api import load_decompiler_controller, BSController
[Default] ModuleNotFoundError: No module named 'binsync.api'
mahaloz commented 5 months ago

You would be right! I've mostly dropped support for starting DAILA BinSync (when you start an AI use inside BinSync), because I've mostly found it useless. In the majority of cases, when I want to use DAILA, I just use DAILA while BinSync is enabled. Then, all the changes get recorded as my changes so all my teammates can benefit from my use of AI.

I see two options:

  1. Drop all the BinSync code because no one actually uses this feature
  2. Refactor it to work again

I'm willing to do the second option if you have a decent reason why you would want to make an AI User inside BinSync instead of just using DAILA and BinSync at the same time.

VisualEhrmanntraut commented 5 months ago

I was just trying it out to see what it would say about a few stuff, then if it’s useful I would keep using it. It was not clear that you do not want to update the DAILA BinSync plugin. I saw that the only other place you can use DAILA in without the BinSync plugin is in Ghidra, and I don’t use that; I use Binary Ninja, that’s why I made this issue.

mahaloz commented 5 months ago

Wait @VisualEhrmanntraut, DAILA is usable in any decompiler libbs supports. Currently that includes Binja. You should be able to install it as is and it should work in Binja.

VisualEhrmanntraut commented 5 months ago

Oh, I see @mahaloz. I did

ln -sf /Users/visual/Library/Application\ Support/Binary\ Ninja/python310/site-packages/dailalib/daila_plugin.py /Users/visual/Library/Application\ Support/Binary\ Ninja/plugins/daila_plugin.py

and I see the options now. If you want, I can remove the old code and the UI from BinSync for you :-)

mahaloz commented 5 months ago

I'm holding off on removing it for now unless it is causing things to actively break.