-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
35: several improvements on packer, rag and ask packages
- Loading branch information
Showing
9 changed files
with
214 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ import ( | |
|
||
type Ask struct { | ||
api *ollama.Client | ||
user string | ||
version string | ||
model string | ||
style string | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,101 @@ | ||
package internal | ||
|
||
import ( | ||
"path/filepath" | ||
|
||
"github.com/bmatcuk/doublestar/v4" | ||
) | ||
var defaultIgnoreList = []string{ | ||
".git/**", | ||
".hg/**", | ||
".hgignore", | ||
".svn/**", | ||
"node_modules/**", | ||
"**/node_modules/**", | ||
"bower_components/**", | ||
"**/bower_components/**", | ||
"jspm_packages/**", | ||
"**/jspm_packages/**", | ||
"vendor/**", | ||
".bundle/**", | ||
".gradle/**", | ||
"target/**", | ||
"logs/**", | ||
"**/*.log", | ||
"**/npm-debug.log*", | ||
"**/yarn-debug.log*", | ||
"**/yarn-error.log*", | ||
"pids/**", | ||
"*.pid", | ||
"*.seed", | ||
"*.pid.lock", | ||
"lib-cov/**", | ||
"coverage/**", | ||
".nyc_output/**", | ||
".grunt/**", | ||
".lock-wscript", | ||
"build/Release/**", | ||
"typings/**", | ||
"**/.npm/**", | ||
".eslintcache", | ||
".rollup.cache/**", | ||
".webpack.cache/**", | ||
".parcel-cache/**", | ||
".sass-cache/**", | ||
"*.cache", | ||
".node_repl_history", | ||
"*.tgz", | ||
"**/.yarn/**", | ||
"**/.yarn-integrity", | ||
".env", | ||
".next/**", | ||
".nuxt/**", | ||
".vuepress/dist/**", | ||
".serverless/**", | ||
".fusebox/**", | ||
".dynamodb/**", | ||
"dist/**", | ||
"**/.DS_Store", | ||
"**/Thumbs.db", | ||
".idea/**", | ||
".vscode/**", | ||
"**/*.swp", | ||
"**/*.swo", | ||
"**/*.swn", | ||
"**/*.bak", | ||
"build/**", | ||
"out/**", | ||
"tmp/**", | ||
"temp/**", | ||
"repomix-output.*", | ||
"repopack-output.*", | ||
"**/package-lock.json", | ||
"**/yarn-error.log", | ||
"**/yarn.lock", | ||
"**/pnpm-lock.yaml", | ||
"**/bun.lockb", | ||
"**/__pycache__/**", | ||
"**/*.py[cod]", | ||
"**/venv/**", | ||
"**/.venv/**", | ||
"**/.pytest_cache/**", | ||
"**/.mypy_cache/**", | ||
"**/.ipynb_checkpoints/**", | ||
"**/Pipfile.lock", | ||
"**/poetry.lock", | ||
"**/Cargo.lock", | ||
"**/Cargo.toml.orig", | ||
"**/target/**", | ||
"**/*.rs.bk", | ||
"**/composer.lock", | ||
"**/Gemfile.lock", | ||
"**/go.sum", | ||
"**/mix.lock", | ||
"**/stack.yaml.lock", | ||
"**/cabal.project.freeze", | ||
} | ||
|
||
// shouldExclude returns true if the file path matches any of the exclude patterns. | ||
func shouldExclude(path string, patterns []string) bool { | ||
for _, pattern := range patterns { | ||
if match, _ := doublestar.Match(pattern, filepath.ToSlash(path)); match { | ||
return true | ||
} | ||
} | ||
return false | ||
} | ||
// func shouldExclude(path string, patterns []string) bool { | ||
// for _, pattern := range patterns { | ||
// if match, _ := doublestar.Match(pattern, filepath.ToSlash(path)); match { | ||
// return true | ||
// } | ||
// } | ||
// return false | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.