-
Notifications
You must be signed in to change notification settings - Fork 198
Modern AI Taskbar - AI Assistant in Taskbar #3005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
mods/ai-taskbar.wh.cpp
Outdated
| } | ||
| case WM_CTLCOLOREDIT: { | ||
| HDC hdc = (HDC)wParam; SetBkMode(hdc, TRANSPARENT); SetTextColor(hdc, C_TEXT); SetBkColor(hdc, C_INPUT); | ||
| return (LRESULT)CreateSolidBrush(C_INPUT); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A new brush is created on every WM_CTLCOLOREDIT message but never deleted. This will leak GDI objects over time. Cache the brush as a static/global and reuse it.
mods/ai-taskbar.wh.cpp
Outdated
| if (g_currentMode == 1) sys = L"You are a master programmer. Code only."; | ||
| if (g_currentMode == 2) sys = L"You are a creative writer."; | ||
|
|
||
| CreateThread(NULL, 0, ApiThread, new ThreadData{prompt, sys}, 0, NULL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thread handles are never closed. Each API call leaks a handle.
mods/ai-taskbar.wh.cpp
Outdated
|
|
||
| BOOL Wh_ModInit() { | ||
| LoadSettings(); | ||
| if(g_apiKey.empty()) { MessageBox(NULL, L"Please set API Key", L"Windhawk", MB_OK); return FALSE; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add MB_TOPMOST to make the message box more visible.
| // @version 1.1 | ||
| // @author Frqme | ||
| // @github https://github.com/Frqmelikescheese | ||
| // @include explorer.exe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wasn't addressed.
|
ok updated it not sure if i gotta do anything else im not familiar with github |
mods/ai-taskbar.wh.cpp
Outdated
| BOOL Wh_ModInit() { | ||
| LoadSettings(); | ||
| if(g_apiKey.empty()) { | ||
| MessageBox(NULL, L"Please set API Key", L"Windhawk", MB_OK | MB_TOPMOST); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MB_TOPMOST doesn't seem to be enough, replace it with MB_SYSTEMMODAL.
| // @include explorer.exe | ||
| // @compilerOptions -luser32 -lgdi32 -ldwmapi -lwinhttp -lcomctl32 | ||
| // ==/WindhawkMod== | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a readme (mod description) that says what the mod is about and how to use it.
| // @version 1.1 | ||
| // @author Frqme | ||
| // @github https://github.com/Frqmelikescheese | ||
| // @include explorer.exe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wasn't addressed.
|
should be good |
Adds an AI assistant directly to the taskbar with three modes (Chat, Code, Creative). Uses OpenRouter API with configurable model selection. Features a modern UI with syntax highlighting and mode-switching tabs.