Skip to content
Open
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
37 changes: 31 additions & 6 deletions chatbot/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ const homeStarters = [
icon: "workflow",
tone: "green",
title: "选用 LOOP 与角色",
description: "了解产品、前端、后端三套交付 LOOP 和其中的角色,按需求推荐一套。",
description: "了解产品、前端与后端交付 LOOP 及角色分工,按场景推荐模板。",
steps: ["产品", "前端", "后端"],
prompt:
"我准备写需求了。平台内置的产品、前端、后端交付 LOOP 分别适合什么场景、好在哪里、里面有哪些角色?请结合当前项目推荐一套,并告诉我怎么绑定和派发第一条需求。我的需求是:",
Expand Down Expand Up @@ -456,6 +456,8 @@ export default function App() {
const [sidebar, setSidebar] = useState(
() => sidebarViewport().matchMedia("(min-width:1001px)").matches,
);
const sidebarOpenRef = useRef(sidebar);
sidebarOpenRef.current = sidebar;
const [panel, setPanel] = useState(false),
[panelView, setPanelView] = useState("artifacts"),
[artifactUnread, setArtifactUnread] = useState(0),
Expand Down Expand Up @@ -718,6 +720,19 @@ export default function App() {
useEffect(() => {
const wide = sidebarViewport().matchMedia("(min-width:1001px)");
const apply = () => setSidebarWidth(readSidebarWidth());
// Narrowing below the desktop breakpoint hides the sidebar; widening again
// restores what the desktop layout showed before (open after a narrow load).
let desktopOpen = null;
const onBreakpoint = () => {
apply();
if (!wide.matches) {
desktopOpen = sidebarOpenRef.current;
setSidebar(false);
} else {
setSidebar(desktopOpen ?? true);
desktopOpen = null;
}
};
const onStorage = (event) => {
if (
!event.key ||
Expand All @@ -726,10 +741,10 @@ export default function App() {
) apply();
};
apply();
wide.addEventListener("change", apply);
wide.addEventListener("change", onBreakpoint);
window.addEventListener("storage", onStorage);
return () => {
wide.removeEventListener("change", apply);
wide.removeEventListener("change", onBreakpoint);
window.removeEventListener("storage", onStorage);
};
}, []);
Expand Down Expand Up @@ -2032,7 +2047,11 @@ export default function App() {
) : (
<div className="empty-session-list">
<p className="end-label">
{chat.ready ? "还没有定时任务会话" : "正在连接…"}
{chat.user?.isGuest
? "登录后查看历史会话"
: chat.ready
? "还没有定时任务会话"
: "正在连接…"}
</p>
</div>
)
Expand Down Expand Up @@ -2065,7 +2084,11 @@ export default function App() {
) : (
<div className="empty-session-list">
<p className="end-label">
{chat.ready ? "还没有定时任务会话" : "正在连接…"}
{chat.user?.isGuest
? "登录后查看历史会话"
: chat.ready
? "还没有定时任务会话"
: "正在连接…"}
</p>
</div>
)}
Expand Down Expand Up @@ -2164,7 +2187,9 @@ export default function App() {
!sidebarSections.groups.length ? (
<div className="empty-session-list">
<p className="end-label">
{chat.ready
{chat.user?.isGuest
? "登录后查看历史会话"
: chat.ready
? archived
? "还没有归档会话"
: mineOnly
Expand Down
16 changes: 9 additions & 7 deletions chatbot/src/ExecutionMachinePicker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ export default function ExecutionMachinePicker({ chat, onManage }) {
const machine = chat.machines?.find((row) => row.id === runnerId);
const known = locked ? !!execution : chat.machinesReady;
const loadError = locked ? "" : chat.machineError;
const label = !known
? loadError
? "执行机器加载失败"
: "加载执行机器…"
: runnerId
? machine?.name || runnerId
: "LoopForge 云端";
const label = !chat.user || chat.user.isGuest
? "登录后选择机器"
: !known
? loadError
? "执行机器加载失败"
: "加载执行机器…"
: runnerId
? machine?.name || runnerId
: "LoopForge 云端";
const online =
known &&
(runnerId
Expand Down
3 changes: 2 additions & 1 deletion chatbot/src/artifact-panel.css
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@
box-shadow: none;
}
.chat-shell .artifact-panel .artifact-row.is-selected {
background: var(--artifact-row-active);
background: color-mix(in srgb, var(--accent) 8%, transparent);
box-shadow: inset 3px 0 0 var(--accent);
}
.chat-shell .artifact-panel .artifact-row.is-selected::before {
position: absolute;
Expand Down
12 changes: 7 additions & 5 deletions chatbot/src/composer-context.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@
display: flex;
align-items: center;
gap: 8px;
height: 42px;
min-height: 40px;
height: auto;
min-width: 0;
margin: 0 14px -3px;
padding: 4px 10px 7px;
border: 0;
border-radius: 16px 16px 0 0;
margin: 0 12px 0;
padding: 6px 12px 8px;
border: 1px solid var(--line);
border-bottom: 0;
border-radius: 14px 14px 0 0;
background: var(--subtle);
}

Expand Down
46 changes: 15 additions & 31 deletions chatbot/src/home-welcome.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,18 @@
.chat-shell.home-shell .home-welcome .home-welcome-title {
position: relative;
margin: 0;
color: var(--text);
color: var(--home-ink, var(--text));
font-size: 36px;
font-weight: 600;
font-weight: 650;
line-height: 1.2;
letter-spacing: -1px;
letter-spacing: -0.03em;
white-space: nowrap;
}

.home-welcome-title-ink {
display: block;
clip-path: inset(0 -1px);
animation: home-welcome-title-reveal calc(1120ms * var(--home-intro-tempo, .45)) calc(1480ms * var(--home-intro-tempo, .45)) linear both;
color: var(--home-ink, var(--text));
animation: home-welcome-title-reveal calc(700ms * var(--home-intro-tempo, .45)) 120ms var(--home-ease, cubic-bezier(0.22, 1, 0.36, 1)) both;
}

.home-welcome-title-light {
Expand Down Expand Up @@ -137,7 +137,7 @@

.chat-shell.home-shell .home-welcome-subtitle {
margin: 0;
color: var(--muted);
color: var(--home-secondary, var(--muted));
font-size: 16px;
font-weight: 400;
line-height: 1.75;
Expand All @@ -163,37 +163,21 @@

.home-welcome-subtitle-text {
display: inline-block;
/* A soft advancing edge reveals strokes continuously, without letter jumps. */
-webkit-mask-image: linear-gradient(to right, #000 calc(50% - 12px), transparent calc(50% + 12px));
mask-image: linear-gradient(to right, #000 calc(50% - 12px), transparent calc(50% + 12px));
-webkit-mask-size: calc(200% + 24px) 100%;
mask-size: calc(200% + 24px) 100%;
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
-webkit-mask-position: 0% 0;
mask-position: 0% 0;
animation: home-welcome-type calc(760ms * var(--home-intro-tempo, .45)) calc(2750ms * var(--home-intro-tempo, .45)) cubic-bezier(.22, .61, .36, 1) both;
animation: home-welcome-subtitle-fade 320ms 80ms cubic-bezier(.16, 1, .3, 1) both;
}

.home-welcome-caret {
position: absolute;
top: 20%;
left: 100%;
width: 1.5px;
height: 60%;
margin-left: 2px;
border-radius: 1px;
background: currentColor;
opacity: 0;
pointer-events: none;
animation:
home-welcome-caret-travel calc(760ms * var(--home-intro-tempo, .45)) calc(2750ms * var(--home-intro-tempo, .45)) cubic-bezier(.22, .61, .36, 1) both,
home-welcome-caret-fade calc(1200ms * var(--home-intro-tempo, .45)) calc(2750ms * var(--home-intro-tempo, .45)) linear both;
display: none;
}

@keyframes home-welcome-subtitle-fade {
from { opacity: 0; transform: translateY(3px); }
to { opacity: 1; transform: none; }
}

@keyframes home-welcome-title-reveal {
from { clip-path: inset(0 100% 0 -1px); }
to { clip-path: inset(0 -1px); }
from { opacity: 0.15; }
to { opacity: 1; }
}

@keyframes home-welcome-title-light {
Expand Down
Loading
Loading