Skip to content

Commit

Permalink
Add Git interface for file selection and declare git variable for rep…
Browse files Browse the repository at this point in the history
…ository operations
  • Loading branch information
pelikhan committed Sep 30, 2024
1 parent 7296b07 commit 574fb12
Show file tree
Hide file tree
Showing 19 changed files with 360 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/genaisrc/genaiscript.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions genaisrc/genaiscript.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions packages/auto/genaiscript.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions packages/core/src/genaisrc/genaiscript.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions packages/core/src/types/prompt_template.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1273,6 +1273,21 @@ interface HTML {
convertToMarkdown(html: string): Promise<string>
}

interface Git {
/**
* Finds specific files in the git repository.
* By default, work
* @param options
*/
selectModifiedFiles(
scope: "branch" | "staged" | "modified",
options?: {
endsWith?: ElementOrArray<string>
glob?: ElementOrArray<string>
}

Check failure on line 1287 in packages/core/src/types/prompt_template.d.ts

View workflow job for this annotation

GitHub Actions / build

The `options` parameter in the `selectModifiedFiles` method is missing a type definition. Please provide a type for `options` to ensure type safety. 🛡️
): Promise<WorkspaceFile[]>
}

Check failure on line 1289 in packages/core/src/types/prompt_template.d.ts

View workflow job for this annotation

GitHub Actions / build

The new `Git` interface and its `selectModifiedFiles` method are missing documentation comments. Please add comments to explain their purpose and usage. 📚

interface GitHubOptions {
owner: string
repo: string
Expand Down
5 changes: 5 additions & 0 deletions packages/core/src/types/prompt_type.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,11 @@ declare var host: PromptHost
*/
declare var github: GitHub

/**
* Access to Git operations for the current repository
*/
declare var git: Git

Check failure on line 193 in packages/core/src/types/prompt_type.d.ts

View workflow job for this annotation

GitHub Actions / build

The `git` variable is declared but its type is not specified. Please provide a type for `git` to ensure type safety. 🛡️

/**
* Fetches a given URL and returns the response.
* @param url
Expand Down
20 changes: 20 additions & 0 deletions packages/sample/genaisrc/blog/genaiscript.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions packages/sample/genaisrc/genaiscript.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions packages/sample/genaisrc/node/genaiscript.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions packages/sample/genaisrc/python/genaiscript.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions packages/sample/genaisrc/style/genaiscript.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions packages/sample/src/aici/genaiscript.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 574fb12

Please sign in to comment.