Skip to content

Commit

Permalink
Make text cursor orannge in OS4, update docs and fix stack check size
Browse files Browse the repository at this point in the history
  • Loading branch information
sacredbanana committed Mar 8, 2024
1 parent 4c2d245 commit 368d30d
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 10 deletions.
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## 1.4.3
## 1.4.3 (2024-02-08)

- Updated to the latest OpenAI chat models
- Fix crash when config.json doesn't exist
Expand All @@ -10,7 +10,6 @@
- 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)
- 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)

Expand Down
9 changes: 8 additions & 1 deletion bundle/AmigaGPT/AmigaGPT.guide
Original file line number Diff line number Diff line change
Expand Up @@ -669,9 +669,16 @@ Training data: Up to Sep 2021
@node changelog "Changelog"
@{b}Changelog@{ub}

@{b}1.4.3@{ub}
@{b}1.4.3 (2024-02-08)@{ub}

- Updated to the latest OpenAI chat models
- Fix crash when config.json doesn't exist
- Fix crash when selecting the root menu items
- Adjust screen colours to enhance visibility
- 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)
- Send button no longer appears in corner of screen on image mode in 3.X after an error message is dismissed

@{b}1.4.2 (2024-01-31)@{ub}

Expand Down
13 changes: 12 additions & 1 deletion bundle/AmigaGPT/AmigaGPT.readme
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,21 @@ Special Thanks:
https://www.hyperion-entertainment.com

Changelog:

------------------
1.4.3
1.4.3 (2024-02-08)
------------------
- Updated to the latest OpenAI chat models
- Fix crash when config.json doesn't exist
- Fix crash when selecting the root menu items
- Adjust screen colours to enhance visibility
- 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)
- Send button no longer appears in corner of screen on image mode in 3.X after
an error message is dismissed

------------------
1.4.2 (2024-01-31)
Expand Down
3 changes: 2 additions & 1 deletion src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ struct Config config = {
.uiFontFlags = FPF_DISKFONT | FPF_DESIGNED,
.openAiApiKey = NULL,
.colors = {
10 << 16,
11 << 16,
0x00000000, 0x00000000, 0x11111111, // darkest blue
0x00000000, 0x88888888, 0xFFFFFFFF, // light blue
0xA0000000, 0x00000000, 0x0F0F0F0F, // dark red
Expand All @@ -45,6 +45,7 @@ struct Config config = {
0xFFFFFFFF, 0xFFFFFFFF, 0x00000000, // yellow
0x22222222, 0x22222222, 0x22222222, // dark grey
0x44444444, 0x44444444, 0x44444444, // grey
0xFFFFFFFF, 0xAAAAAAAA, 0x00000000, // orange
0
},
.chatModelSetVersion = CHAT_MODEL_SET_VERSION,
Expand Down
6 changes: 3 additions & 3 deletions src/gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ static BOOL isPublicScreen;
static BOOL isAmigaOS3X;
static LONG selectedMode;
static WORD pens[NUMDRIPENS + 1];
static LONG textEdtorColorMap[] = {5,3,6,3,6,6,4,0,1,6,6,6,6,6,6,6};
static LONG textEditorColorMap[] = {5,10,6,3,6,6,4,0,1,6,6,6,6,6,6,6};
static LONG sendMessageButtonPen;
static LONG newChatButtonPen;
static LONG deleteButtonPen;
Expand Down Expand Up @@ -1294,9 +1294,9 @@ LONG initVideo() {
}

if (!isPublicScreen) {
SetGadgetAttrs(textInputTextEditor, mainWindow, NULL, GA_TEXTEDITOR_ColorMap, &textEdtorColorMap, TAG_DONE);
SetGadgetAttrs(textInputTextEditor, mainWindow, NULL, GA_TEXTEDITOR_ColorMap, &textEditorColorMap, TAG_DONE);
if (!isAmigaOS3X || selectedMode == MODE_SELECTION_TAB_CHAT_ID)
SetGadgetAttrs(chatOutputTextEditor, mainWindow, NULL, GA_TEXTEDITOR_ColorMap, &textEdtorColorMap, TAG_DONE);
SetGadgetAttrs(chatOutputTextEditor, mainWindow, NULL, GA_TEXTEDITOR_ColorMap, &textEditorColorMap, TAG_DONE);
}

refreshOpenAIMenuItems();
Expand Down
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ LONG main(int argc, char **argv) {
total = upper - lower;
}

if (total < 327668) {
if (total < 32768) {
printf("Warning: The stack size of %ld bytes is too small. The minimum recommended stack size is 32768 bytes to avoid crashes.\n", total);
}
#else
Expand Down
2 changes: 1 addition & 1 deletion src/version.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#define APP_VERSION "1.4.3"
#define BUILD_NUMBER "2739"
#define BUILD_NUMBER "2749"
#define APP_NAME "AmigaGPT"

0 comments on commit 368d30d

Please sign in to comment.