vet/version.go
Abhisek Datta 5f4cccbc85
feat: Add Support for Agentic Query and Analysis (#535)
* Add initial UI for agent mode

* fix: Cleanup and define agent contract

* Add react agent

* Add interactions memory

* Add support for stdio based MCP integration

* Add basic sqlite3 report generator

* fix: Persist vulnerabilities with package relation

* fix: Persist license information

* refactor: Agents into its own command package

* feat: Add support for tool calling introspection

* refactor: UI to hide implementation detail

* sqlite3 reporter persist dependency graph

* fix: Support multiple LLM provider for agent

* docs: Update agents doc

* docs: Remove deprecated query docs

* fix: UI tests

* fix: Linter issue

* Add support for prompt mode

* Improve UI with animation

* Fix UI tests after update

* Add OpenSSF scorecard persistence

* Add slsa provenances in sqlite3 reporter

* Add test cases for sqlite3 reporter

* Fix agent doc

* fix: Sqlite3 reporter use safe accessors

* feat: Add support for fast model

* feat: Simplify and streamline agent UI for better user experience

- Remove decorative borders and excessive styling to maximize output area
- Implement clean minimal design similar to modern TUI interfaces
- Add bordered input area for clear visual separation
- Move thinking indicator above input area for better visibility
- Enhance input field reset logic for proper line alignment
- Remove verbose help text and status messages
- Optimize layout calculations for full width utilization
- Add smooth animations for agent thinking state with spinner
- Clean up code structure and remove unused progress bar functionality

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Improve agent status line

* test: Update UI tests

* fix: Use terminal safe rendering

* fix: Fix nil deref without storing empty strings in DB

* fix: Support overwriting sqlite3 database

* fix: Data model to use m2m between manifest and package

* style: Fix linter issue with unused variables

* Misc fixes

* Add test for agent memory

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-07-11 18:37:44 +05:30

45 lines
1010 B
Go

package main
import (
"fmt"
"os"
runtimeDebug "runtime/debug"
"github.com/safedep/vet/internal/command"
"github.com/spf13/cobra"
)
// When building with CI or Make, version is set using `ldflags`
var (
version string
commit string
)
func init() {
// Only use buildInfo if version wasn't set by ldflags, that is its being build by `go install`
if version == "" {
// Main.Version is based on the version control system tag or commit.
// This useful when app is build with `go install`
// See: https://antonz.org/go-1-24/#main-modules-version
buildInfo, _ := runtimeDebug.ReadBuildInfo()
version = buildInfo.Main.Version
}
command.SetVersion(version)
}
func newVersionCommand() *cobra.Command {
cmd := &cobra.Command{
Use: "version",
Short: "Show version and build information",
RunE: func(cmd *cobra.Command, args []string) error {
fmt.Fprintf(os.Stdout, "Version: %s\n", version)
fmt.Fprintf(os.Stdout, "CommitSHA: %s\n", commit)
return nil
},
}
return cmd
}