From fe4dba192f097837730ecedd921b4f6bb966d471 Mon Sep 17 00:00:00 2001 From: mutugiii Date: Tue, 28 Jan 2025 17:30:53 +0300 Subject: [PATCH 1/3] Fix the title autofocus issue on title editing --- src/app/chat/chat-sidebar/chat-sidebar.component.html | 2 +- src/app/chat/chat-window/chat-window.component.ts | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/app/chat/chat-sidebar/chat-sidebar.component.html b/src/app/chat/chat-sidebar/chat-sidebar.component.html index e95768a217..02aa7cdf15 100644 --- a/src/app/chat/chat-sidebar/chat-sidebar.component.html +++ b/src/app/chat/chat-sidebar/chat-sidebar.component.html @@ -79,6 +79,6 @@ {{ drawer.opened && deviceType !== deviceTypes.DESKTOP ? 'chevron_left' : 'chevron_right' }} - + diff --git a/src/app/chat/chat-window/chat-window.component.ts b/src/app/chat/chat-window/chat-window.component.ts index 2b987c78cf..cab7d5b169 100644 --- a/src/app/chat/chat-window/chat-window.component.ts +++ b/src/app/chat/chat-window/chat-window.component.ts @@ -36,6 +36,7 @@ export class ChatWindowComponent implements OnInit, OnDestroy, AfterViewInit { }; providers: AIProvider[] = []; @Input() context: any; + @Input() isEditing: boolean; @ViewChild('chatInput') chatInput: ElementRef; @ViewChild('chat') chatContainer: ElementRef; @@ -94,7 +95,9 @@ export class ChatWindowComponent implements OnInit, OnDestroy, AfterViewInit { .subscribe((conversationId) => { this.selectedConversationId = conversationId; this.fetchConversation(this.selectedConversationId?._id); - this.focusInput(); + if (!this.isEditing) { + this.focusInput(); + } }, error => { console.error('Error subscribing to selectedConversationId$', error); }); @@ -107,7 +110,9 @@ export class ChatWindowComponent implements OnInit, OnDestroy, AfterViewInit { this.provider = { name: aiService }; - this.focusInput(); + if (!this.isEditing) { + this.focusInput(); + } })); } From 714e2b58143449a704fe9f4d37b21da7a8e4969b Mon Sep 17 00:00:00 2001 From: mutugiii Date: Tue, 28 Jan 2025 17:31:24 +0300 Subject: [PATCH 2/3] Fix the link color in the chat question template --- src/app/chat/chat-window/chat-window.scss | 17 ---------------- src/app/news/news-list-item.scss | 17 ---------------- src/styles.scss | 24 +++++++++++++++++++++++ 3 files changed, 24 insertions(+), 34 deletions(-) diff --git a/src/app/chat/chat-window/chat-window.scss b/src/app/chat/chat-window/chat-window.scss index d395950bd5..c54153d709 100644 --- a/src/app/chat/chat-window/chat-window.scss +++ b/src/app/chat/chat-window/chat-window.scss @@ -38,20 +38,3 @@ right: 8px; transform: translateY(-50%); } - -.conversation-query { - text-align: left; - padding: 8px; - border-radius: 5px; - background-color: #{$primary}; - color: white; -} - -.conversation-response { - margin: 8px 16px; -} - -.conversation-error { - color: #ff0000; - font-style: italic; -} diff --git a/src/app/news/news-list-item.scss b/src/app/news/news-list-item.scss index a7f80f18cd..d17e2b5a5b 100644 --- a/src/app/news/news-list-item.scss +++ b/src/app/news/news-list-item.scss @@ -30,23 +30,6 @@ mat-card-content { padding: 40px; } -.conversation-query { - text-align: left; - padding: 8px; - border-radius: 5px; - background-color: #{$primary}; - color: white; -} - -.conversation-response { - margin: 8px 16px; -} - -.conversation-error { - color: #ff0000; - font-style: italic; -} - @media (max-width: $screen-md) { .chat-container { padding: 20px; diff --git a/src/styles.scss b/src/styles.scss index 894ef1cd08..af66eaccf6 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -643,6 +643,30 @@ body { } // Styles for the chat-output directive + .conversation-query { + text-align: left; + padding: 8px; + border-radius: 5px; + background-color: #{$primary}; + color: white; + } + + .chat-link { + color: white !important; + &:visited { + color: white !important; + } + } + + .conversation-response { + margin: 8px 16px; + } + + .conversation-error { + color: #ff0000; + font-style: italic; + } + .code-block { position: relative; background-color: #2d2d2d; From 0d393ec410a9d3502428d886640892a5e38f09b7 Mon Sep 17 00:00:00 2001 From: dogi Date: Wed, 29 Jan 2025 16:47:59 -0500 Subject: [PATCH 3/3] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 083dc26172..fd963ec9db 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "planet", "license": "AGPL-3.0", - "version": "0.16.85", + "version": "0.16.86", "myplanet": { "latest": "v0.22.57", "min": "v0.21.57"