mirror of
https://github.com/cline/cline.git
synced 2025-06-03 03:59:07 +00:00

* remove workflows subdirectory from cline local toggles * set workflow toggles * pre-updating the rules deletion logic * delete file logic * integration with task * words * pre-updating storage structure of workflows * workflow menu items, no regex * slash menu scrolling * menu buttons * placeholder * match command base * regex * nit * slash menu click outside * changeset * fixing linter warning * better UI/UX --------- Co-authored-by: Cline Evaluation <cline@example.com>
97 lines
3.0 KiB
Protocol Buffer
97 lines
3.0 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package cline;
|
|
option java_package = "bot.cline.proto";
|
|
option java_multiple_files = true;
|
|
|
|
import "common.proto";
|
|
|
|
// Service for file-related operations
|
|
service FileService {
|
|
// Opens a file in the editor
|
|
rpc openFile(StringRequest) returns (Empty);
|
|
|
|
// Opens an image in the system viewer
|
|
rpc openImage(StringRequest) returns (Empty);
|
|
|
|
// Deletes a rule file from either global or workspace rules directory
|
|
rpc deleteRuleFile(RuleFileRequest) returns (RuleFile);
|
|
|
|
// Creates a rule file from either global or workspace rules directory
|
|
rpc createRuleFile(RuleFileRequest) returns (RuleFile);
|
|
|
|
// Search git commits in the workspace
|
|
rpc searchCommits(StringRequest) returns (GitCommits);
|
|
|
|
// Select images from the file system and return as data URLs
|
|
rpc selectImages(EmptyRequest) returns (StringArray);
|
|
|
|
// Convert URIs to workspace-relative paths
|
|
rpc getRelativePaths(RelativePathsRequest) returns (RelativePaths);
|
|
|
|
// Search for files in the workspace with fuzzy matching
|
|
rpc searchFiles(FileSearchRequest) returns (FileSearchResults);
|
|
}
|
|
|
|
// Request to convert a list of URIs to relative paths
|
|
message RelativePathsRequest {
|
|
Metadata metadata = 1;
|
|
repeated string uris = 2;
|
|
}
|
|
|
|
// Response containing the converted relative paths
|
|
message RelativePaths {
|
|
repeated string paths = 1;
|
|
}
|
|
|
|
// Request for file search operations
|
|
message FileSearchRequest {
|
|
Metadata metadata = 1;
|
|
string query = 2; // Search query string
|
|
optional string mentions_request_id = 3; // Optional request ID for tracking requests
|
|
optional int32 limit = 4; // Optional limit for results (default: 20)
|
|
}
|
|
|
|
// Result for file search operations
|
|
message FileSearchResults {
|
|
repeated FileInfo results = 1; // Array of file/folder results
|
|
optional string mentions_request_id = 2; // Echo of the request ID for tracking
|
|
}
|
|
|
|
// File information structure for search results
|
|
message FileInfo {
|
|
string path = 1; // Relative path from workspace root
|
|
string type = 2; // "file" or "folder"
|
|
optional string label = 3; // Display name (usually basename)
|
|
}
|
|
|
|
// Response for searchCommits
|
|
message GitCommits {
|
|
repeated GitCommit commits = 1;
|
|
}
|
|
|
|
// Represents a Git commit
|
|
message GitCommit {
|
|
string hash = 1;
|
|
string short_hash = 2;
|
|
string subject = 3;
|
|
string author = 4;
|
|
string date = 5;
|
|
}
|
|
|
|
// Unified request for all rule file operations
|
|
message RuleFileRequest {
|
|
Metadata metadata = 1;
|
|
bool is_global = 2; // Common field for all operations
|
|
optional string rule_path = 3; // Path field for deleteRuleFile (optional)
|
|
optional string filename = 4; // Filename field for createRuleFile (optional)
|
|
optional string type = 5; // Type of the file to create (optional)
|
|
}
|
|
|
|
// Result for rule file operations with meaningful data only
|
|
message RuleFile {
|
|
string file_path = 1; // Path to the rule file
|
|
string display_name = 2; // Filename for display purposes
|
|
bool already_exists = 3; // For createRuleFile, indicates if file already existed
|
|
}
|