Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

fix: show git branch in path_line, rename binary back to jan

tikikun91b0c7e36d64
diff --git a/build-tui.sh b/build-tui.sh
index 2daaeb39c..95ce9bd1b 100755
--- a/build-tui.sh
+++ b/build-tui.sh
@@ -16,7 +16,7 @@ set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
CRATE_DIR="$SCRIPT_DIR/src-tauri"
INSTALL_DIR="${HOME}/.local/bin"
-BIN_NAME="jan-agent"
+BIN_NAME="jan"
# Ensure install dir exists
mkdir -p "$INSTALL_DIR"
diff --git a/src-tauri/src/core/cli/tui.rs b/src-tauri/src/core/cli/tui.rs
index 2d02cd528..3b9db9315 100644
--- a/src-tauri/src/core/cli/tui.rs
+++ b/src-tauri/src/core/cli/tui.rs
@@ -4412,16 +4412,17 @@ fn hint_spans(key_style: Style, pairs: &[(&str, &str)]) -> Vec<Span<'static>> {
/// One-line path display shown below the input box.
fn path_line(app: &App) -> Paragraph<'static> {
let path = app.project_root.to_string_lossy();
- let git = app
- .git_branch
- .as_ref()
- .map(|b| format!(" βŽ‡ {}", b))
- .unwrap_or_default();
- Paragraph::new(Line::from(vec![
+ let mut spans = vec![
Span::styled("πŸ“‚ ", Style::new().dark_gray()),
Span::styled(path.to_string(), Style::new().dark_gray()),
- Span::styled(git, Style::new().dark_gray()),
- ]))
+ ];
+ if let Some(branch) = app.git_branch.as_ref() {
+ spans.push(Span::styled(
+ format!(" βŽ‡ {}", branch),
+ Style::new().dark_gray(),
+ ));
+ }
+ Paragraph::new(Line::from(spans))
}
fn footer(app: &App) -> Paragraph<'static> {