chore: rename project to clawdbot
This commit is contained in:
@@ -155,7 +155,7 @@ html.theme-transition::view-transition-new(theme) {
|
||||
}
|
||||
}
|
||||
|
||||
clawdis-app {
|
||||
clawdbot-app {
|
||||
display: block;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
|
||||
@@ -198,7 +198,7 @@ export function renderApp(state: AppViewState) {
|
||||
<div class="shell">
|
||||
<header class="topbar">
|
||||
<div class="brand">
|
||||
<div class="brand-title">Clawdis Control</div>
|
||||
<div class="brand-title">Clawdbot Control</div>
|
||||
<div class="brand-sub">Gateway dashboard</div>
|
||||
</div>
|
||||
<div class="topbar-status">
|
||||
|
||||
@@ -142,7 +142,7 @@ function formatToolOutput(value: unknown): string | null {
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
__CLAWDIS_CONTROL_UI_BASE_PATH__?: string;
|
||||
__CLAWDBOT_CONTROL_UI_BASE_PATH__?: string;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,8 +167,8 @@ const DEFAULT_CRON_FORM: CronFormState = {
|
||||
postToMainPrefix: "",
|
||||
};
|
||||
|
||||
@customElement("clawdis-app")
|
||||
export class ClawdisApp extends LitElement {
|
||||
@customElement("clawdbot-app")
|
||||
export class ClawdbotApp extends LitElement {
|
||||
@state() settings: UiSettings = loadSettings();
|
||||
@state() password = "";
|
||||
@state() tab: Tab = "chat";
|
||||
@@ -396,7 +396,7 @@ export class ClawdisApp extends LitElement {
|
||||
url: this.settings.gatewayUrl,
|
||||
token: this.settings.token.trim() ? this.settings.token : undefined,
|
||||
password: this.password.trim() ? this.password : undefined,
|
||||
clientName: "clawdis-control-ui",
|
||||
clientName: "clawdbot-control-ui",
|
||||
mode: "webchat",
|
||||
onHello: (hello) => {
|
||||
this.connected = true;
|
||||
@@ -663,7 +663,7 @@ export class ClawdisApp extends LitElement {
|
||||
|
||||
private inferBasePath() {
|
||||
if (typeof window === "undefined") return "";
|
||||
const configured = window.__CLAWDIS_CONTROL_UI_BASE_PATH__;
|
||||
const configured = window.__CLAWDBOT_CONTROL_UI_BASE_PATH__;
|
||||
if (typeof configured === "string" && configured.trim()) {
|
||||
return normalizeBasePath(configured);
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ export class GatewayBrowserClient {
|
||||
minProtocol: 2,
|
||||
maxProtocol: 2,
|
||||
client: {
|
||||
name: this.opts.clientName ?? "clawdis-control-ui",
|
||||
name: this.opts.clientName ?? "clawdbot-control-ui",
|
||||
version: this.opts.clientVersion ?? "dev",
|
||||
platform: this.opts.platform ?? navigator.platform ?? "web",
|
||||
mode: this.opts.mode ?? "webchat",
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
import { ClawdisApp } from "./app";
|
||||
import { ClawdbotApp } from "./app";
|
||||
|
||||
const originalConnect = ClawdisApp.prototype.connect;
|
||||
const originalConnect = ClawdbotApp.prototype.connect;
|
||||
|
||||
function mountApp(pathname: string) {
|
||||
window.history.replaceState({}, "", pathname);
|
||||
const app = document.createElement("clawdis-app") as ClawdisApp;
|
||||
const app = document.createElement("clawdbot-app") as ClawdbotApp;
|
||||
document.body.append(app);
|
||||
return app;
|
||||
}
|
||||
@@ -18,16 +18,16 @@ function nextFrame() {
|
||||
}
|
||||
|
||||
beforeEach(() => {
|
||||
ClawdisApp.prototype.connect = () => {
|
||||
ClawdbotApp.prototype.connect = () => {
|
||||
// no-op: avoid real gateway WS connections in browser tests
|
||||
};
|
||||
window.__CLAWDIS_CONTROL_UI_BASE_PATH__ = undefined;
|
||||
window.__CLAWDBOT_CONTROL_UI_BASE_PATH__ = undefined;
|
||||
document.body.innerHTML = "";
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
ClawdisApp.prototype.connect = originalConnect;
|
||||
window.__CLAWDIS_CONTROL_UI_BASE_PATH__ = undefined;
|
||||
ClawdbotApp.prototype.connect = originalConnect;
|
||||
window.__CLAWDBOT_CONTROL_UI_BASE_PATH__ = undefined;
|
||||
document.body.innerHTML = "";
|
||||
});
|
||||
|
||||
@@ -50,22 +50,22 @@ describe("control UI routing", () => {
|
||||
});
|
||||
|
||||
it("infers nested base paths", async () => {
|
||||
const app = mountApp("/apps/clawdis/cron");
|
||||
const app = mountApp("/apps/clawdbot/cron");
|
||||
await app.updateComplete;
|
||||
|
||||
expect(app.basePath).toBe("/apps/clawdis");
|
||||
expect(app.basePath).toBe("/apps/clawdbot");
|
||||
expect(app.tab).toBe("cron");
|
||||
expect(window.location.pathname).toBe("/apps/clawdis/cron");
|
||||
expect(window.location.pathname).toBe("/apps/clawdbot/cron");
|
||||
});
|
||||
|
||||
it("honors explicit base path overrides", async () => {
|
||||
window.__CLAWDIS_CONTROL_UI_BASE_PATH__ = "/clawdis";
|
||||
const app = mountApp("/clawdis/sessions");
|
||||
window.__CLAWDBOT_CONTROL_UI_BASE_PATH__ = "/clawdbot";
|
||||
const app = mountApp("/clawdbot/sessions");
|
||||
await app.updateComplete;
|
||||
|
||||
expect(app.basePath).toBe("/clawdis");
|
||||
expect(app.basePath).toBe("/clawdbot");
|
||||
expect(app.tab).toBe("sessions");
|
||||
expect(window.location.pathname).toBe("/clawdis/sessions");
|
||||
expect(window.location.pathname).toBe("/clawdbot/sessions");
|
||||
});
|
||||
|
||||
it("updates the URL when clicking nav items", async () => {
|
||||
|
||||
@@ -142,7 +142,7 @@ export function subtitleForTab(tab: Tab) {
|
||||
case "chat":
|
||||
return "Direct gateway chat session for quick interventions.";
|
||||
case "config":
|
||||
return "Edit ~/.clawdis/clawdis.json safely.";
|
||||
return "Edit ~/.clawdbot/clawdbot.json safely.";
|
||||
case "debug":
|
||||
return "Gateway snapshots, events, and manual RPC calls.";
|
||||
default:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const KEY = "clawdis.control.settings.v1";
|
||||
const KEY = "clawdbot.control.settings.v1";
|
||||
|
||||
import type { ThemeMode } from "./theme";
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ export function renderConfig(props: ConfigProps) {
|
||||
</div>
|
||||
|
||||
<div class="muted" style="margin-top: 10px;">
|
||||
Writes to <span class="mono">~/.clawdis/clawdis.json</span>. Some changes
|
||||
Writes to <span class="mono">~/.clawdbot/clawdbot.json</span>. Some changes
|
||||
require a gateway restart.
|
||||
</div>
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ export function renderOverview(props: OverviewProps) {
|
||||
const v = (e.target as HTMLInputElement).value;
|
||||
props.onSettingsChange({ ...props.settings, token: v });
|
||||
}}
|
||||
placeholder="CLAWDIS_GATEWAY_TOKEN"
|
||||
placeholder="CLAWDBOT_GATEWAY_TOKEN"
|
||||
/>
|
||||
</label>
|
||||
<label class="field">
|
||||
|
||||
Reference in New Issue
Block a user