Initial Commit
This commit is contained in:
commit
c34eb49184
20
naive-prompt.sh
Executable file
20
naive-prompt.sh
Executable file
|
|
@ -0,0 +1,20 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# List all files in the git repository excluding .gitignore and LICENSE files
|
||||||
|
FILES=$(git ls-files --exclude='\.gitignore' --exclude='LICENSE')
|
||||||
|
|
||||||
|
# Print a heading indicating that the following is a list of files and their contents
|
||||||
|
echo -e "The following is a list of files and their contents. Use these files for context in answering any questions.\n"
|
||||||
|
|
||||||
|
# Loop through all the files listed by git ls-files command
|
||||||
|
for file in $FILES; do
|
||||||
|
# Print the filename followed by a colon and newline
|
||||||
|
echo -e "${file}:\n\`\`\`"
|
||||||
|
# Read the contents of the file, outputting each line prefixed by a tab character
|
||||||
|
cat $file
|
||||||
|
# Print an extra newline for separation between files
|
||||||
|
echo -e "\`\`\`"
|
||||||
|
done
|
||||||
|
|
||||||
|
# Print a footer indicating that the context has ended
|
||||||
|
echo -e "End Context\n-----------"
|
||||||
10
repo-size.sh
Executable file
10
repo-size.sh
Executable file
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
COUNTS=$(git ls-files --exclude='\.gitignore' --exclude='LICENSE' | xargs wc | tail -n 1)
|
||||||
|
WORDS=$(echo $COUNTS | awk '{print $2}')
|
||||||
|
BYTES=$(echo $COUNTS | awk '{print $3}')
|
||||||
|
TOKENS=($((WORDS / 4)))
|
||||||
|
|
||||||
|
echo "words in repo: $WORDS"
|
||||||
|
echo "bytes in repo: $BYTES"
|
||||||
|
echo "tokens in repo (~words / 4): $TOKENS"
|
||||||
Loading…
Reference in a new issue