Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage in Tools in README.md is incorrect. #158

Open
tamuratak opened this issue Mar 3, 2025 · 0 comments
Open

Usage in Tools in README.md is incorrect. #158

tamuratak opened this issue Mar 3, 2025 · 0 comments

Comments

@tamuratak
Copy link

tamuratak commented Mar 3, 2025

Usage in Tools in README.md is incorrect.

  • options.parameters should be options.input
  • options.tokenOptions should be options.tokenizationOptions

Additionally, it is unclear that options.parameters is used as the props of MyElement. It would be better to make it clear how the input data is utilized.

// 1. Import prompt-tsx's well-known content type:
import { contentType } from '@vscode/prompt-tsx';


async function doToolInvocation(
	options: LanguageModelToolInvocationOptions
): vscode.LanguageModelToolResult {
	return {
		// In constructing your response, render the tree as JSON.
		[contentType]: await renderElementJSON(MyElement, options.parameters, options.tokenOptions),
		toString: () => '...',
	};
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant