From b78b08fb273f2ede2bc5bfd8884baf37978bdafe Mon Sep 17 00:00:00 2001 From: Yasien Mac Mini Date: Wed, 21 May 2025 13:54:53 +0200 Subject: [PATCH 1/4] update window inner padding --- .../mih_components/mih_package_components/mih_app_window.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Frontend/lib/mih_components/mih_package_components/mih_app_window.dart b/Frontend/lib/mih_components/mih_package_components/mih_app_window.dart index 74a58bc8..e7aed14b 100644 --- a/Frontend/lib/mih_components/mih_package_components/mih_app_window.dart +++ b/Frontend/lib/mih_components/mih_package_components/mih_app_window.dart @@ -146,8 +146,8 @@ class _MihAppWindowState extends State { Flexible( child: Padding( padding: EdgeInsets.only( - left: horizontralWindowPadding, - right: horizontralWindowPadding, + left: 25, + right: 25, bottom: vertticalWindowPadding, ), child: ConstrainedBox( From c31511914d26448bf11f841ff8636af543101d0f Mon Sep 17 00:00:00 2001 From: Yasien Mac Mini Date: Wed, 21 May 2025 13:55:20 +0200 Subject: [PATCH 2/4] update test package --- .../Example/package_tools/package_tool_one.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Frontend/lib/mih_components/mih_package_components/Example/package_tools/package_tool_one.dart b/Frontend/lib/mih_components/mih_package_components/Example/package_tools/package_tool_one.dart index 87e4786d..428ee9db 100644 --- a/Frontend/lib/mih_components/mih_package_components/Example/package_tools/package_tool_one.dart +++ b/Frontend/lib/mih_components/mih_package_components/Example/package_tools/package_tool_one.dart @@ -52,7 +52,8 @@ class _PackageToolOneState extends State { onWindowTapClose: () { Navigator.of(context).pop(); }, - windowBody: Text("Testing Window Body"), + windowBody: Text( + "Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body Testing Window Body "), ); }, ); From 375d38f7bad8cc3bceef85372ebf3012805cafb5 Mon Sep 17 00:00:00 2001 From: Yasien Mac Mini Date: Wed, 21 May 2025 13:56:05 +0200 Subject: [PATCH 3/4] update Mzansi AI Thoughts window --- .../mzansi_ai/package_tools/ai_chat.dart | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/Frontend/lib/mih_packages/mzansi_ai/package_tools/ai_chat.dart b/Frontend/lib/mih_packages/mzansi_ai/package_tools/ai_chat.dart index 030d3220..48850001 100644 --- a/Frontend/lib/mih_packages/mzansi_ai/package_tools/ai_chat.dart +++ b/Frontend/lib/mih_packages/mzansi_ai/package_tools/ai_chat.dart @@ -236,23 +236,20 @@ class _AiChatState extends State { Navigator.of(context).pop(); }, windowBody: Column( + mainAxisSize: MainAxisSize.max, children: [ Stack( children: [ - Column( - children: [ - Text( - snapshot.requireData, - textAlign: TextAlign.left, - style: TextStyle( - color: MzanziInnovationHub.of(context)! - .theme - .secondaryColor(), - fontSize: _chatFrontSize, - fontWeight: FontWeight.bold, - ), - ), - ], + Text( + snapshot.requireData, + textAlign: TextAlign.left, + style: TextStyle( + color: MzanziInnovationHub.of(context)! + .theme + .secondaryColor(), + fontSize: _chatFrontSize, + fontWeight: FontWeight.bold, + ), ), Positioned( bottom: 0, @@ -657,7 +654,7 @@ class _AiChatState extends State { ); _modelController.text = 'gemma3:4b'; _fontSizeController.text = _chatFrontSize.ceil().toString(); - systemPromt = setSystemPromt(); + _chatHistory.add( ollama.Message( role: ollama.MessageRole.system, From 7c310bb3078e23166534a445adc72a9a78769d6d Mon Sep 17 00:00:00 2001 From: Yasien Mac Mini Date: Wed, 21 May 2025 14:06:37 +0200 Subject: [PATCH 4/4] padding --- .../mzansi_ai/package_tools/ai_chat.dart | 114 +++++++++--------- 1 file changed, 59 insertions(+), 55 deletions(-) diff --git a/Frontend/lib/mih_packages/mzansi_ai/package_tools/ai_chat.dart b/Frontend/lib/mih_packages/mzansi_ai/package_tools/ai_chat.dart index 48850001..279c9364 100644 --- a/Frontend/lib/mih_packages/mzansi_ai/package_tools/ai_chat.dart +++ b/Frontend/lib/mih_packages/mzansi_ai/package_tools/ai_chat.dart @@ -235,64 +235,68 @@ class _AiChatState extends State { _flutterTts.stop(); Navigator.of(context).pop(); }, - windowBody: Column( - mainAxisSize: MainAxisSize.max, - children: [ - Stack( - children: [ - Text( - snapshot.requireData, - textAlign: TextAlign.left, - style: TextStyle( - color: MzanziInnovationHub.of(context)! - .theme - .secondaryColor(), - fontSize: _chatFrontSize, - fontWeight: FontWeight.bold, - ), - ), - Positioned( - bottom: 0, - right: 0, - child: Visibility( - visible: _aiThinking == false, - child: IconButton.filled( - iconSize: 25, - autofocus: true, - onPressed: () { - _captureAIResponse(snapshot.requireData); - _flutterTts.stop(); - Navigator.of(context).pop(); - }, - focusColor: MzanziInnovationHub.of(context)! + windowBody: SizedBox( + width: double.infinity, + // color: Colors.black, + child: Column( + mainAxisSize: MainAxisSize.max, + children: [ + Stack( + children: [ + Text( + snapshot.requireData, + textAlign: TextAlign.left, + style: TextStyle( + color: MzanziInnovationHub.of(context)! .theme - .successColor(), - icon: Icon( - Icons.check, - color: MzanziInnovationHub.of(context)! - .theme - .primaryColor(), - ), + .secondaryColor(), + fontSize: _chatFrontSize, + fontWeight: FontWeight.bold, ), - - // MIHButton( - // onTap: () { - // _captureAIResponse(snapshot.requireData); - // Navigator.of(context).pop(); - // }, - // buttonText: "Continue", - // buttonColor: MzanziInnovationHub.of(context)! - // .theme - // .successColor(), - // textColor: MzanziInnovationHub.of(context)! - // .theme - // .primaryColor(), - // ), ), - ), - ], - ), - ], + Positioned( + bottom: 0, + right: 0, + child: Visibility( + visible: _aiThinking == false, + child: IconButton.filled( + iconSize: 25, + autofocus: true, + onPressed: () { + _captureAIResponse(snapshot.requireData); + _flutterTts.stop(); + Navigator.of(context).pop(); + }, + focusColor: MzanziInnovationHub.of(context)! + .theme + .successColor(), + icon: Icon( + Icons.check, + color: MzanziInnovationHub.of(context)! + .theme + .primaryColor(), + ), + ), + + // MIHButton( + // onTap: () { + // _captureAIResponse(snapshot.requireData); + // Navigator.of(context).pop(); + // }, + // buttonText: "Continue", + // buttonColor: MzanziInnovationHub.of(context)! + // .theme + // .successColor(), + // textColor: MzanziInnovationHub.of(context)! + // .theme + // .primaryColor(), + // ), + ), + ), + ], + ), + ], + ), ), ); } else {