Skip to content

Commit ac5f9d1

Browse files
Merge pull request #43 from gitcoder89431/33-implement-query-gating-for-provider-validation
refactor: Simplify state transition logic in App implementation
2 parents 92254d9 + 2fbd8eb commit ac5f9d1

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

scripts/pre-commit.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
# Pre-commit quality checks for Agentic
3+
4+
echo "🔍 Running pre-commit checks..."
5+
6+
echo "📦 Building project..."
7+
cargo build || exit 1
8+
9+
echo "🎨 Checking formatting..."
10+
cargo fmt --check || exit 1
11+
12+
echo "📋 Running clippy lints..."
13+
cargo clippy -- -D warnings || exit 1
14+
15+
echo "🧪 Running tests..."
16+
cargo test || exit 1
17+
18+
echo "✅ All checks passed!"

src/ui/app.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -537,10 +537,8 @@ impl App {
537537
if self.state == AppState::Main {
538538
self.state = AppState::WaitingForConfig;
539539
}
540-
} else {
541-
if self.state == AppState::WaitingForConfig {
542-
self.state = AppState::Main;
543-
}
540+
} else if self.state == AppState::WaitingForConfig {
541+
self.state = AppState::Main;
544542
}
545543
}
546544

0 commit comments

Comments
 (0)