mirror of
https://github.com/RightNow-AI/openfang.git
synced 2026-07-30 15:01:15 +00:00
community fixes
Fix 12 GitHub issues: SSE streaming token counts (#stream_options), UTF-8 boundary panics (#472), cron timezone scheduling (#473), TOML multiline system_prompt (#463), dashboard 401 auth interceptor (#468), custom provider env var convention (#471), cron stale agent_id reassignment (#461), concurrent provider probing with cache (#474), model switch provider sync (#466/#387), OpenRouter real models (#385), embedding URL normalization (#395), ZHIPU content format (#384), Fish shell PATH detection (#372). 1915 tests pass, 0 clippy warnings.
This commit is contained in:
+12
-8
@@ -145,21 +145,25 @@ install() {
|
||||
*/bash) SHELL_RC="$HOME/.bashrc" ;;
|
||||
*/fish) SHELL_RC="$HOME/.config/fish/config.fish" ;;
|
||||
esac
|
||||
# Also check for config files if shell detection failed
|
||||
# Also check for config files if shell detection failed.
|
||||
# Check bash/zsh first (more common defaults), fish last — avoids
|
||||
# writing to config.fish for users who merely have Fish installed.
|
||||
if [ -z "$SHELL_RC" ]; then
|
||||
if [ -f "$HOME/.config/fish/config.fish" ]; then
|
||||
SHELL_RC="$HOME/.config/fish/config.fish"
|
||||
USER_SHELL="/usr/bin/fish"
|
||||
if [ -f "$HOME/.bashrc" ]; then
|
||||
SHELL_RC="$HOME/.bashrc"
|
||||
elif [ -f "$HOME/.zshrc" ]; then
|
||||
SHELL_RC="$HOME/.zshrc"
|
||||
elif [ -f "$HOME/.bashrc" ]; then
|
||||
SHELL_RC="$HOME/.bashrc"
|
||||
elif [ -f "$HOME/.config/fish/config.fish" ]; then
|
||||
SHELL_RC="$HOME/.config/fish/config.fish"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$SHELL_RC" ] && ! grep -q "openfang" "$SHELL_RC" 2>/dev/null; then
|
||||
case "$USER_SHELL" in
|
||||
*/fish)
|
||||
# Determine syntax from the TARGET FILE, not $USER_SHELL — this
|
||||
# prevents Bash syntax from ever being written to config.fish even
|
||||
# when shell detection mis-identifies the user's shell.
|
||||
case "$SHELL_RC" in
|
||||
*/config.fish)
|
||||
mkdir -p "$(dirname "$SHELL_RC")"
|
||||
echo "fish_add_path \"$INSTALL_DIR\"" >> "$SHELL_RC"
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user