MCPcopy Create free account
hub / github.com/SteffMet/tabby-vscode-agent / getSetupScript

Method getSetupScript

src/tools/shell-strategy.ts:59–62  ·  view source on GitHub ↗
(startMarker: string, endMarker: string)

Source from the content-addressed store, hash-verified

57 }
58
59 getSetupScript(startMarker: string, endMarker: string): string {
60 const cleanup = this.getCleanupScript();
61 return `__TM=0; function __tc() { ${cleanup} }; function __tpc() { if [[ $__TM -eq 0 ]]; then local e=$?; local c=$(HISTTIMEFORMAT='' history 1 | awk '{$1=""; print substr($0,2)}'); if [[ "$c" == *"${startMarker}"* ]]; then __TM=1; echo "${endMarker}"; echo "exit_code: $e"; __tc; fi; fi }; trap - DEBUG 2>/dev/null; PROMPT_COMMAND=$(echo "$PROMPT_COMMAND" | sed 's/__tpc;//g'); PROMPT_COMMAND="__tpc;$PROMPT_COMMAND"`;
62 }
63}
64
65/**

Callers

nothing calls this directly

Calls 1

getCleanupScriptMethod · 0.95

Tested by

no test coverage detected