Refine context command descriptions
This commit is contained in:
parent
3e467041d7
commit
91d2fd8549
@ -7,7 +7,7 @@ import { UiUtilWrapper } from '../util/uiUtil';
|
|||||||
|
|
||||||
export const customCommandContext: ChatContext = {
|
export const customCommandContext: ChatContext = {
|
||||||
name: '<custom command>',
|
name: '<custom command>',
|
||||||
description: 'custorm command',
|
description: 'execute your input command and retrieve output',
|
||||||
handler: async () => {
|
handler: async () => {
|
||||||
// popup a dialog to ask for the command line to run
|
// popup a dialog to ask for the command line to run
|
||||||
const customCommand = await UiUtilWrapper.showInputBox({
|
const customCommand = await UiUtilWrapper.showInputBox({
|
||||||
|
@ -53,7 +53,7 @@ async function getSelectedSymbol(): Promise<vscode.DocumentSymbol | undefined> {
|
|||||||
|
|
||||||
export const defRefsContext: ChatContext = {
|
export const defRefsContext: ChatContext = {
|
||||||
name: 'symbol references',
|
name: 'symbol references',
|
||||||
description: 'References of symble',
|
description: 'find code sites referencing the selected symbol (class, function, variable, etc.)',
|
||||||
handler: async () => {
|
handler: async () => {
|
||||||
const activeEditor = vscode.window.activeTextEditor;
|
const activeEditor = vscode.window.activeTextEditor;
|
||||||
if (!activeEditor) {
|
if (!activeEditor) {
|
||||||
|
@ -7,7 +7,7 @@ import { logger } from '../util/logger';
|
|||||||
|
|
||||||
export const gitDiffContext: ChatContext = {
|
export const gitDiffContext: ChatContext = {
|
||||||
name: 'git diff HEAD',
|
name: 'git diff HEAD',
|
||||||
description: 'diff for all changes',
|
description: 'all changes since the last commit',
|
||||||
handler: async () => {
|
handler: async () => {
|
||||||
const tempDir = await createTempSubdirectory('devchat/context');
|
const tempDir = await createTempSubdirectory('devchat/context');
|
||||||
const diffFile = path.join(tempDir, 'diff_all.txt');
|
const diffFile = path.join(tempDir, 'diff_all.txt');
|
||||||
|
@ -7,7 +7,7 @@ import { logger } from '../util/logger';
|
|||||||
|
|
||||||
export const gitDiffCachedContext: ChatContext = {
|
export const gitDiffCachedContext: ChatContext = {
|
||||||
name: 'git diff --cached',
|
name: 'git diff --cached',
|
||||||
description: 'diff for cached changes',
|
description: 'the staged changes since the last commit',
|
||||||
handler: async () => {
|
handler: async () => {
|
||||||
const tempDir = await createTempSubdirectory('devchat/context');
|
const tempDir = await createTempSubdirectory('devchat/context');
|
||||||
const diffFile = path.join(tempDir, 'diff_cached.txt');
|
const diffFile = path.join(tempDir, 'diff_cached.txt');
|
||||||
|
@ -173,7 +173,7 @@ async function getSymbolDefine(symbolList: string[]): Promise<string[]> {
|
|||||||
|
|
||||||
export const refDefsContext: ChatContext = {
|
export const refDefsContext: ChatContext = {
|
||||||
name: 'symbol definitions',
|
name: 'symbol definitions',
|
||||||
description: 'Definitions of symbol',
|
description: 'find related definitions of classes, functions, etc. in selected code',
|
||||||
handler: async () => {
|
handler: async () => {
|
||||||
const selectedText = await getCurrentSelectText();
|
const selectedText = await getCurrentSelectText();
|
||||||
const symbolList = await getUndefinedSymbols(selectedText);
|
const symbolList = await getUndefinedSymbols(selectedText);
|
||||||
|
@ -468,7 +468,7 @@ const InputMessage = observer((props: any) => {
|
|||||||
borderColor: 'var(--vscode-menu-border)',
|
borderColor: 'var(--vscode-menu-border)',
|
||||||
backgroundColor: 'var(--vscode-menu-background)'
|
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">
|
<ScrollArea.Autosize mah={240} type="always">
|
||||||
{commandMenusNode}
|
{commandMenusNode}
|
||||||
</ScrollArea.Autosize>
|
</ScrollArea.Autosize>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "git_log_releasenote",
|
"name": "git log for release note",
|
||||||
"description": "git log for write release note",
|
"description": "formatted commit history since the specified commit",
|
||||||
"edit": true,
|
"edit": true,
|
||||||
"command": ["git log $(git describe --tags --abbrev=0)..HEAD --pretty=format:\"%h - %B\""]
|
"command": ["git log $(git describe --tags --abbrev=0)..HEAD --pretty=format:\"%h - %B\""]
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user