DocumentationWorkspace Context
Workspace Context
Dash Agents provide you the capability to extract and use code from the user's workspace while executing your commands.
WorkspaceQueryStep
WorkspaceQueryStep
is a step that finds matching code snippets from the user's workspace.
class WorkspaceQueryStep extends Step {
WorkspaceQueryStep({required this.query, required this.output});
final String query;
final MultiCodeObject output;
}
query
: A string-interpolated query with a mix of inputs and outputs.output
: Stores the matching code snippets extracted from the user's workspace.
Example usage:
final userQuery = StringInput('Your query');
final matchingCode = MultiCodeObject();
return [WorkspaceQueryStep(query: '$userQuery', output: matchingCode)];
This could be helpful when you want to extract certain kind of code snippets - like existing existing implementation of your package across files as reference to suggest changes on top of.
Prev
Next