CodeGPT
CodeGPT copied to clipboard
feat: allow drag and drop of image file in prompt textArea
This PR closes #554
Adds support for drag&drop of a single image file into the prompt
@carlrobertoh no idea why the ChatToolWindowTabPanelTest.testSendingOpenAIMessageWithImage fails, it succeeds locally.
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
https://github.com/carlrobertoh/CodeGPT/actions/runs/9112340838/job/25051402045?pr=566#step:4:724
Noice! 👍
It happens because the tests on the Github runner are executed in headless mode. You can replicate this by running export JAVA_TOOL_OPTIONS='-Djava.awt.headless=true' before executing the tests. Not sure what the fix is yet.
Noice! 👍
It happens because the tests on the Github runner are executed in headless mode. You can replicate this by running
export JAVA_TOOL_OPTIONS='-Djava.awt.headless=true'before executing the tests. Not sure what the fix is yet.
Ah I see, in the DropTarget constructor:
public DropTarget(Component c, int ops, DropTargetListener dtl, boolean act, FlavorMap fm) throws HeadlessException {
if (GraphicsEnvironment.isHeadless()) {
throw new HeadlessException();
}
...
}