Refine context command descriptions

This commit is contained in:
Jinglei Ren 2023-08-29 23:20:10 +08:00
parent 3e467041d7
commit 91d2fd8549
7 changed files with 8 additions and 8 deletions

View File

@ -7,7 +7,7 @@ import { UiUtilWrapper } from '../util/uiUtil';
export const customCommandContext: ChatContext = {
name: '<custom command>',
description: 'custorm command',
description: 'execute your input command and retrieve output',
handler: async () => {
// popup a dialog to ask for the command line to run
const customCommand = await UiUtilWrapper.showInputBox({

View File

@ -53,7 +53,7 @@ async function getSelectedSymbol(): Promise<vscode.DocumentSymbol | undefined> {
export const defRefsContext: ChatContext = {
name: 'symbol references',
description: 'References of symble',
description: 'find code sites referencing the selected symbol (class, function, variable, etc.)',
handler: async () => {
const activeEditor = vscode.window.activeTextEditor;
if (!activeEditor) {

View File

@ -7,7 +7,7 @@ import { logger } from '../util/logger';
export const gitDiffContext: ChatContext = {
name: 'git diff HEAD',
description: 'diff for all changes',
description: 'all changes since the last commit',
handler: async () => {
const tempDir = await createTempSubdirectory('devchat/context');
const diffFile = path.join(tempDir, 'diff_all.txt');

View File

@ -7,7 +7,7 @@ import { logger } from '../util/logger';
export const gitDiffCachedContext: ChatContext = {
name: 'git diff --cached',
description: 'diff for cached changes',
description: 'the staged changes since the last commit',
handler: async () => {
const tempDir = await createTempSubdirectory('devchat/context');
const diffFile = path.join(tempDir, 'diff_cached.txt');

View File

@ -173,7 +173,7 @@ async function getSymbolDefine(symbolList: string[]): Promise<string[]> {
export const refDefsContext: ChatContext = {
name: 'symbol definitions',
description: 'Definitions of symbol',
description: 'find related definitions of classes, functions, etc. in selected code',
handler: async () => {
const selectedText = await getCurrentSelectText();
const symbolList = await getUndefinedSymbols(selectedText);

View File

@ -468,7 +468,7 @@ const InputMessage = observer((props: any) => {
borderColor: 'var(--vscode-menu-border)',
backgroundColor: 'var(--vscode-menu-background)'
}}>
<Text sx={{ padding: '5px 5px 5px 10px' }}>DevChat Commands</Text>
<Text sx={{ padding: '5px 5px 5px 10px' }}>DevChat Workflows</Text>
<ScrollArea.Autosize mah={240} type="always">
{commandMenusNode}
</ScrollArea.Autosize>

View File

@ -1,6 +1,6 @@
{
"name": "git_log_releasenote",
"description": "git log for write release note",
"name": "git log for release note",
"description": "formatted commit history since the specified commit",
"edit": true,
"command": ["git log $(git describe --tags --abbrev=0)..HEAD --pretty=format:\"%h - %B\""]
}