Releases: stevegt/grokker
Releases · stevegt/grokker
v3.0.18
Improve test handling, file ops, and enhance prompts, update version Update test handling, modify file operations, enhance prompts summary of diff --git a/v3/aidda/aidda.go b/v3/aidda/aidda.go - Include test results in the .aidda/test file instead of the prompt file - Add a new variable `testFn` to store the test file directory and name - Ensure creation of an ignore file if it does not exist - Implement logic to either include test results in the prompt or clear the test file based on modification times of the test file and input files - Modify `runTest` function to write test results directly to the test file instead of appending to the prompt file - Adjust `getChanges` function to accept `testResults` as an argument for inclusion in the prompt - Include test results in the prompt if applicable, enhancing the information given to the user Update version in grokker.go from 3.0.17 to 3.0.18 summary of diff --git a/v3/core/grokker.go b/v3/core/grokker.go - Update version from 3.0.17 to 3.0.18 in grokker.go
v3.0.17
v3.0.17: finish adding aidda subcommand - migrate aidda code from https://github.com/stevegt/aidda/tree/main/x/x3 summary of diff --git a/README.md b/README.md - Add a section on Human-in-the-loop AI-driven Development (AIDDA) - Initialize an .aidda subdirectory and .aidda/prompt file with `grok aidda init` - Add a shortcut for git add and commit with `grok aidda commit` - Describe how to read and act on the .aidda/prompt file with `grok aidda prompt` - Recommend using diffview.nvim for reviewing changes before committing - Suggest adding hotkeys for quick iteration of AIDDA commands Comment out the main package and function in aidda3 main.go summary of diff --git a/v3/aidda/cmd/aidda3/main.go b/v3/aidda/cmd/aidda3/main.go - Start a comment block around the main package import and main function definition - Enclose the Go code in the main.go file of the aidda3 command within a multi-line comment, effectively commenting out the entire code block Update version in grokker.go to 3.0.17 summary of diff --git a/v3/core/grokker.go b/v3/core/grokker.go - Update Version from "3.0.16" to "3.0.17" in grokker.go
v3.0.12
v3.0.12: add chat -e (edit) flag, don't remove chat file backup Add edit parameter to Chat, pass to continueChat method summary of diff --git a/v3/core/api.go b/v3/core/api.go - Add 'edit' boolean parameter to `Chat` function signature - Pass 'edit' parameter to `history.continueChat` method call within `Chat` function Refactor chat functionality, enhance edit feature, improve logging summary of diff --git a/v3/core/chat.go b/v3/core/chat.go - Add `time` package to imports - Rename parameter `level` to `contextLevel` in `continueChat` function signature and usage - Introduce `edit` boolean parameter in `continueChat` function to allow editing behavior - Implement prompt retrieval from most recent message if `edit` is true - Append the user's prompt to messages conditionally based on `edit` status - Include error checking and debug logging for `continueChat` execution - Adjust role attribution from "AI" to "USER" in `parseChat` for preamble content - Trim and uppercase `role` in `fixRole` before switching on its value - Adapt backup file naming in `Save` to include a timestamp - Optionally preserve backup file based on a condition check (commented out with XXX marker) Add false parameter to grok.Chat and continueChat calls summary of diff --git a/v3/core/chat_test.go b/v3/core/chat_test.go - Append an additional false parameter to the grok.Chat function call in the test for starting a chat and checking the color of the widget's center - Add a false argument to the continueChat method call in multiple instances to specify a new behavior or flag - Ensure all grok.Chat and history.continueChat function calls within TestChatSummarization consistently include this new false parameter Import go-shlex, add edit flag, implement file editing. summary of diff --git a/v3/core/cli.go b/v3/core/cli.go - Import `github.com/anmitsu/go-shlex` in `v3/core/cli.go` - Add `Edit` boolean field with a short flag `-e` and help text to `cmdChat` struct - Implement feature to open the chat file in `GROKKER_EDITOR` for editing if the `-e` flag is set - Pass `edit` flag to `grok.Chat` function call to possibly incorporate editing logic - Define `EditFile` function to facilitate opening and editing the chat file in the specified editor - Ensure `EditFile` appends a `### USER` heading to the chat file if it's not present at the end before opening in editor - Use `shlex.Split` to correctly split the editor command allowing for commands with spaces Add print statement for temp directory path in TestCliChat summary of diff --git a/v3/core/cli_test.go b/v3/core/cli_test.go - Add print statement to output temporary directory path in TestCliChat function Update version in grokker.go to 3.0.12 summary of diff --git a/v3/core/grokker.go b/v3/core/grokker.go - Update version from 3.0.11 to 3.0.12 in grokker.go Uncomment debug line to print messages with Debug, Spprint summary of diff --git a/v3/core/openai.go b/v3/core/openai.go - Uncomment the debug line to print message contents using `Debug` function and `Spprint` for formatting Add go-shlex, assert/v2, and repr as dependencies summary of diff --git a/v3/go.mod b/v3/go.mod - Add `github.com/anmitsu/go-shlex` dependency with version `v0.0.0-20200514113438-38f4b401e2be` - Include `github.com/alecthomas/assert/v2` as an indirect dependency with version `v2.3.0` - Include `github.com/alecthomas/repr` as an indirect dependency with version `v0.2.0` Update assert and repr, add go-shlex with go.mod files summary of diff --git a/v3/go.sum b/v3/go.sum - Update github.com/alecthomas/assert from v2.1.0 to v2.3.0 - Add go.mod for github.com/alecthomas/assert v2.3.0 - Update github.com/alecthomas/repr from v0.1.0 to v0.2.0 - Add go.mod for github.com/alecthomas/repr v0.2.0 - Add github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be - Add go.mod for github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be
v3.0.11
v3.0.11: fix version upgrade bug - use newer version of semver -- old version was sorting lexically instead of numerically Refactor version comparison, check errors, maintain logic summary of diff --git a/v3/core/api.go b/v3/core/api.go - Extract version comparison operation into a separate line to obtain result and error - Check for errors after comparing versions with semver.Cmp - Keep existing logic to append paths based on version comparison results Enhance commit to allow custom git diff arguments summary of diff --git a/v3/core/cli.go b/v3/core/cli.go - Add `Diffargs` field to `cmdCommit` struct to allow passing of custom arguments to `git diff` - Modify `commitMessage` function to accept variable arguments for `git diff` - Set default `git diff` arguments to `--staged` if no arguments provided by user - Update `Cli` function to handle `commit` command with customizable `git diff` arguments - Ensure `commit` and `commit <diffargs>` commands fall through to the same case, enabling argument passing Update Tassert error message to include stdout and stderr summary of diff --git a/v3/core/cli_test.go b/v3/core/cli_test.go - Update the error message in `Tassert` to include `stdout` and `stderr` information for better debugging insight Ensure CLI output matches expectations with stdout.String() summary of diff --git ") - Assert that the CLI returns the expected output based on stdout.String() Update version in grokker.go from 3.0.10 to 3.0.11 summary of diff --git a/v3/core/grokker.go b/v3/core/grokker.go - Update version from 3.0.10 to 3.0.11 in grokker.go Refactor semver checks and error handling in migrate.go summary of diff --git a/v3/core/migrate.go b/v3/core/migrate.go - Extract comparison of `dbver` and `codever` into a separate variable `cmp` to avoid calling `semver.Cmp()` twice - Check for errors immediately after calling `semver.Cmp()` - Update the check for database version newer than code to use the `cmp` variable - Expand the call to `semver.Upgrade()` to include an error check and adapt it to an updated function signature that returns four values instead of three Prefix ./ to grok in TestMigration_2_1_2; add TestMigration_3_0_10 test. summary of diff --git a/v3/core/migration_test.go b/v3/core/migration_test.go - Prefix "./" to the "grok" command in the calls within `TestMigration_2_1_2` test function to ensure correct executable path - Introduce a new test function `TestMigration_3_0_10` to verify integer ordering works as expected across upgrades - In `TestMigration_3_0_10`, add steps to build "grok" for versions "v3.0.9" and "v3.0.10" and execute "ls" command to trigger version upgrade process Update go-openai, relocate stevegt/semver with new version summary of diff --git a/v3/go.mod b/v3/go.mod - Update github.com/sashabaranov/go-openai from v1.9.0 to v1.19.1 - Remove github.com/stevegt/semver version 92220054a49f from the first require block - Add github.com/stevegt/semver version 5913d1a31c26 to the second require block Update stevegt/semver to new version, replace hashes summary of diff --git a/v3/go.sum b/v3/go.sum - Update github.com/stevegt/semver to version v0.0.0-20240217000820-5913d1a31c26 - Replace previous hashes for github.com/stevegt/semver with new ones reflecting the update
v3.0.10
v3.0.10: fix embedding token length bug - was erroneously comparing token length to byte count in an assert Break query into chunks, create embeddings, find similar chunks summary of diff --git a/v3/core/chunk.go b/v3/core/chunk.go - Break the query into chunks using `chunksFromString` instead of directly creating embeddings from the query - Append each chunk's text to `queryStrings` array for embedding - Create embeddings from the `queryStrings` array - Check if the `embeddings` array is empty and return if true - Calculate the average of the embeddings using `util.MeanVector` - Use the averaged embedding to find the most similar chunks Add comments to improve Cli, reference gitea/tea, consider urfave summary of diff --git a/v3/core/cli.go b/v3/core/cli.go - Add comments to the Cli function noting potential improvements by referencing gitea/tea's approach and considering the use of urfave over kong Import envi, add token count checks, enhance debugging summary of diff --git a/v3/core/document.go b/v3/core/document.go - Import `github.com/stevegt/envi` to use environment variables - Add checks to verify chunk text length using token count before setting chunks and for new chunks - Assert that token count is below `g.embeddingTokenLimit` for both existing chunks and new chunks to prevent exceeding limits - Utilize `envi.Bool` to conditionally perform debug checks based on the `DEBUG` environment variable being set - Enhance debugging by ensuring chunk token counts do not exceed defined limits Update grokker.go version from 3.0.9 to 3.0.10 summary of diff --git a/v3/core/grokker.go b/v3/core/grokker.go - Update version from 3.0.9 to 3.0.10 in grokker.go Remove comments and enable debug logging in createEmbeddings summary of diff --git a/v3/core/openai.go b/v3/core/openai.go - Remove unnecessary comments about exceeding max tokens in `createEmbeddings` function - Enable debug logging for creating embeddings for each text chunk in `createEmbeddings` function Move go-diff to own block; add envi v0.2.0 to require block summary of diff --git a/v3/go.mod b/v3/go.mod - Move `github.com/sergi/go-diff v1.3.1` into its own require block - Add `github.com/stevegt/envi v0.2.0` to the require block Add envi v0.2.0 and goadapt v0.0.13 module info to go.sum summary of diff --git a/v3/go.sum b/v3/go.sum - Add github.com/stevegt/envi v0.2.0 checksum and module information - Add github.com/stevegt/goadapt v0.0.13 module information
v3.0.9
v3.0.9: Update artifact path to v3/release Update artifact path to v3/release/ and set release files path summary of diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml - Update path in upload-artifact action to use `v3/release/` - Specify `v3/release/*` as the files path in action-gh-release settings Update grokker.go version to 3.0.9 summary of diff --git a/v3/core/grokker.go b/v3/core/grokker.go - Update version from 3.0.8 to 3.0.9 in `grokker.go`