Documentation
¶
Overview ¶
editdirCmd refactor source code using the given template in the given directory. templates available: Add documentation to code (documentation), Refactor code (refactor), Add Unit Tests (unittest), Mermaid (mermaid)". The command takes two arguments. The first argument is the template name, and the second argument is the directory path. It lists all files in the directory, sets some configurations, and runs the refactoring command using the provided template. It also includes some user interface operations such as showing the updated files, handling panics, and logging.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var CV100 = `` /* 5618-byte string literal not displayed */
MIT License
Copyright (c) 2018 Conventional Changelog ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
var ResetCmd = &cobra.Command{ Use: "reset", Short: "Resetting embeddings and other files", Run: func(cmd *cobra.Command, args []string) { tzapDataFilesToDelete := []string{ "embeddingsCache.db", "fileembeddings.db", "filesTimestamps.db", } for _, file := range tzapDataFilesToDelete { filePath := path.Join(".tzap-data/", file) if _, err := os.Stat(filePath); os.IsNotExist(err) { println("Ignored - File " + file + " does not exist") continue } err := os.Remove(filePath) if err != nil { println("Error deleting file " + filePath) continue } println("Deleted " + filePath) } }, }
var RootCmd = &cobra.Command{ Use: "tzap [your request]", Short: "Just use Tzap for that!", Long: `Run tzap with 'tzap [your request]', which is alias for tzap router [your request]'. Or run specific commands like tzap prompt, commit, refactor and search.`, PersistentPreRunE: preRun, Args: cobra.MinimumNArgs(0), Run: routerCmd.Run, }
Functions ¶
func GetZipUrlFromGithubUrl ¶
func RequestChat ¶
RequestChat is a workflow that requests a chat from ChatGPT.
Types ¶
This section is empty.