mirror of
https://github.com/aljazceru/goose.git
synced 2026-01-31 12:14:32 +01:00
fix: CPU hogging GUI (#2877)
This commit is contained in:
25
.github/workflows/ci.yml
vendored
25
.github/workflows/ci.yml
vendored
@@ -45,8 +45,19 @@ jobs:
|
||||
/usr/local/share/chromium \
|
||||
/usr/local/share/powershell \
|
||||
/usr/share/dotnet \
|
||||
/usr/share/swift
|
||||
|
||||
/usr/share/swift \
|
||||
/opt/ghc \
|
||||
/opt/hostedtoolcache \
|
||||
/usr/local/graalvm \
|
||||
/usr/local/sqlpackage
|
||||
|
||||
# Clean package manager caches
|
||||
sudo apt-get clean
|
||||
sudo apt-get autoremove -y
|
||||
|
||||
# Clean docker if present
|
||||
docker system prune -af 2>/dev/null || true
|
||||
|
||||
df -h
|
||||
|
||||
- name: Checkout Code
|
||||
@@ -98,16 +109,18 @@ jobs:
|
||||
rm -rf target/debug/deps
|
||||
rm -rf target/debug/build
|
||||
rm -rf target/debug/incremental
|
||||
# Clean cargo cache more aggressively
|
||||
cargo clean || true
|
||||
# Clean npm cache if it exists
|
||||
npm cache clean --force || true
|
||||
npm cache clean --force 2>/dev/null || true
|
||||
# Clean apt cache
|
||||
sudo apt-get clean
|
||||
sudo apt-get autoremove -y
|
||||
# Remove unnecessary large directories
|
||||
rm -rf ~/.cargo/registry/index || true
|
||||
rm -rf ~/.cargo/registry/cache || true
|
||||
# Remove docker images if any
|
||||
docker system prune -af || true
|
||||
# Remove unused packages
|
||||
sudo apt-get autoremove -y || true
|
||||
docker system prune -af 2>/dev/null || true
|
||||
|
||||
- name: Check disk space after cleanup
|
||||
run: df -h
|
||||
|
||||
@@ -280,8 +280,9 @@ function ChatContent({
|
||||
|
||||
// Update chat messages when they change and save to sessionStorage
|
||||
useEffect(() => {
|
||||
setChat({ ...chat, messages });
|
||||
}, [messages, setChat, chat]);
|
||||
// @ts-expect-error - TypeScript being overly strict about the return type
|
||||
setChat((prevChat: ChatType) => ({ ...prevChat, messages }));
|
||||
}, [messages, setChat]);
|
||||
|
||||
useEffect(() => {
|
||||
if (messages.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user