Merge pull request #177 from yaso-meth/BUG--Mzansi-Ai-Thoughts-window-alignment

BUG--Mzansi-Ai-Thoughts-window-alignment
This commit is contained in:
yaso-meth 2025-05-21 14:12:05 +02:00 committed by GitHub
commit 3b8568bc86
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 64 additions and 62 deletions

View file

@ -52,7 +52,8 @@ class _PackageToolOneState extends State<PackageToolOne> {
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 "),
);
},
);

View file

@ -146,8 +146,8 @@ class _MihAppWindowState extends State<MihAppWindow> {
Flexible(
child: Padding(
padding: EdgeInsets.only(
left: horizontralWindowPadding,
right: horizontralWindowPadding,
left: 25,
right: 25,
bottom: vertticalWindowPadding,
),
child: ConstrainedBox(

View file

@ -235,67 +235,68 @@ class _AiChatState extends State<AiChat> {
_flutterTts.stop();
Navigator.of(context).pop();
},
windowBody: Column(
children: [
Stack(
children: [
Column(
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 {
@ -657,7 +658,7 @@ class _AiChatState extends State<AiChat> {
);
_modelController.text = 'gemma3:4b';
_fontSizeController.text = _chatFrontSize.ceil().toString();
systemPromt = setSystemPromt();
_chatHistory.add(
ollama.Message(
role: ollama.MessageRole.system,