mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
fix: address review comments - use substring instead of deprecated substr, use Number() for type conversion
This commit is contained in:
parent
f72ba57df8
commit
b760452ee3
2 changed files with 3 additions and 3 deletions
|
|
@ -22,7 +22,7 @@ export interface CodeSnippet {
|
|||
* Creates a unique ID for a code snippet
|
||||
*/
|
||||
export function createCodeSnippetId(): string {
|
||||
return `snippet-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`
|
||||
return `snippet-${Date.now()}-${Math.random().toString(36).substring(2, 11)}`
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -688,8 +688,8 @@ export class ClineProvider
|
|||
const codeSnippet: CodeSnippet = {
|
||||
id: createCodeSnippetId(),
|
||||
filePath: params.filePath as string,
|
||||
startLine: params.startLine as unknown as number,
|
||||
endLine: params.endLine as unknown as number,
|
||||
startLine: Number(params.startLine),
|
||||
endLine: Number(params.endLine),
|
||||
content: params.selectedText as string,
|
||||
timestamp: Date.now(),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue