What is Context-Aware Analysis?

Context-aware analysis means the AI understands not just the code you changed, but how it relates to the rest of your codebase. This includes understanding imports, function calls, class relationships, and code structure.

How Context is Included

Related Definitions

When the AI analyzes a change, it can include definitions of functions, classes, and objects that are referenced in your diff. This helps it understand how your changes affect the broader codebase.

Import Relationships

The AI understands import statements and can see how files relate to each other through imports. This helps it understand dependencies and impacts.

Symbol References

By tracking symbol mentions across files, the AI can understand how your changes affect other parts of the codebase, even if they're not directly imported.

Benefits of Context

Better Understanding

With context, the AI can provide more accurate analysis because it understands how your changes fit into the larger system.

More Relevant Findings

Context helps the AI focus on issues that actually matter, reducing false positives and irrelevant suggestions.

Impact Analysis

The AI can better understand the impact of your changes, identifying potential breakages or side effects.

Configuring Context

Related Context Cap

You can configure how much related context to include. Larger caps provide more context but increase request size and cost.

Full Content Inclusion

Including full file content provides maximum context but increases size. Use selectively for important analyses.

Diff Scope

RELAXED scope includes more context from the file, while STRICT focuses only on changed lines.

Conclusion

Context-aware analysis significantly improves the quality of insights. By understanding code relationships, the AI can provide more accurate, relevant findings that help you write better code.

Ready for better analysis? Install AI Diff Review and experience context-aware code analysis.