diff --git a/functions/gemini-resume.fish b/functions/gemini-resume.fish deleted file mode 100644 index d30f967..0000000 --- a/functions/gemini-resume.fish +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (C) 2026 Rootiest -# SPDX-License-Identifier: AGPL-3.0-or-later - -# Execute gemini-resume -function gemini-resume --description 'Execute gemini-resume' - if not type -q gemini-cli - echo "Error: The 'gemini-cli' command is not installed or not in PATH." >&2 - return 1 - end - if not type -q save_gemini_session - echo "Error: The companion function 'save_gemini_session' is missing." >&2 - return 1 - end - - if test -f .gemini_session - set -l sid (cat .gemini_session) - # Use --resume (or -r) to jump back in - gemini --resume $sid - else - # Fallback to the interactive session browser - gemini --resume - end -end diff --git a/functions/save_gemini_session.fish b/functions/save_gemini_session.fish deleted file mode 100755 index 638b3a1..0000000 --- a/functions/save_gemini_session.fish +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env fish - -# Copyright (C) 2026 Rootiest -# SPDX-License-Identifier: AGPL-3.0-or-later - -# 1. Read the JSON from stdin -set -l input (cat) - -# 2. Extract session_id using Python -set -l sid (echo $input | python3 -c "import sys,json; print(json.load(sys.stdin).get('session_id', ''))") -set -l session_file ".gemini_session" - -if test -n "$sid" - # 3. Save the session ID locally - echo "$sid" >$session_file - - # 4. Smart .gitignore check - # We only attempt this if we are inside a Git repository - if git rev-parse --is-inside-work-tree >/dev/null 2>&1 - # If 'git check-ignore' fails, it means the file is NOT currently ignored - if not git check-ignore -q $session_file - # Append a labeled entry to .gitignore - echo -e "\n# AI Session IDs\n$session_file" >>.gitignore - end - end - - # 5. Update universal variable for cross-terminal access - set -U LAST_GEMINI_SESSION "$sid" -end - -# MANDATORY: Every hook must output valid JSON or an empty object -echo '{}'