mahaloz / DAILA

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

No context menu in Ghidra (Linux) #41

Closed adrianlshaw closed 4 months ago

adrianlshaw commented 4 months ago

OS: Ubuntu 23.10 Ghidra 11.1.1 dailalib 3.2.0

I run Tools->DAILA->Start Daila Backend

daila_plugin.py> Running...
INFO:libbs_vendored.jfx_bridge.bridge:serving! (jfx_bridge v1.0.0, Python 2.7.3)
INFO:libbs_vendored.jfx_bridge.bridge:Server launching in background - will continue to run after launch script finishes...
daila_plugin.py> Finished!

But no DAILA context menu appears when right clicking

image

adrianlshaw commented 4 months ago

Some more information if it helps at all. When running from termina:

user@computer> python3 -m dailalib -s ghidra
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/user/.local/lib/python3.11/site-packages/dailalib/__main__.py", line 45, in <module>
    main()
  File "/home/user/.local/lib/python3.11/site-packages/dailalib/__main__.py", line 41, in main
    create_plugin(force_decompiler="ghidra")
  File "/home/user/.local/lib/python3.11/site-packages/dailalib/__init__.py", line 13, in create_plugin
    litellm_api = LiteLLMAIAPI(delay_init=True)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/lib/python3.11/site-packages/dailalib/api/litellm/litellm_api.py", line 32, in __init__
    from .prompts import PROMPTS, DEFAULT_STYLE
  File "/home/user/.local/lib/python3.11/site-packages/dailalib/api/litellm/prompts/__init__.py", line 44, in <module>
    PROMPTS = load_prompts()
              ^^^^^^^^^^^^^^
  File "/home/user/.local/lib/python3.11/site-packages/dailalib/api/litellm/prompts/__init__.py", line 17, in load_prompts
    template_texts["summarize"],
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^
KeyError: 'summarize'
mahaloz commented 4 months ago

@adrianlshaw thanks for the debugging! It helped. Turns out I did not fully fix the bug in #37. It should now be fixed in 3.3.0. You can upgrade with a pip install -U dailalib.