chore(ai): remove old gemini-resume and save_gemini_session files
Completes the rename started in the previous commit; these files were superseded by antigravity-resume and save_antigravity_session.
This commit is contained in:
@@ -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
|
||||
@@ -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 '{}'
|
||||
Reference in New Issue
Block a user