Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created feedback encouragement message #3057

Merged
merged 7 commits into from
May 7, 2023
Merged
Show file tree
Hide file tree
Changes from 5 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
3 changes: 2 additions & 1 deletion website/public/locales/en/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@
"unverified_plugin": "UNVERIFIED",
"verified_plugin": "VERIFIED",
"unverified_plugin_description": "This plugin has not been verified by the Open Assistant team. Use at your own risk.",
"verified_plugin_description": "This plugin has been verified by the Open Assistant team."
"verified_plugin_description": "This plugin has been verified by the Open Assistant team.",
"feedback_message": "Thoughts? Let us know!"
}
2 changes: 2 additions & 0 deletions website/src/components/Chat/ChatMessageEntry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { BaseMessageEntry } from "../Messages/BaseMessageEntry";
import { BaseMessageEmojiButton } from "../Messages/MessageEmojiButton";
import { MessageInlineEmojiRow } from "../Messages/MessageInlineEmojiRow";
import { WorkParametersDisplay } from "./WorkParameters";
import { EncourageMessage } from "./EncourageMessage";

export type EditPromptParams = { parentId: string; chatId: string; content: string };

Expand Down Expand Up @@ -164,6 +165,7 @@ export const ChatMessageEntry = memo(function ChatMessageEntry({
)}
{state === "complete" && (
<>
<EncourageMessage />
{canRetry && <BaseMessageEmojiButton emoji={RotateCcw} onClick={handleRetry} label={t("retry")} />}
{!hasCopied ? (
<BaseMessageEmojiButton emoji={Copy} onClick={onCopy} label={t("copy")} />
Expand Down
11 changes: 11 additions & 0 deletions website/src/components/Chat/EncourageMessage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Badge } from "@chakra-ui/react";
import { useTranslation } from "next-i18next";
// kept brief so that it doesnt distract/interfere with user experience
export const EncourageMessage = () => {
const { t } = useTranslation("chat");
return (
<Badge fontWeight="normal" background="gray.300" color="black">
{t("feedback_message")}
</Badge>
);
};