Add hide news option
This commit is contained in:
@@ -37,6 +37,7 @@ export function Home() {
|
||||
|
||||
const isFirstTimeUser = createMemo(() => sync.data.session.length === 0)
|
||||
const tipsHidden = createMemo(() => kv.get("tips_hidden", false))
|
||||
const newsHidden = createMemo(() => kv.get("news_hidden", false)) // kilocode_change
|
||||
const showTips = createMemo(() => {
|
||||
// Don't show tips for first-time users
|
||||
if (isFirstTimeUser()) return false
|
||||
@@ -54,6 +55,18 @@ export function Home() {
|
||||
dialog.clear()
|
||||
},
|
||||
},
|
||||
// kilocode_change start
|
||||
{
|
||||
title: newsHidden() ? "Show news" : "Hide news",
|
||||
value: "news.toggle",
|
||||
keybind: "news_toggle",
|
||||
category: "System",
|
||||
onSelect: (dialog) => {
|
||||
kv.set("news_hidden", !newsHidden())
|
||||
dialog.clear()
|
||||
},
|
||||
},
|
||||
// kilocode_change end
|
||||
])
|
||||
|
||||
const Hint = (
|
||||
@@ -108,7 +121,9 @@ export function Home() {
|
||||
</box>
|
||||
{/* kilocode_change - KiloNews added */}
|
||||
<box width="100%" maxWidth={75} alignItems="center" paddingTop={2} gap={1}>
|
||||
<KiloNews />
|
||||
<Show when={!newsHidden()}>
|
||||
<KiloNews />
|
||||
</Show>
|
||||
<Show when={showTips()}>
|
||||
<Tips />
|
||||
</Show>
|
||||
|
||||
@@ -877,6 +877,7 @@ export namespace Config {
|
||||
terminal_suspend: z.string().optional().default("ctrl+z").describe("Suspend terminal"),
|
||||
terminal_title_toggle: z.string().optional().default("none").describe("Toggle terminal title"),
|
||||
tips_toggle: z.string().optional().default("<leader>h").describe("Toggle tips on home screen"),
|
||||
news_toggle: z.string().optional().default("none").describe("Toggle news on home screen"), // kilocode_change
|
||||
})
|
||||
.strict()
|
||||
.meta({
|
||||
|
||||
@@ -1308,6 +1308,10 @@ export type KeybindsConfig = {
|
||||
* Toggle tips on home screen
|
||||
*/
|
||||
tips_toggle?: string
|
||||
/**
|
||||
* Toggle news on home screen
|
||||
*/
|
||||
news_toggle?: string
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user