Class Vcs
java.lang.Object
uno.anahata.asi.agi.tool.ToolContext
uno.anahata.asi.agi.tool.AnahataToolkit
uno.anahata.asi.intellij.tools.vcs.Vcs
- All Implemented Interfaces:
ContextProvider, PropertyChangeSource, Rebindable
A toolkit for inspecting version-control status through IntelliJ's generic VCS layer.
A beyond-parity capability with no NetBeans equivalent. It uses the provider-agnostic
ChangeListManager — which works for Git and any other configured VCS — to report
changed, added, deleted and unversioned files, grouped by change list. VCS-provider-specific
operations (Git branch/commit/log/blame) require the git4idea plugin API, which is
not published as a resolvable artifact, so they are intentionally out of scope.
- Author:
- anahata
-
Field Summary
Fields inherited from class AnahataToolkit
childrenProviders, propertyChangeSupportFields inherited from class ToolContext
toolkit -
Constructor Summary
ConstructorsConstructorDescriptionVcs()Constructs the Vcs toolkit (instantiated reflectively via its public no-arg constructor). -
Method Summary
Modifier and TypeMethodDescriptionReports the version-control status of all open projects: local changes grouped by change list, plus unversioned files.private static StringpathOf(com.intellij.openapi.vcs.changes.Change change) Resolves the best available path for a change (after-revision, else before-revision, else the virtual file).private static StringstatusOf(com.intellij.openapi.vcs.changes.Change change) Maps a change to a short status token.Methods inherited from class AnahataToolkit
getChildrenProviders, getDescription, getId, getName, getParentProvider, getPropertyChangeSupport, initialize, isEffectivelyProviding, postActivate, rebindMethods inherited from class ToolContext
addAttachment, addAttachment, addAttachment, addAttachment, error, error, error, getAgi, getApplicationMap, getAsiContainer, getAsiContainerMap, getCall, getExecutorService, getModelId, getModelMessage, getResourceManager, getResponse, getSessionMap, getThreadSafeLogger, getTool, getToolContext, getToolkit, getToolManager, getTurnMap, isToolExecution, log, peekResponse, runAsyncMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ContextProvider
getAgi, getContextPosition, getFlattenedHierarchy, getFullyQualifiedId, getHeader, getIconId, getInstructionsTokenCount, getRagTokenCount, getSystemInstructions, isProviding, populateMessage, setParentProvider, setProviding
-
Constructor Details
-
Vcs
public Vcs()Constructs the Vcs toolkit (instantiated reflectively via its public no-arg constructor).
-
-
Method Details
-
getVcsStatus
Reports the version-control status of all open projects: local changes grouped by change list, plus unversioned files.- Returns:
- a Markdown status report.
-
statusOf
Maps a change to a short status token.- Parameters:
change- the change.- Returns:
ADDED,DELETED,MOVEDorMODIFIED.
-
pathOf
Resolves the best available path for a change (after-revision, else before-revision, else the virtual file).- Parameters:
change- the change.- Returns:
- the file path, or
"?"if none can be resolved.
-

