Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cmd/ask.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ func runAsk(cmd *cobra.Command, args []string) error {
return printJSON(result)
}

ui.RenderAskResult(result, viper.GetBool("verbose"))
if !isQuiet() {
ui.RenderAskResult(result, viper.GetBool("verbose"))
}
return nil
}
34 changes: 20 additions & 14 deletions cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,17 @@ func runStart(cmd *cobra.Command, args []string) error {
}

// Print banner
fmt.Println()
fmt.Println("🚀 TaskWing Starting...")
fmt.Println("━━━━━━━━━━━━━━━━━━━━━━━━")
fmt.Printf("📁 Project: %s\n", cwd)
fmt.Printf("🌐 API: %s\n", apiURL(startHost, startPort))
if !noWatch {
fmt.Println("👁️ Watch: enabled")
if !isQuiet() {
fmt.Println()
fmt.Println("🚀 TaskWing Starting...")
fmt.Println("━━━━━━━━━━━━━━━━━━━━━━━━")
fmt.Printf("📁 Project: %s\n", cwd)
fmt.Printf("🌐 API: %s\n", apiURL(startHost, startPort))
if !noWatch {
fmt.Println("👁️ Watch: enabled")
}
fmt.Println()
}
fmt.Println()

// WaitGroup to track goroutines
var wg sync.WaitGroup
Expand Down Expand Up @@ -143,16 +145,20 @@ func runStart(cmd *cobra.Command, args []string) error {
// Give server a moment to start
time.Sleep(500 * time.Millisecond)
if err := openBrowser(resolvedDashboardURL); err != nil {
fmt.Printf("⚠️ Could not open browser: %v\n", err)
fmt.Printf(" Open manually: %s\n", resolvedDashboardURL)
} else {
if !isQuiet() {
fmt.Printf("⚠️ Could not open browser: %v\n", err)
fmt.Printf(" Open manually: %s\n", resolvedDashboardURL)
}
} else if !isQuiet() {
fmt.Printf("🌐 Dashboard opened: %s\n", resolvedDashboardURL)
}
}

fmt.Println()
fmt.Println("✅ TaskWing is running! Press Ctrl+C to stop")
fmt.Println()
if !isQuiet() {
fmt.Println()
fmt.Println("✅ TaskWing is running! Press Ctrl+C to stop")
fmt.Println()
}

// Handle graceful shutdown
sigChan := make(chan os.Signal, 1)
Expand Down
10 changes: 6 additions & 4 deletions cmd/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -755,11 +755,13 @@ func runTaskStart(cmd *cobra.Command, args []string) error {
return nil
}

fmt.Printf("✓ Started task: %s\n", result.Task.Title)
fmt.Printf(" ID: %s\n", result.Task.ID)
if !isQuiet() {
fmt.Printf("✓ Started task: %s\n", result.Task.Title)
fmt.Printf(" ID: %s\n", result.Task.ID)

if result.Hint != "" {
fmt.Printf("\n💡 %s\n", result.Hint)
if result.Hint != "" {
fmt.Printf("\n💡 %s\n", result.Hint)
}
}

return nil
Expand Down
26 changes: 12 additions & 14 deletions cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,28 @@ var versionCmd = &cobra.Command{
Use: "version",
Short: "Print the version number of TaskWing",
Long: `All software has versions. This is TaskWing's.`,
Run: func(cmd *cobra.Command, args []string) {
RunE: func(cmd *cobra.Command, args []string) error {
if isJSON() {
return printJSON(map[string]string{"version": version})
}
if isQuiet() {
fmt.Println(version)
return nil
}
fmt.Printf(`
████████╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ██╗ ██████╗
╚══██╔══╝██╔══██╗██╔════╝██║ ██╔╝██║ ██║██║████╗ ██║██╔════╝
████████╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ██╗ ██████╗
╚══██╔══╝██╔══██╗██╔════╝██║ ██╔╝██║ ██║██║████╗ ██║██╔════╝
██║ ███████║███████╗█████╔╝ ██║ █╗ ██║██║██╔██╗ ██║██║ ███╗
██║ ██╔══██║╚════██║██╔═██╗ ██║███╗██║██║██║╚██╗██║██║ ██║
██║ ██║ ██║███████║██║ ██╗╚███╔███╔╝██║██║ ╚████║╚██████╔╝
╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚══╝╚══╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝
╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚══╝╚══╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝

TaskWing CLI version %s
`, version)
return nil
},
}

func init() {
rootCmd.AddCommand(versionCmd)

// Here you will define your flags and configuration settings.

// Cobra supports Persistent Flags which will work for this command
// and all subcommands, e.g.:
// versionCmd.PersistentFlags().String("foo", "", "A help for foo")

// Cobra supports local flags which will only run when this command
// is called directly, e.g.:
// versionCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
}
10 changes: 0 additions & 10 deletions internal/agents/verification/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,13 +372,3 @@ func FilterVerifiedFindings(findings []core.Finding) []core.Finding {
return result
}

// FilterByMinConfidence returns findings with confidence score >= minScore.
func FilterByMinConfidence(findings []core.Finding, minScore float64) []core.Finding {
var result []core.Finding
for _, f := range findings {
if f.ConfidenceScore >= minScore {
result = append(result, f)
}
}
return result
}
8 changes: 6 additions & 2 deletions internal/app/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -468,13 +468,17 @@ func (a *TaskApp) Complete(ctx context.Context, opts TaskCompleteOptions) (*Task
}

// Commit task progress with conventional commit message
if err := gitClient.CommitTaskProgress(taskBeforeComplete.Title, taskBeforeComplete.Scope); err == nil {
if err := gitClient.CommitTaskProgress(taskBeforeComplete.Title, taskBeforeComplete.Scope); err != nil {
fmt.Fprintf(os.Stderr, "⚠️ git commit failed: %v\n", err)
} else {
gitCommitApplied = true
}

// Push to remote if we have a branch and commit was successful
if gitCommitApplied && gitBranch != "" {
if err := gitClient.PushTaskProgress(gitBranch); err == nil {
if err := gitClient.PushTaskProgress(gitBranch); err != nil {
fmt.Fprintf(os.Stderr, "⚠️ git push failed: %v\n", err)
} else {
gitPushApplied = true
}
}
Expand Down
17 changes: 13 additions & 4 deletions internal/knowledge/ingest.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
"fmt"
"os"
"strings"
"time"

Expand Down Expand Up @@ -265,7 +266,9 @@ func (s *Service) ingestNodesWithIndex(ctx context.Context, findings []core.Find
}
}

if err := s.repo.UpsertNodeBySummary(node); err == nil {
if err := s.repo.UpsertNodeBySummary(node); err != nil {
fmt.Fprintf(os.Stderr, "⚠️ failed to upsert node %q: %v\n", f.Title, err)
} else {
nodesCreated++
nodesByTitle[strings.ToLower(f.Title)] = nodeID
}
Expand Down Expand Up @@ -366,7 +369,9 @@ func (s *Service) linkByEvidence(allNodes []memory.Node) int {
"shared_file": filePath,
"shared_count": sharedFiles,
}
if err := s.repo.LinkNodes(nodeA, nodeB, memory.NodeRelationSharesEvidence, weight, props); err == nil {
if err := s.repo.LinkNodes(nodeA, nodeB, memory.NodeRelationSharesEvidence, weight, props); err != nil {
fmt.Fprintf(os.Stderr, "⚠️ failed to link nodes (evidence): %v\n", err)
} else {
count++
}
}
Expand Down Expand Up @@ -414,7 +419,9 @@ func (s *Service) linkSemantic(allNodes []memory.Node) int {
similarity := CosineSimilarity(nodeA.Embedding, nodeB.Embedding)
if similarity >= float32(threshold) {
props := map[string]any{"similarity": similarity}
if err := s.repo.LinkNodes(nodeA.ID, nodeB.ID, memory.NodeRelationSemanticallySimilar, float64(similarity), props); err == nil {
if err := s.repo.LinkNodes(nodeA.ID, nodeB.ID, memory.NodeRelationSemanticallySimilar, float64(similarity), props); err != nil {
fmt.Fprintf(os.Stderr, "⚠️ failed to link nodes (semantic): %v\n", err)
} else {
count++
}
}
Expand Down Expand Up @@ -466,7 +473,9 @@ func (s *Service) linkByLLMRelationships(relationships []core.Relationship, node
"reason": rel.Reason,
}

if err := s.repo.LinkNodes(fromID, toID, relationType, weight, props); err == nil {
if err := s.repo.LinkNodes(fromID, toID, relationType, weight, props); err != nil {
fmt.Fprintf(os.Stderr, "⚠️ failed to link nodes (llm): %v\n", err)
} else {
count++
}
}
Expand Down
Loading