Terminal-based AI coding agent with interactive TUI for autonomous code generation.
Features: - Interactive TUI with React/Ink - Autonomous agent with tool calls (bash, read, write, edit, glob, grep) - Permission system with pattern-based rules - Session management with auto-compaction - Dual providers: GitHub Copilot and Ollama - MCP server integration - Todo panel and theme system - Streaming responses - GitHub-compatible project context
This commit is contained in:
43
src/services/command-suggestion-service.ts
Normal file
43
src/services/command-suggestion-service.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
* Command Suggestion Service - Suggests follow-up commands after changes
|
||||
*
|
||||
* Detects patterns in file changes and tool executions to suggest
|
||||
* commands the user might need to run (e.g., npm install, npm run build).
|
||||
*/
|
||||
|
||||
export { detectProjectContext } from "@services/command-suggestion/context";
|
||||
export { analyzeFileChange } from "@services/command-suggestion/analyze";
|
||||
export {
|
||||
getPendingSuggestions,
|
||||
clearSuggestions,
|
||||
removeSuggestion,
|
||||
formatSuggestions,
|
||||
hasHighPrioritySuggestions,
|
||||
} from "@services/command-suggestion/format";
|
||||
export {
|
||||
setProjectContext,
|
||||
getProjectContext,
|
||||
addSuggestion,
|
||||
removeSuggestion as removeSuggestionFromState,
|
||||
clearSuggestions as clearSuggestionsFromState,
|
||||
hasSuggestion,
|
||||
getPendingSuggestionsMap,
|
||||
} from "@services/command-suggestion/state";
|
||||
export type {
|
||||
CommandSuggestion,
|
||||
ProjectContext,
|
||||
SuggestionPriority,
|
||||
SuggestionPattern,
|
||||
} from "@/types/command-suggestion";
|
||||
|
||||
import { detectProjectContext } from "@services/command-suggestion/context";
|
||||
import {
|
||||
setProjectContext,
|
||||
clearSuggestions as clearStore,
|
||||
} from "@services/command-suggestion/state";
|
||||
|
||||
export const initSuggestionService = (cwd: string): void => {
|
||||
const ctx = detectProjectContext(cwd);
|
||||
setProjectContext(ctx);
|
||||
clearStore();
|
||||
};
|
||||
Reference in New Issue
Block a user