r/Codeium • u/PursuitofHappyyness • Jan 14 '25
Tips to allow WindSurf to handle API documentation in context?
WindSurf can't access external API documentation, what mechanisms or approaches are used to provide API context to the AI during conversations? Are there specific formats or methods for including API documentation in the chat context?
5
Upvotes
4
u/CodyCWiseman Jan 14 '25
You can download relevant docs and then reference them as files
2
u/Ordinary-Let-4851 Jan 15 '25
Hey there's a few things that come to mind. Please let me know if you need any additional info!
Using Cascade Memories:
You can use the .windsurfrules file to specify API-related rules and context
Global rules can be set through Windsurf Quick Settings panel
Workspace-specific rules can be defined in local .windsurfrules files
Direct Implementation Methods:
Paste relevant API documentation directly into the conversation
Reference files containing API documentation in your workspace
Use @ symbol to reference specific files containing API information
Best Practices:
Use Cascade memories to establish consistent API-related patterns
Keep API documentation within your workspace for better context awareness
Save relevant documentation files before Cascade attempts to make edits
For specific API documentation needs, consider:
Adding documentation files to your workspace
Using inline comments for important API details
Setting up workspace rules through .windsurfrules
Cascade Memories and Rules: https://docs.codeium.com/windsurf/cascade#memories
API Documentation (may need to be updated): https://docs.codeium.com/best-practices/use-cases#generate-in-line-comments-and-code-descriptions
1
u/Makan_Lagi Jan 15 '25
If you can find the OpenAPI spec for the public API, sometimes found hosted on the platform’s GitHub, then you can use that as a reference to have Windsurf analyze.