Provide suggestions for running commands (restart/refresh/rebuild) (#62)
This commit is contained in:
@@ -18,6 +18,7 @@ import {
|
||||
getDyadExecuteSqlTags,
|
||||
getDyadRenameTags,
|
||||
getDyadWriteTags,
|
||||
getDyadCommandTags,
|
||||
processFullResponseActions,
|
||||
} from "../processors/response_processor";
|
||||
import log from "electron-log";
|
||||
@@ -247,6 +248,24 @@ const getProposalHandler = async (
|
||||
id: "write-code-properly",
|
||||
});
|
||||
}
|
||||
|
||||
// Check for command tags and add corresponding actions
|
||||
const commandTags = getDyadCommandTags(latestAssistantMessage.content);
|
||||
if (commandTags.includes("rebuild")) {
|
||||
actions.push({
|
||||
id: "rebuild",
|
||||
});
|
||||
}
|
||||
if (commandTags.includes("restart")) {
|
||||
actions.push({
|
||||
id: "restart",
|
||||
});
|
||||
}
|
||||
if (commandTags.includes("refresh")) {
|
||||
actions.push({
|
||||
id: "refresh",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Get all chat messages to calculate token usage
|
||||
|
||||
Reference in New Issue
Block a user