diff --git a/apps/rowboat/app/globals.css b/apps/rowboat/app/globals.css index 8befa83b..25bf132f 100644 --- a/apps/rowboat/app/globals.css +++ b/apps/rowboat/app/globals.css @@ -1,3 +1,4 @@ +@import './styles/quill-mentions.css'; @tailwind base; @tailwind components; @tailwind utilities; @@ -76,7 +77,6 @@ html, body { @apply bg-background text-foreground; } - /* Add these new utility classes */ .card-shadow { @apply shadow-sm dark:shadow-none dark:border-border; } @@ -90,105 +90,11 @@ html, body { } } -/* Add this to disable color transitions */ * { -webkit-transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, opacity 0.2s ease-in-out !important; transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, opacity 0.2s ease-in-out !important; } -/* Ensure smooth transitions */ * { @apply transition-colors duration-200; -} - -/* Add these styles alongside your other global styles */ -.ql-mention-list-container { - border: 1px solid #e2e8f0; - border-radius: 0.375rem; - box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); - background-color: white; - z-index: 1000; -} - -/* Base dark mode styles */ -.dark .ql-mention-list-container { - background-color: #1f2937; - border-color: #374151; -} - -.dark .ql-mention-list-container * { - background-color: #1f2937 !important; - color: #f9fafb !important; -} - -/* Target individual items */ -.dark .ql-mention-list-item { - color: #f9fafb !important; - background-color: #1f2937 !important; -} - -/* Target hover and selected states for individual items */ -.dark .ql-mention-list-container .ql-mention-list-item.selected, -.dark .ql-mention-list-container .ql-mention-list-item:hover { - background-color: #6b7280 !important; -} - -/* Ensure the background color only applies to the item itself */ -.dark .ql-mention-list-item > * { - background-color: inherit !important; -} - -/* Additional catch-all for any other possible class combinations */ -.dark [class*="mention"].selected, -.dark [class*="mention"]:hover { - background-color: #6b7280 !important; -} - -.ql-mention-list { - padding: 0.5rem 0; -} - -/* Styles for mentions in the editor */ -.ql-editor .mention { - background-color: #e0f2fe; /* light blue bg */ - color: #1e40af; /* darker blue text */ - padding: 0.125rem 0.375rem; - border-radius: 0.25rem; - white-space: nowrap; - display: inline-block; -} - -/* Style for the @ symbol */ -.ql-editor .mention .ql-mention-denotation-char { - color: #1e40af; /* blue color for @ symbol */ - font-weight: normal; -} - -.ql-editor .mention .invalid { - color: red; -} - -/* Add custom scrollbar styling */ -.dark *::-webkit-scrollbar { - width: 8px; - height: 8px; -} - -.dark *::-webkit-scrollbar-track { - background: #1f2937; /* dark gray background */ -} - -.dark *::-webkit-scrollbar-thumb { - background: #4b5563; /* medium gray thumb */ - border-radius: 4px; -} - -.dark *::-webkit-scrollbar-thumb:hover { - background: #6b7280; /* lighter gray on hover */ -} - -/* For Firefox */ -.dark * { - scrollbar-width: thin; - scrollbar-color: #4b5563 #1f2937; } \ No newline at end of file diff --git a/apps/rowboat/app/lib/components/atmentions.ts b/apps/rowboat/app/lib/components/atmentions.ts new file mode 100644 index 00000000..8a17a39d --- /dev/null +++ b/apps/rowboat/app/lib/components/atmentions.ts @@ -0,0 +1,57 @@ +interface AtMentionItem { + id: string; + value: string; + [key: string]: string; // Add index signature to allow any string key +} + +interface CreateAtMentionsProps { + agents: any[]; + prompts: any[]; + tools: any[]; + currentAgentName?: string; +} + +export function createAtMentions({ agents, prompts, tools, currentAgentName }: CreateAtMentionsProps): AtMentionItem[] { + const atMentions: AtMentionItem[] = []; + + // Add agents + for (const a of agents) { + if (a.disabled || a.name === currentAgentName) { + continue; + } + const id = `agent:${a.name}`; + atMentions.push({ + id, + value: id, + denotationChar: "@", // Add required properties for Match type + link: id, + target: "_self" + }); + } + + // Add prompts + for (const prompt of prompts) { + const id = `prompt:${prompt.name}`; + atMentions.push({ + id, + value: id, + denotationChar: "@", + link: id, + target: "_self" + }); + } + + // Add tools + for (const tool of tools) { + const id = `tool:${tool.name}`; + atMentions.push({ + id, + value: id, + denotationChar: "@", + link: id, + target: "_self" + }); + } + + return atMentions; +} \ No newline at end of file diff --git a/apps/rowboat/app/projects/[projectId]/config/app.tsx b/apps/rowboat/app/projects/[projectId]/config/app.tsx index 5da1ca89..214e0dce 100644 --- a/apps/rowboat/app/projects/[projectId]/config/app.tsx +++ b/apps/rowboat/app/projects/[projectId]/config/app.tsx @@ -24,8 +24,8 @@ export function Section({ title: string; children: React.ReactNode; }) { - return
-

{title}

+ return
+

{title}

{children}
; } @@ -235,8 +235,8 @@ export function ApiKeysSection({ {loading && } - {!loading &&
-
+ {!loading &&
+
API Key
Created
Last Used
@@ -253,7 +253,7 @@ export function ApiKeysSection({
}
{keys.map((key) => ( -
+
@@ -570,7 +570,7 @@ export default function App({ projectId: string; }) { return
-
+

Project config

diff --git a/apps/rowboat/app/projects/[projectId]/nav.tsx b/apps/rowboat/app/projects/[projectId]/nav.tsx index c75d0e5f..4f13088a 100644 --- a/apps/rowboat/app/projects/[projectId]/nav.tsx +++ b/apps/rowboat/app/projects/[projectId]/nav.tsx @@ -29,7 +29,7 @@ export function Nav({ setCollapsed(!collapsed); } - return
diff --git a/apps/rowboat/app/projects/[projectId]/sources/new/page.tsx b/apps/rowboat/app/projects/[projectId]/sources/new/page.tsx index f5a6dd9a..3df5ec5b 100644 --- a/apps/rowboat/app/projects/[projectId]/sources/new/page.tsx +++ b/apps/rowboat/app/projects/[projectId]/sources/new/page.tsx @@ -18,7 +18,7 @@ export default async function Page({ } return
-
+

Add data source

diff --git a/apps/rowboat/app/projects/[projectId]/sources/sources-list.tsx b/apps/rowboat/app/projects/[projectId]/sources/sources-list.tsx index 7377e294..80a070fd 100644 --- a/apps/rowboat/app/projects/[projectId]/sources/sources-list.tsx +++ b/apps/rowboat/app/projects/[projectId]/sources/sources-list.tsx @@ -37,7 +37,7 @@ export function SourcesList({ }, [projectId]); return
-
+

Data sources (beta)

diff --git a/apps/rowboat/app/projects/[projectId]/workflow/agent_config.tsx b/apps/rowboat/app/projects/[projectId]/workflow/agent_config.tsx index f7785144..7636f6e4 100644 --- a/apps/rowboat/app/projects/[projectId]/workflow/agent_config.tsx +++ b/apps/rowboat/app/projects/[projectId]/workflow/agent_config.tsx @@ -20,6 +20,7 @@ import { PreviewModalProvider } from "./preview-modal"; import { CopilotMessage } from "@/app/lib/types/copilot_types"; import { getCopilotAgentInstructions } from "@/app/actions/copilot_actions"; import { Dropdown as CustomDropdown } from "../../../lib/components/dropdown"; +import { createAtMentions } from "../../../lib/components/atmentions"; export function AgentConfig({ projectId, @@ -46,31 +47,12 @@ export function AgentConfig({ }) { const [isAdvancedConfigOpen, setIsAdvancedConfigOpen] = useState(false); - const atMentions = []; - for (const a of agents) { - if (a.disabled || a.name === agent.name) { - continue; - } - const id = `agent:${a.name}`; - atMentions.push({ - id, - value: id, - }); - } - for (const prompt of prompts) { - const id = `prompt:${prompt.name}`; - atMentions.push({ - id, - value: id, - }); - } - for (const tool of tools) { - const id = `tool:${tool.name}`; - atMentions.push({ - id, - value: id, - }); - } + const atMentions = createAtMentions({ + agents, + prompts, + tools, + currentAgentName: agent.name + }); const [showGenerateModal, setShowGenerateModal] = useState(false); const { showPreview } = usePreviewModal(); @@ -466,4 +448,4 @@ function GenerateInstructionsModal({ ); -} +} \ No newline at end of file diff --git a/apps/rowboat/app/projects/app.tsx b/apps/rowboat/app/projects/app.tsx index 3525a71f..204136e0 100644 --- a/apps/rowboat/app/projects/app.tsx +++ b/apps/rowboat/app/projects/app.tsx @@ -37,10 +37,10 @@ export default function App() { }, [router]); return ( -
+
-
Select a project
+
Select a project
} @@ -57,9 +63,9 @@ export default function App() { setSelectedTemplate(templateKey); } - return
-
-
Create a new project
+ return
+
+
Create a new project
-
Select a template
+
Select a template
* { + background-color: inherit !important; +} + +/* Mention item styles with tags */ +.dark .ql-mention-list-item { + display: flex !important; + align-items: center !important; + justify-content: space-between !important; + padding: 4px 8px !important; +} + +.mention-type-tag { + font-size: 0.7rem !important; + padding: 2px 6px !important; + border-radius: 4px !important; + margin-left: 8px !important; + font-weight: 500 !important; + text-transform: uppercase !important; +} + +.mention-type-tag.agent { + background-color: #3b82f6 !important; + color: white !important; +} + +.mention-type-tag.prompt { + background-color: #10b981 !important; + color: white !important; +} + +.mention-type-tag.tool { + background-color: #f59e0b !important; + color: white !important; +} \ No newline at end of file diff --git a/apps/rowboat/public/rowboat-logo-dark-mode.png b/apps/rowboat/public/rowboat-logo-dark-mode.png new file mode 100644 index 00000000..a754842e Binary files /dev/null and b/apps/rowboat/public/rowboat-logo-dark-mode.png differ