Skip to content

Commit 841a7d2

Browse files
Merge pull request #17 from chriscarrollsmith/6-show-toolrule-recommendations-when-listing-tasks-from-cli
CLI now shows task tool and rule recommendations
2 parents db04597 + 761c59b commit 841a7d2

File tree

5 files changed

+27
-4
lines changed

5 files changed

+27
-4
lines changed

index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { ListToolsRequestSchema, CallToolRequestSchema } from "@modelcontextprot
1010
const server = new Server(
1111
{
1212
name: "task-manager-server",
13-
version: "1.0.6"
13+
version: "1.0.7"
1414
},
1515
{
1616
capabilities: {

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "taskqueue-mcp",
3-
"version": "1.0.6",
3+
"version": "1.0.7",
44
"description": "Task Queue MCP Server",
55
"author": "Christopher C. Smith ([email protected])",
66
"main": "dist/index.js",

src/client/cli.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,12 @@ program
315315
if (t.completedDetails) {
316316
console.log(` Completed Details: ${t.completedDetails}`);
317317
}
318+
if (t.toolRecommendations) {
319+
console.log(` Tool Recommendations: ${t.toolRecommendations}`);
320+
}
321+
if (t.ruleRecommendations) {
322+
console.log(` Rule Recommendations: ${t.ruleRecommendations}`);
323+
}
318324
});
319325
} else {
320326
console.log(chalk.yellow('\nNo tasks match the specified state filter.'));

tests/integration/cli.test.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,4 +147,21 @@ describe("CLI Integration Tests", () => {
147147
expect(stdout).toContain("In Progress");
148148
expect(stdout).toContain("Completed ✓");
149149
}, 5000);
150+
151+
it("should display tool and rule recommendations when listing tasks", async () => {
152+
// Create a task with tool and rule recommendations
153+
const testData = JSON.parse(await fs.readFile(tasksFilePath, 'utf-8'));
154+
testData.projects[0].tasks[0].toolRecommendations = "Use grep to search for code";
155+
testData.projects[0].tasks[0].ruleRecommendations = "Follow code style guidelines";
156+
await fs.writeFile(tasksFilePath, JSON.stringify(testData));
157+
158+
// Test listing the specific project with the updated task
159+
const { stdout } = await execAsync(`TASK_MANAGER_FILE_PATH=${tasksFilePath} tsx ${CLI_PATH} list -p proj-1`);
160+
161+
// Check that recommendations are displayed
162+
expect(stdout).toContain("Tool Recommendations:");
163+
expect(stdout).toContain("Use grep to search for code");
164+
expect(stdout).toContain("Rule Recommendations:");
165+
expect(stdout).toContain("Follow code style guidelines");
166+
}, 5000);
150167
});

0 commit comments

Comments
 (0)