mirror of
https://github.com/cline/cline.git
synced 2026-09-21 05:10:09 +08:00
* createRuleFile protobus migration * deleteRuleFile protobus * mend * mend * mend * Generic response for delete request * refactored deleteRuleFile for consolidation * rename ruleFileResult to ruleFile * rebase and cleanup * createRuleFile protobus migration * ellipsis changes * consolidated ruleFile protos * prep for merge on to 3124 * removed ruleFileOperations
28 lines
731 B
TypeScript
28 lines
731 B
TypeScript
import { RuleFileRequest } from "../proto/file"
|
|
|
|
/**
|
|
* Simplified clean interface for RuleFile requests
|
|
*/
|
|
|
|
// Helper for creating delete requests
|
|
export const DeleteRuleFileRequest = {
|
|
create: (params: { rulePath: string; isGlobal: boolean; metadata?: any }): RuleFileRequest => {
|
|
return RuleFileRequest.create({
|
|
rulePath: params.rulePath,
|
|
isGlobal: params.isGlobal,
|
|
metadata: params.metadata,
|
|
})
|
|
},
|
|
}
|
|
|
|
// Helper for creating create requests
|
|
export const CreateRuleFileRequest = {
|
|
create: (params: { filename: string; isGlobal: boolean; metadata?: any }): RuleFileRequest => {
|
|
return RuleFileRequest.create({
|
|
filename: params.filename,
|
|
isGlobal: params.isGlobal,
|
|
metadata: params.metadata,
|
|
})
|
|
},
|
|
}
|