mirror of
https://github.com/cline/cline.git
synced 2026-09-19 02:05:44 +08:00
* commitSearch protobus migration * rename * one small change to comments * moved GitCommmit proto mapping to proto-conversions
56 lines
1.6 KiB
Protocol Buffer
56 lines
1.6 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);
|
|
}
|
|
|
|
// 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)
|
|
}
|
|
|
|
// 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
|
|
}
|
|
|