AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.
HTML ai-agentcloudflarecloudflare-d1cloudflare-r2cloudflare-workersdockerelectronevernoteevernote-alternativeknowledge-basemcpnote-takingobsidian-alternativeoffline-firstpersonal-knowledge-basepwaself-hostedsqlitetiptapweb-clipper
Refine AI sidebar composer styling
tianma-if633aa1678429
diff --git a/apps/web/src/components/ai-elements/prompt-input.tsx b/apps/web/src/components/ai-elements/prompt-input.tsxindex 181f8cc9..823ad0d3 100644--- a/apps/web/src/components/ai-elements/prompt-input.tsx+++ b/apps/web/src/components/ai-elements/prompt-input.tsx@@ -436,6 +436,7 @@ export type PromptInputProps = Omit<HTMLAttributes<HTMLFormElement>,"onSubmit" | "onError"> & {+ inputGroupClassName?: string;accept?: string; // e.g., "image/*" or leave undefined for anymultiple?: boolean;// When true, accepts drops anywhere on document. Default false (opt-in).@@ -457,6 +458,7 @@ export type PromptInputProps = Omit<export const PromptInput = ({className,+ inputGroupClassName,accept,multiple,globalDrop,@@ -780,7 +782,6 @@ export const PromptInput = ({multiple={multiple}onChange={handleChange}ref={inputRef}- title="Upload files"type="file"/><form@@ -789,7 +790,7 @@ export const PromptInput = ({ref={formRef}{...props}>- <InputGroup className="overflow-hidden">{children}</InputGroup>+ <InputGroup className={cn("overflow-hidden", inputGroupClassName)}>{children}</InputGroup></form></>);diff --git a/apps/web/src/components/ai-sidebar/AiSidebar.tsx b/apps/web/src/components/ai-sidebar/AiSidebar.tsxindex 6b9befc4..ac5197fe 100644--- a/apps/web/src/components/ai-sidebar/AiSidebar.tsx+++ b/apps/web/src/components/ai-sidebar/AiSidebar.tsx@@ -2,7 +2,7 @@ import { useCallback, useEffect, useMemo, useRef, useState, type ClipboardEvent,import { AnimatePresence } from "motion/react";import * as m from "motion/react-m";import { useTranslation } from "react-i18next";-import { Check, ChevronDown, Download, FileText, Loader2, PanelRightClose, Paperclip, Plus, Search, Sparkles, X } from "lucide-react";+import { ArrowUp, Check, ChevronDown, Download, FileText, Loader2, PanelRightClose, Plus, Search, Sparkles, X } from "lucide-react";import type { CompanionAction, CompanionAnswer, CompanionEvent, CompanionTurn, CompanionTurnInput } from "@edgeever/shared";import { buildRevisionDiffRows, createMemoLinkHref } from "@edgeever/shared";import { Button } from "@/components/ui/button";@@ -631,6 +631,7 @@ function SidebarComposer({) : null}<PromptInputaccept={AI_ATTACHMENT_ACCEPT}+ inputGroupClassName="rounded-[22px] border-slate-200 bg-card shadow-sm has-[[data-slot=input-group-control]:focus-visible]:ring-0"multipleonSubmit={async ({ text }) => {const raw = text.trim();@@ -654,24 +655,31 @@ function SidebarComposer({</PromptInputHeader>) : null}<PromptInputTextarea- className="text-[13px] leading-5 md:text-[13px]"+ className="min-h-20 px-4 pb-2 pt-4 text-[13px] leading-5 placeholder:text-zinc-400/80 dark:placeholder:text-zinc-500 md:text-[13px]"disabled={busy || locked}placeholder={placeholder}onPaste={onPaste}/>- <PromptInputFooter>+ <PromptInputFooter className="px-2.5 pb-2.5 pt-0"><PromptInputTools>- <Button- type="button"- size="icon-sm"- variant="ghost"- title={t("aiAssistant.addAttachment")}- aria-label={t("aiAssistant.addAttachment")}- disabled={busy || locked}- onClick={() => fileInputRef.current?.click()}- >- <Paperclip className="h-4 w-4" />- </Button>+ <TooltipProvider delayDuration={300}>+ <Tooltip>+ <TooltipTrigger asChild>+ <Button+ type="button"+ size="icon-sm"+ variant="ghost"+ className="rounded-full text-slate-500 hover:bg-slate-100 hover:text-slate-800"+ aria-label={t("aiAssistant.addAttachment")}+ disabled={busy || locked}+ onClick={() => fileInputRef.current?.click()}+ >+ <Plus className="h-4 w-4" />+ </Button>+ </TooltipTrigger>+ <TooltipContent>{t("aiAssistant.addAttachment")}</TooltipContent>+ </Tooltip>+ </TooltipProvider>{currentNoteAvailable ? (<Buttontype="button"@@ -694,10 +702,12 @@ function SidebarComposer({) : (<PromptInputSubmitaria-label={t("companion.send")}- className="border-slate-900 bg-slate-900 text-slate-50 hover:border-slate-800 hover:bg-slate-800"+ className="rounded-full border-slate-900 bg-slate-900 text-slate-50 hover:border-slate-800 hover:bg-slate-800 disabled:border-slate-100 disabled:bg-slate-100 disabled:text-slate-300"disabled={locked || !draft.trim()}variant="solid"- />+ >+ <ArrowUp className="size-4" />+ </PromptInputSubmit>)}</PromptInputFooter></PromptInput>@@ -1642,7 +1652,7 @@ function AiSidebarSession({</ConversationContent><ConversationScrollButton /></Conversation>- <div className="shrink-0 space-y-2 border-t border-slate-200 p-3">+ <div className="shrink-0 space-y-2 p-3">{selectionPin ? (<div className="flex items-start gap-2 rounded-md border border-slate-200 bg-slate-50 px-2.5 py-2" data-selection-pin=""><div className="min-w-0 flex-1">diff --git a/apps/web/src/components/ai-sidebar/InfographicSidebarSession.tsx b/apps/web/src/components/ai-sidebar/InfographicSidebarSession.tsxindex 6d454524..5b1ca3a0 100644--- a/apps/web/src/components/ai-sidebar/InfographicSidebarSession.tsx+++ b/apps/web/src/components/ai-sidebar/InfographicSidebarSession.tsx@@ -1,5 +1,5 @@import { useTranslation } from "react-i18next";-import { PanelRightClose, Sparkles, Undo2 } from "lucide-react";+import { ArrowUp, PanelRightClose, Sparkles, Undo2 } from "lucide-react";import type { MouseEvent } from "react";import type { InfographicConversationTurn } from "@edgeever/shared";import { Button } from "@/components/ui/button";@@ -53,6 +53,7 @@ function InfographicSidebarComposer({ session }: { session: InfographicSidebarCoconst draft = textInput.value.trim();return (<PromptInput+ inputGroupClassName="rounded-[22px] border-slate-200 bg-card shadow-sm has-[[data-slot=input-group-control]:focus-visible]:ring-0"onSubmit={async ({ text }) => {const raw = text.trim().slice(0, 1000);if (!raw || session.generating) throw new Error("empty");@@ -60,12 +61,12 @@ function InfographicSidebarComposer({ session }: { session: InfographicSidebarCo}}><PromptInputTextarea- className="text-[13px] leading-5 md:text-[13px]"+ className="min-h-20 px-4 pb-2 pt-4 text-[13px] leading-5 md:text-[13px]"disabled={session.generating}maxLength={1000}placeholder={t(session.hasGraphic ? "infographic.refinePrompt" : "infographic.prompt")}/>- <PromptInputFooter>+ <PromptInputFooter className="px-2.5 pb-2.5 pt-0"><PromptInputTools>{session.canUndo ? (<Button type="button" size="sm" variant="outline" disabled={session.generating} onClick={session.onUndo}>@@ -81,10 +82,12 @@ function InfographicSidebarComposer({ session }: { session: InfographicSidebarCo) : (<PromptInputSubmitaria-label={t(session.hasGraphic ? "infographic.applyRefinement" : "infographic.generate")}- className="border-slate-900 bg-slate-900 text-slate-50 hover:border-slate-800 hover:bg-slate-800"+ className="rounded-full border-slate-900 bg-slate-900 text-slate-50 hover:border-slate-800 hover:bg-slate-800 disabled:border-slate-100 disabled:bg-slate-100 disabled:text-slate-300"disabled={!draft}variant="solid"- />+ >+ <ArrowUp className="size-4" />+ </PromptInputSubmit>)}</PromptInputFooter></PromptInput>@@ -194,7 +197,7 @@ export function InfographicSidebarSession({<ConversationScrollButton aria-label={t("infographic.scrollToBottom")} /></Conversation>{!session.readOnly ? (- <div className="shrink-0 border-t border-slate-200 p-3">+ <div className="shrink-0 p-3"><PromptInputProvider><InfographicSidebarComposer session={session} /></PromptInputProvider>diff --git a/packages/shared/src/i18n/en-US.ts b/packages/shared/src/i18n/en-US.tsindex e58c6d4f..6b031a6c 100644--- a/packages/shared/src/i18n/en-US.ts+++ b/packages/shared/src/i18n/en-US.ts@@ -1318,7 +1318,7 @@ export const enUS = {historyEmpty: "No matching chats",resize: "Resize assistant",stop: "Stop",- placeholder: "Ask anything, or type / for a note skill",+ placeholder: "Ask AI",emptyTitle: "Start a conversation",emptyDescription: "Select 'Include current note' before sending when the note is relevant. Summarize, improve, and translate include it automatically.",includeCurrentNote: "Include current note",diff --git a/packages/shared/src/i18n/ja.ts b/packages/shared/src/i18n/ja.tsindex c468c513..37719d0f 100644--- a/packages/shared/src/i18n/ja.ts+++ b/packages/shared/src/i18n/ja.ts@@ -1318,7 +1318,7 @@ export const ja = {historyEmpty: "一致するチャットがありません",resize: "幅を調整",stop: "停止",- placeholder: "質問するか、/ でノート用スキルを入力",+ placeholder: "AI に質問",emptyTitle: "会話を始める",emptyDescription: "ノートを参照したいときは、送信前に「現在のノートを含める」を選択してください。要約・推敲・翻訳では自動的に含まれます。",includeCurrentNote: "現在のノートを含める",diff --git a/packages/shared/src/i18n/zh-CN.ts b/packages/shared/src/i18n/zh-CN.tsindex ec11437f..104f43ca 100644--- a/packages/shared/src/i18n/zh-CN.ts+++ b/packages/shared/src/i18n/zh-CN.ts@@ -1318,7 +1318,7 @@ export const zhCN = {historyEmpty: "没有匹配的会话",resize: "调整助手宽度",stop: "停止",- placeholder: "提问,或输入 / 使用笔记技能",+ placeholder: "询问 AI",emptyTitle: "开始对话",emptyDescription: "需要笔记内容时,发送前选择“引用当前笔记”。总结、润色和翻译会自动引用。",includeCurrentNote: "引用当前笔记",