Compare commits

...

3 Commits

Author SHA1 Message Date
肖应宇 9710bd904c fix(frontend): 禁止 disabled 状态下发送消息
- 恢复 PromptInputSubmit 的 disabled 绑定,避免按钮可点击提交
- 在 PromptInput handleSubmit 增加 disabled 兜底拦截
- 确保点击与回车两种路径在 disabled=true 时都不会发送
2026-04-02 16:25:24 +08:00
肖应宇 b11819d765 chore: 删除log 2026-04-02 13:52:47 +08:00
肖应宇 01e508a566 build: 实现真正的执行一次脚本就部署的流程 2026-04-02 12:02:13 +08:00
7 changed files with 20 additions and 27 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -8,8 +8,8 @@ import { I18nProvider } from "@/core/i18n/context";
import { detectLocaleServer } from "@/core/i18n/server";
export const metadata: Metadata = {
title: "DeerFlow",
description: "A LangChain-based framework for building super agents.",
title: "XClaw",
description: "Desscriptions of XClawDesscriptions of XClawDesscriptions of XClaw",
};
export default async function RootLayout({

View File

@ -752,6 +752,9 @@ export const PromptInput = ({
const handleSubmit: FormEventHandler<HTMLFormElement> = (event) => {
event.preventDefault();
if (disabled) {
return;
}
const form = event.currentTarget;
const text = usingProvider
@ -1081,9 +1084,9 @@ export const PromptInputSubmit = ({
: false;
// 正在 streaming 时不允许发送
// const isStreaming = status === "streaming" || status === "submitted";
const isStreaming = status === "streaming" || status === "submitted";
// const isDisabled = disabled || !hasContent || isStreaming;
const isDisabled = disabled || !hasContent || isStreaming;
let Icon = <ArrowUpIcon className="size-4" />;
@ -1109,15 +1112,15 @@ export const PromptInputSubmit = ({
// 被button{bgc:#fff}覆盖了,只能加"!"
className={cn(
"h-[40px] w-[140px] rounded-[10px] border-0 font-bold transition-all",
// isDisabled
// ? "cursor-not-allowed !bg-gray-200 text-gray-400":
isDisabled
? "cursor-not-allowed !bg-gray-200 text-gray-400":
"!bg-[#F0E8FB] text-[#8E47F0] hover:!bg-[#8E47F0] hover:text-[#FFFFFF]",
className,
)}
size={size}
type="submit"
variant={variant}
// disabled={isDisabled}
disabled={isDisabled}
{...props}
>
{/* {children ?? Icon} */}

View File

@ -515,7 +515,7 @@ export function ArtifactFilePreview({
if (language === "markdown") {
return (
<div
className={cn("w-full mb-[207px] p-[20px]")}
className={cn("w-full bg-white mb-[207px] p-[20px]")}
style={{ "--zoom-scale": zoomScale } as React.CSSProperties}
>
<Streamdown

View File

@ -29,7 +29,6 @@ export function DevTodoList({
if (hidden) {
return null;
}
console.log(todos);
return (
<DropdownMenu>
<DropdownMenuTrigger asChild>{trigger}</DropdownMenuTrigger>

View File

@ -58,7 +58,7 @@ export const zhCN: Translations = {
// Welcome
welcome: {
// TODO: 测试环境标识
greeting: "轻办公 · XClaw Tagv3.1.0fix: xclaw_used切换欢迎样式和对话样式",
greeting: "轻办公 · XClaw Tagv3.1.0 build: 实现真正的执行一次脚本就部署的流程",
description:
"欢迎使用 🦌 DeerFlow一个完全开源的超级智能体。通过内置和自定义的 Skills\nDeerFlow 可以帮你搜索网络、分析数据,还能为你生成幻灯片、\n图片、视频、播客及网页等几乎可以做任何事情。",

View File

@ -8,21 +8,21 @@ cd "$REPO_ROOT"
usage() {
cat <<'EOF'
Usage:
./scripts/deploy-frontend-standalone.sh <remote> <remote_app_dir> [--restart]
./scripts/deploy-frontend-standalone.sh <remote> <remote_app_dir>
Arguments:
remote SSH target, e.g. user@example.com
remote_app_dir Remote deerflow2 root dir, e.g. /home/user/deerflow2
Options:
--restart Run "make start" on the remote host after upload
Example:
./scripts/deploy-frontend-standalone.sh ubuntu@1.2.3.4 /opt/deerflow2 --restart
./scripts/deploy-frontend-standalone.sh ubuntu@1.2.3.4 /opt/deerflow2
Notes:
- Run this script on your local machine (build machine), not on the server.
- Requires: pnpm, rsync, ssh
- Script will run:
sudo systemctl daemon-reload
sudo systemctl restart deerflow.service
EOF
}
@ -31,20 +31,13 @@ if [ "${1:-}" = "-h" ] || [ "${1:-}" = "--help" ]; then
exit 0
fi
if [ "$#" -lt 2 ] || [ "$#" -gt 3 ]; then
if [ "$#" -ne 2 ]; then
usage
exit 1
fi
REMOTE="$1"
REMOTE_APP_DIR="$2"
RESTART="${3:-}"
if [ "$RESTART" != "" ] && [ "$RESTART" != "--restart" ]; then
echo "Unknown option: $RESTART"
usage
exit 1
fi
echo "==> Building frontend (standalone)..."
pnpm -C frontend build
@ -64,9 +57,7 @@ rsync -azP --info=progress2 \
frontend/public/ \
"$REMOTE:$REMOTE_APP_DIR/frontend/.next/standalone/public/"
if [ "$RESTART" = "--restart" ]; then
echo "==> Restarting DeerFlow on remote host..."
ssh "$REMOTE" "cd '$REMOTE_APP_DIR' && make start"
fi
echo "==> Reloading systemd and restarting deerflow.service on remote host..."
ssh "$REMOTE" "sudo systemctl daemon-reload && sudo systemctl restart deerflow.service"
echo "==> Done."