Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
8 changes: 4 additions & 4 deletions console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
"npm": ">=8.3.0"
},
"scripts": {
"dev": "vite --host",
"build": "tsc -b && vite build",
"build:prod": "tsc -b && vite build --mode production",
"build:test": "tsc -b && vite build --mode test",
"dev": "node scripts/patch-mermaid-dagre-self-loop.mjs && vite --host",
"build": "node scripts/patch-mermaid-dagre-self-loop.mjs && tsc -b && vite build && node scripts/patch-mermaid-dagre-self-loop.mjs --built",
"build:prod": "node scripts/patch-mermaid-dagre-self-loop.mjs && tsc -b && vite build --mode production && node scripts/patch-mermaid-dagre-self-loop.mjs --built",
"build:test": "node scripts/patch-mermaid-dagre-self-loop.mjs && tsc -b && vite build --mode test && node scripts/patch-mermaid-dagre-self-loop.mjs --built",
"format": "prettier --write .",
"format:check": "prettier --check .",
"lint": "eslint .",
Expand Down
11 changes: 11 additions & 0 deletions console/public/adclaw-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions console/scripts/patch-mermaid-dagre-self-loop.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import { existsSync, readdirSync, readFileSync, writeFileSync } from "node:fs";
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";

const __dirname = dirname(fileURLToPath(import.meta.url));
const consoleRoot = join(__dirname, "..");
const repoRoot = join(consoleRoot, "..");
const bad = "-cyc<lic-special-2";
const good = "-cyclic-special-2";

const targets = [
join(consoleRoot, "node_modules/mermaid/dist/mermaid.js"),
join(
consoleRoot,
"node_modules/mermaid/dist/chunks/mermaid.esm/dagre-QRXUHWQO.mjs",
),
join(
consoleRoot,
"node_modules/mermaid/dist/chunks/mermaid.esm/dagre-ZXKKJJHT.mjs",
),
];

if (process.argv.includes("--built")) {
const assetsDir = join(repoRoot, "src/adclaw/console/assets");
if (existsSync(assetsDir)) {
for (const fileName of readdirSync(assetsDir)) {
if (fileName.startsWith("dagre-") && fileName.endsWith(".js")) {
targets.push(join(assetsDir, fileName));
}
}
}
}

let patched = 0;

for (const target of targets) {
if (!existsSync(target)) continue;

const before = readFileSync(target, "utf8");
if (!before.includes(bad)) continue;

writeFileSync(target, before.replaceAll(bad, good));
patched += 1;
}

if (patched > 0) {
console.log(`[patch-mermaid-dagre] patched ${patched} file(s)`);
}
11 changes: 8 additions & 3 deletions console/src/layouts/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,14 @@ export default function Sidebar({ selectedKey }: SidebarProps) {
}}
>
<img
src="/logo.svg"
src="/adclaw-logo.svg"
alt="AdClaw"
style={{ height: 20, width: 20, display: "block" }}
style={{
height: 26,
width: 106,
display: "block",
objectFit: "contain",
}}
/>
{version && (
<span
Expand Down Expand Up @@ -299,7 +304,7 @@ export default function Sidebar({ selectedKey }: SidebarProps) {
</>
) : isNarrowViewport ? (
<img
src="/logo.svg"
src="/adclaw-symbol.svg"
alt="AdClaw"
style={{ height: 20, width: 20, display: "block" }}
/>
Expand Down
2 changes: 1 addition & 1 deletion console/src/pages/Chat/OptionsPanel/defaultConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const defaultConfig = {
greeting: "Hello, how can I help you today?",
description:
"I am a helpful assistant that can help you with your questions.",
avatar: `${import.meta.env.BASE_URL}logo.png`,
avatar: `${import.meta.env.BASE_URL}adclaw-logo.svg`,
prompts: [
{
value: "Let's start a new journey!",
Expand Down
15 changes: 8 additions & 7 deletions console/src/pages/Welcome/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -254,16 +254,17 @@ export default function WelcomePage() {
<div className={styles.heroSection}>
<Paragraph className={styles.welcomeTitle}>
<img
src="/adclaw-icon.webp"
alt=""
src="/adclaw-logo.svg"
alt="AdClaw"
style={{
width: 28,
height: 28,
verticalAlign: -6,
marginRight: 8,
width: 108,
height: 27,
verticalAlign: -7,
marginRight: 10,
objectFit: "contain",
}}
/>
<strong>Welcome to AdClaw</strong>
<strong>Welcome</strong>
</Paragraph>
<Paragraph className={styles.subtitle}>
Your AI Marketing Assistant powered by Citedy.
Expand Down
28 changes: 28 additions & 0 deletions console/src/styles/layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ body {
}

.page-content-chat .adclaw-chat-anywhere-layout-left {
flex: 0 0 320px !important;
width: 320px !important;
max-width: 320px !important;
background: transparent !important;
border-right: none;
backdrop-filter: none;
Expand Down Expand Up @@ -116,6 +119,31 @@ body {
border-radius: 10px;
}

.page-content-chat .adclaw-conversations-content {
min-width: 0;
gap: 8px;
padding-right: 10px;
}

.page-content-chat .adclaw-conversations-label {
min-width: 0;
max-width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
-webkit-mask-image: linear-gradient(
90deg,
#000 calc(100% - 22px),
transparent
);
mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent);
}

.page-content-chat .adclaw-conversations-menu-icon {
flex: 0 0 auto;
margin-left: 4px;
}

.page-content-chat .adclaw-conversations-item:hover {
background-color: rgba(255, 255, 255, 0.72) !important;
}
Expand Down
11 changes: 11 additions & 0 deletions src/adclaw/console/adclaw-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading