diff --git a/CHANGELOG.md b/CHANGELOG.md index e2f255a..925d1bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ - Improved error handling for connection errors - Use a stack cookie to set minimum stack size to 32768 bytes (AmigaOS 3.1.4 or higher required) - Shows a warning if the stack size is smaller than 32768 bytes (AmigaOS 3 only) -- TODO - Fix send button in corner of screen on image mode in 3.X +- Send button no longer appears in corner of screen on image mode in 3.X after an error message is dismissed - TODO - Fix colour of text cursor in OS4 ## 1.4.2 (2024-01-31) diff --git a/src/gui.c b/src/gui.c index 0a1c5b1..760c235 100644 --- a/src/gui.c +++ b/src/gui.c @@ -221,59 +221,59 @@ static struct TextAttr chatTextAttr = {0}; static struct TextAttr uiTextAttr = {0}; static struct Menu *menu; static struct NewMenu amigaGPTMenu[] = { - {NM_TITLE, "Project", 0, 0, 0, NULL_ID}, - {NM_ITEM, "About", 0, 0, 0, MENU_ITEM_ABOUT_ID}, - {NM_ITEM, NM_BARLABEL, 0, 0, 0, NULL_ID}, - {NM_ITEM, "Quit", "Q", 0, 0, MENU_ITEM_QUIT_ID}, - {NM_TITLE, "Edit", 0, 0, 0, NULL_ID}, - {NM_ITEM, "Cut", "X", 0, 0, MENU_ITEM_CUT_ID}, - {NM_ITEM, "Copy", "C", 0, 0, MENU_ITEM_COPY_ID}, - {NM_ITEM, "Paste", "V", 0, 0, MENU_ITEM_PASTE_ID}, - {NM_ITEM, "Clear", "L", 0, 0, MENU_ITEM_CLEAR_ID}, - {NM_ITEM, "Select all", "A", 0, 0, MENU_ITEM_SELECT_ALL_ID}, - {NM_TITLE, "View", 0, 0, 0, NULL_ID}, - {NM_ITEM, "Chat Font", 0, 0, 0, MENU_ITEM_CHAT_FONT_ID}, - {NM_ITEM, "UI Font", 0, 0, 0, MENU_ITEM_UI_FONT_ID}, - {NM_TITLE, "Speech", 0, 0, 0, NULL_ID}, - {NM_ITEM, "Enabled", 0, CHECKIT|CHECKED, 0, MENU_ITEM_SPEECH_ENABLED_ID}, + {NM_TITLE, "Project", 0, 0, 0, (APTR)NULL_ID}, + {NM_ITEM, "About", 0, 0, 0, (APTR)MENU_ITEM_ABOUT_ID}, + {NM_ITEM, NM_BARLABEL, 0, 0, 0, (APTR)NULL_ID}, + {NM_ITEM, "Quit", "Q", 0, 0, (APTR)MENU_ITEM_QUIT_ID}, + {NM_TITLE, "Edit", 0, 0, 0, (APTR)NULL_ID}, + {NM_ITEM, "Cut", "X", 0, 0, (APTR)MENU_ITEM_CUT_ID}, + {NM_ITEM, "Copy", "C", 0, 0, (APTR)MENU_ITEM_COPY_ID}, + {NM_ITEM, "Paste", "V", 0, 0, (APTR)MENU_ITEM_PASTE_ID}, + {NM_ITEM, "Clear", "L", 0, 0, (APTR)MENU_ITEM_CLEAR_ID}, + {NM_ITEM, "Select all", "A", 0, 0, (APTR)MENU_ITEM_SELECT_ALL_ID}, + {NM_TITLE, "View", 0, 0, 0, (APTR)NULL_ID}, + {NM_ITEM, "Chat Font", 0, 0, 0, (APTR)MENU_ITEM_CHAT_FONT_ID}, + {NM_ITEM, "UI Font", 0, 0, 0, (APTR)MENU_ITEM_UI_FONT_ID}, + {NM_TITLE, "Speech", 0, 0, 0, (APTR)NULL_ID}, + {NM_ITEM, "Enabled", 0, CHECKIT|CHECKED, 0, (APTR)MENU_ITEM_SPEECH_ENABLED_ID}, #ifdef __AMIGAOS3__ - {NM_ITEM, "Accent", 0, 0, 0, MENU_ITEM_SPEECH_ACCENT_ID}, - {NM_ITEM, "Speech system", 0, 0, 0, MENU_ITEM_SPEECH_SYSTEM_ID}, - {NM_SUB, "Workbench 1.x v34", 0, CHECKIT|CHECKED, 0, MENU_ITEM_SPEECH_SYSTEM_34_ID}, - {NM_SUB, "Workbench 2.0 v37", 0, CHECKIT, 0, MENU_ITEM_SPEECH_SYSTEM_37_ID}, + {NM_ITEM, "Accent", 0, 0, 0, (APTR)MENU_ITEM_SPEECH_ACCENT_ID}, + {NM_ITEM, "Speech system", 0, 0, 0, (APTR)MENU_ITEM_SPEECH_SYSTEM_ID}, + {NM_SUB, "Workbench 1.x v34", 0, CHECKIT|CHECKED, 0, (APTR)MENU_ITEM_SPEECH_SYSTEM_34_ID}, + {NM_SUB, "Workbench 2.0 v37", 0, CHECKIT, 0, (APTR)MENU_ITEM_SPEECH_SYSTEM_37_ID}, #else - {NM_ITEM, "Voice", 0, 0, 0, MENU_ITEM_VOICE_ID}, - {NM_SUB, "kal (fast)", 0, CHECKIT, 0, MENU_ITEM_SPEECH_VOICE_KAL_ID}, - {NM_SUB, "kal16 (fast)", 0, CHECKIT, 0, MENU_ITEM_SPEECH_VOICE_KAL16_ID}, - {NM_SUB, "awb (slow)", 0, CHECKIT|CHECKED, 0, MENU_ITEM_SPEECH_VOICE_AWB_ID}, - {NM_SUB, "rms (slow)", 0, CHECKIT, 0, MENU_ITEM_SPEECH_VOICE_RMS_ID}, - {NM_SUB, "slt (slow)", 0, CHECKIT, 0, MENU_ITEM_SPEECH_VOICE_SLT_ID}, + {NM_ITEM, "Voice", 0, 0, 0, (APTR)MENU_ITEM_VOICE_ID}, + {NM_SUB, "kal (fast)", 0, CHECKIT, 0, (APTR)MENU_ITEM_SPEECH_VOICE_KAL_ID}, + {NM_SUB, "kal16 (fast)", 0, CHECKIT, 0, (APTR)MENU_ITEM_SPEECH_VOICE_KAL16_ID}, + {NM_SUB, "awb (slow)", 0, CHECKIT|CHECKED, 0, (APTR)MENU_ITEM_SPEECH_VOICE_AWB_ID}, + {NM_SUB, "rms (slow)", 0, CHECKIT, 0, (APTR)MENU_ITEM_SPEECH_VOICE_RMS_ID}, + {NM_SUB, "slt (slow)", 0, CHECKIT, 0, (APTR)MENU_ITEM_SPEECH_VOICE_SLT_ID}, #endif - {NM_TITLE, "OpenAI", 0, 0, 0, NULL_ID}, - {NM_ITEM, "API key", 0, 0, 0, MENU_ITEM_OPENAI_API_KEY_ID}, - {NM_ITEM, "Chat System", 0, 0, 0, MENU_ITEM_CHAT_SYSTEM_ID}, - {NM_ITEM, "Chat Model", 0, 0, 0, MENU_ITEM_CHAT_MODEL_ID}, - - {NM_SUB, "gpt-4-0125-preview", 0, CHECKIT, 0, MENU_ITEM_CHAT_MODEL_GPT_4_0125_PREVIEW_ID}, - {NM_SUB, "gpt-4-turbo-preview", 0, CHECKIT, 0, MENU_ITEM_CHAT_MODEL_GPT_4_TURBO_PREVIEW_ID}, - {NM_SUB, "gpt-4-1106-preview", 0, CHECKIT, 0, MENU_ITEM_CHAT_MODEL_GPT_4_1106_PREVIEW_ID}, - {NM_SUB, "gpt-4-0613", 0, CHECKIT, 0, MENU_ITEM_CHAT_MODEL_GPT_4_0613_ID}, - {NM_SUB, "gpt-3.5-turbo-0125", 0, CHECKIT, 0, MENU_ITEM_CHAT_MODEL_GPT_3_5_TURBO_0125_ID}, - {NM_SUB, "gpt-3.5-turbo", 0, CHECKIT|CHECKED, 0, MENU_ITEM_CHAT_MODEL_GPT_3_5_TURBO_ID}, - {NM_SUB, "gpt-3.5-turbo-1106", 0, CHECKIT, 0, MENU_ITEM_CHAT_MODEL_GPT_3_5_TURBO_1106_ID}, - {NM_ITEM, "Image Model", 0, 0, 0, MENU_ITEM_IMAGE_MODEL_ID}, - {NM_SUB, "dall-e-2", 0, CHECKIT, 0, MENU_ITEM_IMAGE_MODEL_DALL_E_2_ID}, - {NM_SUB, "dall-e-3", 0, CHECKIT|CHECKED, 0, MENU_ITEM_IMAGE_MODEL_DALL_E_3_ID}, - {NM_ITEM, "DALL-E 2 Image Size", 0, 0, 0, MENU_ITEM_IMAGE_SIZE_DALL_E_2_ID}, - {NM_SUB, "256x256", 0, CHECKIT|CHECKED, 0, MENU_ITEM_IMAGE_SIZE_DALL_E_2_256X256_ID}, - {NM_SUB, "512x512", 0, CHECKIT, 0, MENU_ITEM_IMAGE_SIZE_DALL_E_2_512X512_ID}, - {NM_SUB, "1024x1024", 0, CHECKIT, 0, MENU_ITEM_IMAGE_SIZE_DALL_E_2_1024X1024_ID}, - {NM_ITEM, "DALL-E 3 Image Size", 0, 0, 0, MENU_ITEM_IMAGE_SIZE_DALL_E_3_ID}, - {NM_SUB, "1024x1024", 0, CHECKIT|CHECKED, 0, MENU_ITEM_IMAGE_SIZE_DALL_E_3_1024X1024_ID}, - {NM_SUB, "1792x1024", 0, CHECKIT, 0, MENU_ITEM_IMAGE_SIZE_DALL_E_3_1792X1024_ID}, - {NM_SUB, "1024x1792", 0, CHECKIT, 0, MENU_ITEM_IMAGE_SIZE_DALL_E_3_1024X1792_ID}, - {NM_TITLE, "Help", 0, 0, 0, NULL_ID}, - {NM_ITEM, "View Documentation", 0, 0, 0, MENU_ITEM_VIEW_DOCUMENTATION_ID}, + {NM_TITLE, "OpenAI", 0, 0, 0, (APTR)NULL_ID}, + {NM_ITEM, "API key", 0, 0, 0, (APTR)MENU_ITEM_OPENAI_API_KEY_ID}, + {NM_ITEM, "Chat System", 0, 0, 0, (APTR)MENU_ITEM_CHAT_SYSTEM_ID}, + {NM_ITEM, "Chat Model", 0, 0, 0, (APTR)MENU_ITEM_CHAT_MODEL_ID}, + + {NM_SUB, "gpt-4-0125-preview", 0, CHECKIT, 0, (APTR)MENU_ITEM_CHAT_MODEL_GPT_4_0125_PREVIEW_ID}, + {NM_SUB, "gpt-4-turbo-preview", 0, CHECKIT, 0, (APTR)MENU_ITEM_CHAT_MODEL_GPT_4_TURBO_PREVIEW_ID}, + {NM_SUB, "gpt-4-1106-preview", 0, CHECKIT, 0, (APTR)MENU_ITEM_CHAT_MODEL_GPT_4_1106_PREVIEW_ID}, + {NM_SUB, "gpt-4-0613", 0, CHECKIT, 0, (APTR)MENU_ITEM_CHAT_MODEL_GPT_4_0613_ID}, + {NM_SUB, "gpt-3.5-turbo-0125", 0, CHECKIT, 0, (APTR)MENU_ITEM_CHAT_MODEL_GPT_3_5_TURBO_0125_ID}, + {NM_SUB, "gpt-3.5-turbo", 0, CHECKIT|CHECKED, 0, (APTR)MENU_ITEM_CHAT_MODEL_GPT_3_5_TURBO_ID}, + {NM_SUB, "gpt-3.5-turbo-1106", 0, CHECKIT, 0, (APTR)MENU_ITEM_CHAT_MODEL_GPT_3_5_TURBO_1106_ID}, + {NM_ITEM, "Image Model", 0, 0, 0, (APTR)MENU_ITEM_IMAGE_MODEL_ID}, + {NM_SUB, "dall-e-2", 0, CHECKIT, 0, (APTR)MENU_ITEM_IMAGE_MODEL_DALL_E_2_ID}, + {NM_SUB, "dall-e-3", 0, CHECKIT|CHECKED, 0, (APTR)MENU_ITEM_IMAGE_MODEL_DALL_E_3_ID}, + {NM_ITEM, "DALL-E 2 Image Size", 0, 0, 0, (APTR)MENU_ITEM_IMAGE_SIZE_DALL_E_2_ID}, + {NM_SUB, "256x256", 0, CHECKIT|CHECKED, 0, (APTR)MENU_ITEM_IMAGE_SIZE_DALL_E_2_256X256_ID}, + {NM_SUB, "512x512", 0, CHECKIT, 0, (APTR)MENU_ITEM_IMAGE_SIZE_DALL_E_2_512X512_ID}, + {NM_SUB, "1024x1024", 0, CHECKIT, 0, (APTR)MENU_ITEM_IMAGE_SIZE_DALL_E_2_1024X1024_ID}, + {NM_ITEM, "DALL-E 3 Image Size", 0, 0, 0, (APTR)MENU_ITEM_IMAGE_SIZE_DALL_E_3_ID}, + {NM_SUB, "1024x1024", 0, CHECKIT|CHECKED, 0, (APTR)MENU_ITEM_IMAGE_SIZE_DALL_E_3_1024X1024_ID}, + {NM_SUB, "1792x1024", 0, CHECKIT, 0, (APTR)MENU_ITEM_IMAGE_SIZE_DALL_E_3_1792X1024_ID}, + {NM_SUB, "1024x1792", 0, CHECKIT, 0, (APTR)MENU_ITEM_IMAGE_SIZE_DALL_E_3_1024X1792_ID}, + {NM_TITLE, "Help", 0, 0, 0, (APTR)NULL_ID}, + {NM_ITEM, "View Documentation", 0, 0, 0, (APTR)MENU_ITEM_VIEW_DOCUMENTATION_ID}, {NM_END, NULL, 0, 0, 0, 0} }; /** @@ -2670,7 +2670,8 @@ void displayError(STRPTR message) { }; EasyRequest(mainWindow, &errorRequester, NULL, NULL); - SetGadgetAttrs(sendMessageButton, mainWindow, NULL, GA_Disabled, FALSE, TAG_DONE); + if (!isAmigaOS3X) + SetGadgetAttrs(sendMessageButton, mainWindow, NULL, GA_Disabled, FALSE, TAG_DONE); FreeVec(adjustedMsg); } diff --git a/src/version.h b/src/version.h index dc482f3..475ee65 100644 --- a/src/version.h +++ b/src/version.h @@ -1,3 +1,3 @@ #define APP_VERSION "1.4.3" -#define BUILD_NUMBER "2734" +#define BUILD_NUMBER "2739" #define APP_NAME "AmigaGPT" \ No newline at end of file