File tree Expand file tree Collapse file tree 1 file changed +13
-15
lines changed
registry/coder-labs/modules/copilot/scripts Expand file tree Collapse file tree 1 file changed +13
-15
lines changed Original file line number Diff line number Diff line change @@ -70,21 +70,19 @@ build_copilot_args() {
7070
7171check_existing_session () {
7272 if [ " $ARG_RESUME_SESSION " = " true" ]; then
73- if copilot --help > /dev/null 2>&1 ; then
74- local session_dir=" $HOME /.copilot/history-session-state"
75- if [ -d " $session_dir " ] && [ -n " $( ls " $session_dir " /session_* _* .json 2> /dev/null) " ]; then
76- local latest_session_file
77- latest_session_file=$( ls " $session_dir " /session_* _* .json 2> /dev/null | sort -t_ -k3 -n -r | head -n 1)
78-
79- if [ -n " $latest_session_file " ]; then
80- local session_id
81- session_id=$( basename " $latest_session_file " | sed ' s/session_\(.*\)_[0-9]*.json/\1/' )
82-
83- if [ -n " $session_id " ]; then
84- echo " Found existing Copilot sessions. Will resume latest: $session_id " >&2
85- echo " $session_id "
86- return 0
87- fi
73+ local session_dir=" $HOME /.copilot/history-session-state"
74+ if [ -d " $session_dir " ] && [ -n " $( ls " $session_dir " /session_* _* .json 2> /dev/null) " ]; then
75+ local latest_session_file
76+ latest_session_file=$( ls " $session_dir " /session_* _* .json 2> /dev/null | sort -t_ -k3 -n -r | head -n 1)
77+
78+ if [ -n " $latest_session_file " ]; then
79+ local session_id
80+ session_id=$( basename " $latest_session_file " | sed ' s/session_\(.*\)_[0-9]*.json/\1/' )
81+
82+ if [ -n " $session_id " ]; then
83+ echo " Found existing Copilot sessions. Will resume latest: $session_id " >&2
84+ echo " $session_id "
85+ return 0
8886 fi
8987 fi
9088 fi
You can’t perform that action at this time.
0 commit comments