Skip to content

Commit 6cd358f

Browse files
committed
new line
1 parent f9447ee commit 6cd358f

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

app/page.tsx

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,12 @@ const TaskDisplay = ({ traceData, activeIndex = 0, darkMode = true }: { traceDat
6161
export default function Home() {
6262
const [allTraceData, setAllTraceData] = useState<TraceData[]>([]);
6363
const [traceIds, setTraceIds] = useState<string[]>([]);
64-
const [darkMode, setDarkMode] = useState(true);
64+
// 根据本地时间自动设置主题,7:00-19:00为日间模式,其余为夜间模式
65+
const getDefaultDarkMode = () => {
66+
const hour = new Date().getHours();
67+
return hour < 7 || hour >= 19;
68+
};
69+
const [darkMode, setDarkMode] = useState(getDefaultDarkMode());
6570
const [activeTraceIndex, setActiveTraceIndex] = useState(0);
6671

6772
useEffect(() => {
@@ -544,20 +549,20 @@ export default function Home() {
544549

545550
{/* Connectors */}
546551
{/* Human to CUA */}
547-
<path d="M130 275 H180" stroke={darkMode ? "#94a3b8" : "#60a5fa"} strokeWidth="2" />
552+
<path d="M130 275 H180" stroke={darkMode ? "#94a3b8" : "#60a5fa"} strokeWidth="2" fill="none" />
548553

549554
{/* CUA to OS Agents */}
550-
<path d="M320 255 Q335 255 350 130 L385 130" stroke={darkMode ? "#94a3b8" : "#60a5fa"} strokeWidth="2" />
551-
<path d="M320 275 Q335 275 350 275 L385 275" stroke={darkMode ? "#94a3b8" : "#60a5fa"} strokeWidth="2" strokeDasharray="4,4" />
552-
<path d="M320 295 Q335 295 350 420 L385 420" stroke={darkMode ? "#94a3b8" : "#60a5fa"} strokeWidth="2" strokeDasharray="4,4" />
555+
<path d="M320 255 Q335 255 350 130 L385 130" stroke={darkMode ? "#94a3b8" : "#60a5fa"} strokeWidth="2" fill="none" />
556+
<path d="M320 275 Q335 275 350 275 L385 275" stroke={darkMode ? "#94a3b8" : "#60a5fa"} strokeWidth="2" strokeDasharray="4,4" fill="none" />
557+
<path d="M320 295 Q335 295 350 420 L385 420" stroke={darkMode ? "#94a3b8" : "#60a5fa"} strokeWidth="2" strokeDasharray="4,4" fill="none" />
553558

554559
{/* MacAgent to App Categories */}
555-
<path d="M515 110 C540 110 560 92 585 92" stroke={darkMode ? "#818cf8" : "#6366f1"} strokeWidth="1.5" />
556-
<path d="M515 130 C540 130 560 187 585 187" stroke={darkMode ? "#818cf8" : "#6366f1"} strokeWidth="1.5" />
557-
<path d="M515 150 C540 150 560 295 585 295" stroke={darkMode ? "#818cf8" : "#6366f1"} strokeWidth="1.5" />
560+
<path d="M515 110 C540 110 560 92 585 92" stroke={darkMode ? "#818cf8" : "#a5b4fc"} strokeWidth="1.5" fill="none" />
561+
<path d="M515 130 C540 130 560 187 585 187" stroke={darkMode ? "#818cf8" : "#a5b4fc"} strokeWidth="1.5" fill="none" />
562+
<path d="M515 150 C540 150 560 295 585 295" stroke={darkMode ? "#818cf8" : "#a5b4fc"} strokeWidth="1.5" fill="none" />
558563

559564
{/* iOSAgent to App Categories */}
560-
<path d="M515 420 C540 420 560 420 585 420" stroke={darkMode ? "#818cf8" : "#6366f1"} strokeWidth="1.5" strokeDasharray="4,4" />
565+
<path d="M515 420 C540 420 560 420 585 420" stroke={darkMode ? "#818cf8" : "#a5b4fc"} strokeWidth="1.5" strokeDasharray="4,4" fill="none" />
561566

562567
{/* Level Labels */}
563568
<text x="250" y="520" textAnchor="middle"

src/data/trace2.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"timeRange": {
1111
"start": 0,
1212
"end": 3
13-
}
13+
},
14+
"agent_name": "Calendar Agent"
1415
},
1516
{
1617
"timestamp": "2024-03-20T10:02:30Z",

0 commit comments

Comments
 (0)