mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-03 07:57:22 +00:00
Improve tool descriptions for build_project and git_commit
This commit is contained in:
4 files changed
+4
-4
No files matched your search
@@ -28,7 +28,7 @@ describe('BuildProjectTool', () => {
|
||||
});
|
||||
|
||||
it('should have correct description', () => {
|
||||
expect(tool.description).toBe('Build the project using esbuild. Creates optimized production files in the dist directory.');
|
||||
expect(tool.description).toContain('Build the project using esbuild-wasm. Creates optimized production files in the dist directory');
|
||||
});
|
||||
|
||||
it('should fail if package.json does not exist', async () => {
|
||||
|
||||
@@ -7,7 +7,7 @@ export class BuildProjectTool implements Tool<void> {
|
||||
private cwd: string;
|
||||
private esmUrl: string;
|
||||
|
||||
readonly description = "Build the project using esbuild. Creates optimized production files in the dist directory.";
|
||||
readonly description = "Build the project using esbuild-wasm. Creates optimized production files in the dist directory, making the site preview visible to the user (or updating the existing preview) and ready for deployment. This tool also helps verify that your changes are correct. ALWAYS call this tool when you have finished making changes.";
|
||||
|
||||
constructor(fs: JSRuntimeFS, cwd: string, esmUrl: string) {
|
||||
this.fs = fs;
|
||||
|
||||
@@ -54,7 +54,7 @@ describe('GitCommitTool', () => {
|
||||
});
|
||||
|
||||
it('should have correct description and inputSchema', () => {
|
||||
expect(tool.description).toBe('Commit changes to git with a commit message. Automatically adds all unstaged files.');
|
||||
expect(tool.description).toContain('Commit changes to git with a commit message. Automatically adds all unstaged files.');
|
||||
expect(tool.inputSchema).toBeDefined();
|
||||
});
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ export class GitCommitTool implements Tool<GitCommitParams> {
|
||||
private cwd: string;
|
||||
private onCommit?: () => void;
|
||||
|
||||
readonly description = "Commit changes to git with a commit message. Automatically adds all unstaged files.";
|
||||
readonly description = "Commit changes to git with a commit message. Automatically adds all unstaged files. ALWAYS call this tool after you have finished making changes, and after you have successfully built the project with the `build_project` tool.";
|
||||
|
||||
readonly inputSchema = z.object({
|
||||
message: z.string().describe('Commit message text'),
|
||||
|
||||
Reference in new issue
Block a user