Skip to content

Commit 1aa3eca

Browse files
author
nik
committed
Fix linter errors
1 parent 49c66ca commit 1aa3eca

File tree

2 files changed

+7
-17
lines changed

2 files changed

+7
-17
lines changed

src/llmGenerator.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,12 @@ function calculateChunkCount(totalTokens: number, chunkSize: number): number {
6363
/**
6464
* Iterator that yields one chunk at a time to save memory
6565
*/
66-
async function* chunkIterator(text: string, chunkSize?: number) {
66+
async function* chunkIterator(text: string, chunkSize?: number): AsyncGenerator<{
67+
chunk: string;
68+
index: number;
69+
tokenCount: number;
70+
totalChunks: number;
71+
}, void, unknown> {
6772
console.log(pc.cyan('\n┌─────────────────────────────────────────┐'));
6873
console.log(pc.cyan('│ CONTENT CHUNKING │'));
6974
console.log(pc.cyan('└─────────────────────────────────────────┘\n'));

src/rulesGenerate.ts

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export async function rulesGenerate(
5252
} catch (_error) {
5353
// If not found in module path, try with a local path
5454
try {
55+
console.debug(`Error: ${_error}. Trying to read guidelines from local path...`);
5556
guidelinesText = await readGuidelines('../src/prompts/cursor_mdc.md');
5657
console.log(pc.green('✓ Successfully read guidelines from local path'));
5758
} catch (innerError) {
@@ -162,22 +163,6 @@ async function runRepomix(repoPath: string, outputDir: string, additionalOptions
162163
}
163164
}
164165

165-
// Helper function to determine if the path is a remote repository
166-
function isRemoteRepository(repoPath: string): boolean {
167-
// Check for GitHub URL format
168-
if (repoPath.startsWith('http://') || repoPath.startsWith('https://')) {
169-
return true;
170-
}
171-
172-
// Check for shorthand format (e.g., 'owner/repo')
173-
if (/^[a-zA-Z0-9_-]+\/[a-zA-Z0-9_-]+$/.test(repoPath)) {
174-
return true;
175-
}
176-
177-
// Otherwise consider it a local path
178-
return false;
179-
}
180-
181166
async function readGuidelines(guidelinesPath: string): Promise<string> {
182167
try {
183168
const absolutePath = path.resolve(process.cwd(), guidelinesPath);

0 commit comments

Comments
 (0)