going to bed

This commit is contained in:
Santiago Lema 2025-09-29 01:35:10 -03:00
parent 5353340f57
commit 9cdab6a5c4
4 changed files with 8 additions and 5 deletions

BIN
.genio

Binary file not shown.

View file

@ -199,7 +199,7 @@ void Conversation::MessageReceived(BMessage *message) {
}
} catch (const std::exception &e) {
fprintf(stderr, "Error parsing JSON: %s\n", e.what());
std::string content = "Error parsing JSON, wrong model ?";
std::string content = "Error parsing JSON, wrong model or server down ? (Check logs in console).";
BMessage message(kSendReply);
message.AddString("text", BString(content.c_str()));
sendReply(message);

View file

@ -37,7 +37,7 @@ static bool progressColorUp = false;
#define B_TRANSLATION_CONTEXT "Window"
MainWindow::MainWindow()
: BWindow(BRect(50, 50, 600, 400), B_TRANSLATE("DumBer"), B_DOCUMENT_WINDOW,
: BWindow(BRect(50, 50, 600, 600), B_TRANSLATE("DumBer"), B_DOCUMENT_WINDOW,
B_ASYNCHRONOUS_CONTROLS | B_QUIT_ON_WINDOW_CLOSE) {
// Without this conversation would never get bmessages from HttpRequest
@ -152,7 +152,7 @@ MainWindow::MainWindow()
// delete bitmap; // Clean up when done
*/
BStringView *headerQuestion =
_headerQuestion =
new BStringView("questionLabel", "Your question: ");
BStringView *headerAnswer = new BStringView("questionAnswer", "Answer: ");
@ -160,13 +160,13 @@ MainWindow::MainWindow()
// rgb_color colorAnswer = {100, 100,150, 255};
// high color = txt
headerQuestion->SetHighColor(colorQuestion);
_headerQuestion->SetHighColor(colorQuestion);
headerAnswer->SetHighColor(colorQuestion);
BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
.AddGlue(0.1)
.Add(headerQuestion)
.Add(_headerQuestion)
.AddGroup(B_HORIZONTAL, 0, 1)
.Add(_inputField)

View file

@ -12,6 +12,7 @@
#include <StatusBar.h>
#include <String.h>
#include <TextControl.h>
#include <StringView.h>
#include <TextView.h>
#include <Window.h>
@ -57,6 +58,8 @@ private:
BTextView *_inputField;
BStatusBar *_progress;
BMenuField *_modelField;
BStringView *_headerQuestion;
BPopUpMenu *_modelMenu;
BButton *_sendButton;
BMessage *settings;