+
+
{item.title}
-
+
{item.description}
@@ -481,73 +654,3 @@ type LatestBlogPost = {
title: string;
date?: string;
};
-
-function DemoVideoSurface({
- presentation,
- isChinese,
-}: {
- presentation: HomepageVideoPresentation;
- isChinese: boolean;
-}) {
- const fallbackStyle =
- presentation.posterUrl && presentation.kind === "empty"
- ? {
- backgroundImage: `linear-gradient(180deg,rgba(15,23,42,0.16),rgba(15,23,42,0.42)), url(${presentation.posterUrl})`,
- backgroundSize: "cover",
- backgroundPosition: "center",
- }
- : undefined;
-
- return (
-
- {presentation.kind === "embed" ? (
-
- ) : null}
-
- {presentation.kind === "direct" ? (
-
-
-
- ) : null}
-
- {presentation.kind === "empty" ? (
-
-
-
- {isChinese ? "待接入视频" : "Awaiting media"}
-
-
-
- {isChinese
- ? "这里会展示当前域名的视频演示"
- : "This area shows the domain-specific product demo"}
-
-
- {isChinese
- ? "管理页可为不同域名配置不同链接。若链接不是可嵌入或直链格式,这里会保留为占位状态。"
- : "The admin page can assign a different link per host. Unsupported links remain in placeholder mode until a valid embed or direct video URL is provided."}
-
-
-
- ) : null}
-
- );
-}
diff --git a/src/app/xworkmate/page.tsx b/src/app/xworkmate/page.tsx
index f1fc5fa..4949b53 100644
--- a/src/app/xworkmate/page.tsx
+++ b/src/app/xworkmate/page.tsx
@@ -4,9 +4,7 @@ import { Suspense } from "react";
import { XWorkmateLoading } from "@/app/xworkmate/XWorkmateLoading";
import { XWorkmateWorkspacePage } from "@/components/xworkmate/XWorkmateWorkspacePage";
-import {
- buildXWorkmateScopeKey,
-} from "@/lib/xworkmate/types";
+import { buildXWorkmateScopeKey } from "@/lib/xworkmate/types";
import { getConsoleIntegrationDefaults } from "@/server/consoleIntegrations";
export const metadata = {
@@ -14,15 +12,25 @@ export const metadata = {
description: "Online XWorkmate workspace powered by OpenClaw gateway",
};
-export default async function XWorkmatePage() {
+export default async function XWorkmatePage({
+ searchParams,
+}: {
+ searchParams?: Promise<{ prompt?: string }>;
+}) {
const defaults = getConsoleIntegrationDefaults();
const scopeKey = buildXWorkmateScopeKey(null, null);
+ const resolvedSearchParams = searchParams ? await searchParams : undefined;
+ const initialPrompt =
+ typeof resolvedSearchParams?.prompt === "string"
+ ? resolvedSearchParams.prompt
+ : "";
return (
}>
diff --git a/src/components/AskAIDialog.tsx b/src/components/AskAIDialog.tsx
index de8dbc0..ed4b108 100644
--- a/src/components/AskAIDialog.tsx
+++ b/src/components/AskAIDialog.tsx
@@ -2,10 +2,12 @@
import { Maximize2, X } from "lucide-react";
import { useRouter } from "next/navigation";
+import { useEffect, useState } from "react";
-import { OpenClawAssistantPane } from "@/components/openclaw/OpenClawAssistantPane";
+import { useLanguage } from "@/i18n/LanguageProvider";
import type { IntegrationDefaults } from "@/lib/openclaw/types";
import { cn } from "@/lib/utils";
+import { XWorkmateAssistantShell } from "@/components/xworkmate/XWorkmateAssistantShell";
export type InitialQuestionPayload = {
key: number;
@@ -27,7 +29,10 @@ export function AskAIDialog({
onEnd,
initialQuestion,
}: AskAIDialogProps) {
+ const { language } = useLanguage();
+ const isChinese = language === "zh";
const router = useRouter();
+ const [prompt, setPrompt] = useState(initialQuestion?.text ?? "");
const resolvedDefaults: IntegrationDefaults = defaults ?? {
openclawUrl: "",
openclawOrigin: "",
@@ -41,10 +46,14 @@ export function AskAIDialog({
apisixTokenConfigured: false,
};
+ useEffect(() => {
+ setPrompt(initialQuestion?.text ?? "");
+ }, [initialQuestion?.key, initialQuestion?.text]);
+
function handleMaximize(): void {
onEnd();
- const query = initialQuestion?.text?.trim()
- ? `?q=${encodeURIComponent(initialQuestion.text.trim())}`
+ const query = prompt.trim()
+ ? `?prompt=${encodeURIComponent(prompt.trim())}`
: "";
router.push(`/xworkmate${query}`);
}
@@ -102,12 +111,27 @@ export function AskAIDialog({
-
+
+ {
+ onEnd();
+ const query = nextPrompt?.trim()
+ ? `?prompt=${encodeURIComponent(nextPrompt.trim())}`
+ : "";
+ router.push(`/xworkmate${query}`);
+ }}
+ />
+