Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions src/components/Messages/style.module.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.messagesContainer {
position: relative;
display: flex;
flex-direction: column;
flex-grow: 1;
Expand All @@ -8,16 +9,26 @@
scrollbar-color: var(--clover-ai-colors-secondaryAlt) transparent;
overflow-y: scroll;

&::after {
font-style: italic;
--line-height: 1.5;
line-height: var(--line-height);
/* The multiplier -2 is used to adjust the positioning of the content text
relative to the preceding content. It ensures the text appears slightly above
its default position for better visual alignment. */
margin-block-start: calc(-2 * (var(--line-height) * var(--clover-ai-sizes-3)));
}

&[data-state="assistant_responding"] {
&::after {
content: "Thinking...";
font-style: italic;
--line-height: 1.5;
line-height: var(--line-height);
/* The multiplier -2 is used to adjust the positioning of the "Thinking..." text
relative to the preceding content. It ensures the text appears slightly above
its default position for better visual alignment. */
margin-block-start: calc(-2 * (var(--line-height) * var(--clover-ai-sizes-3)));
}
}

&[data-state="error"] {
&::after {
content: "An error occurred. Please try again.";
color: var(--clover-ai-colors-error);
}
}

Expand Down
1 change: 1 addition & 0 deletions src/plugin/Panel/ChatInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const ChatInput: FC = () => {

function clearConversation() {
dispatch({ type: "clearConversation" });
dispatch({ type: "setConversationState", conversationState: "idle" });
}

async function handleSubmit(e: React.FormEvent<HTMLFormElement>) {
Expand Down
2 changes: 1 addition & 1 deletion src/providers/userTokenProvider/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export class UserTokenProvider extends BaseProvider {

this.set_conversation_state("idle");
} catch (error) {
console.error("Error sending messages:", error); // eslint-disable-line no-console
console.error(error); // eslint-disable-line no-console
Copy link

Copilot AI Sep 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message has been simplified but may be less helpful for debugging. The previous message 'Error sending messages:' provided context about where the error occurred, which is valuable for troubleshooting.

Suggested change
console.error(error); // eslint-disable-line no-console
console.error("Error generating response:", error); // eslint-disable-line no-console

Copilot uses AI. Check for mistakes.
this.set_conversation_state("error");
}
}
Expand Down