-
Notifications
You must be signed in to change notification settings - Fork 3
feat(kilo cloud) Ability to add system message at the top #5142
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| import { Megaphone } from 'lucide-react'; | ||
|
|
||
| const SYSTEM_MESSAGE_TEXT = 'Important security notice'; | ||
| const SYSTEM_MESSAGE_URL = 'https://blog.kilo.ai/'; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. WARNING: Link text promises a specific notice but the URL is the blog root The visible label is "Important security notice", which sets the expectation of a specific advisory, but Reply with
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. Text and URL pending. this was just a pre PR to push the branch in case someone needs to take over the branch. |
||
|
|
||
| export function SystemMessageBanner() { | ||
| return ( | ||
| <a | ||
| href={SYSTEM_MESSAGE_URL} | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| className="flex min-w-0 shrink-0 items-center gap-1.5 rounded-md bg-primary px-3 py-1 text-xs font-medium text-primary-foreground hover:bg-primary/90" | ||
| > | ||
| <Megaphone aria-hidden="true" className="size-3.5 shrink-0" /> | ||
| <span className="truncate underline-offset-2 hover:underline">{SYSTEM_MESSAGE_TEXT}</span> | ||
| </a> | ||
| ); | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SUGGESTION: Hardcoded message requires a redeploy to change or remove
Because
SYSTEM_MESSAGE_TEXTandSYSTEM_MESSAGE_URLare compile-time constants, updating the message (or taking it down once the notice is no longer relevant) requires a code change and a full redeploy. For a system/announcement banner — typically used for time-sensitive comms — consider sourcing these from an env var (e.g.NEXT_PUBLIC_SYSTEM_MESSAGE_TEXT/..._URL) and rendering nothing when unset, so the banner can be changed or removed via config. Fine to keep hardcoded if this is intentionally a one-off notice.Reply with
@kilocode-bot fix itto have Kilo Code address this issue.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is as per design for now.