ide на основе vs code
Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
--- applyTo: '**/*.tsx' description: Prompt-TSX coding guidelines ---
Guidelines for TSX files using prompt-tsx focusing on specific patterns and token budget management for AI prompt engineering.
PromptElement<Props> or PromptElement<Props, State> for all prompt componentsBasePromptElementPropsinterface MyPromptProps extends BasePromptElementProps {
readonly userQuery: string;
}
class MyPrompt extends PromptElement<MyPromptProps> {
render() {
return (
<>
<SystemMessage priority={1000}>...</SystemMessage>
<UserMessage priority={900}>{this.props.userQuery}</UserMessage>
</>
);
}
}render method can be async for components that need to perform async operationsrender methodclass FileContextPrompt extends PromptElement<FileContextProps> {
async render() {
const fileContent = await readFileAsync(this.props.filePath);
return (
<>
<SystemMessage priority={1000}>File content:</SystemMessage>
<UserMessage priority={900}>{fileContent}</UserMessage>
</>
);
}
}<br /> for line breaks - newlines are NOT preserved in JSX// ✅ Correct
<SystemMessage>
You are an AI assistant.<br />
Follow these guidelines.<br />
</SystemMessage>
// ❌ Wrong - newlines will be collapsed
<SystemMessage>
You are an AI assistant.
Follow these guidelines.
</SystemMessage><SystemMessage priority={1000}>...</SystemMessage>
<UserMessage priority={900}>{query}</UserMessage>
<HistoryMessages priority={700} />
<ContextualData priority={500} />flexGrow={1} - expand to fill remaining token spaceflexReserve - reserve tokens before renderingpassPriority - pass-through containers that don't affect child priorities<FileContext priority={70} flexGrow={1} files={this.props.files} />
<History passPriority older={0} newer={80} flexGrow={2} flexReserve="/5" />TextChunk for content that may exceed token budgetbreakOn patterns for intelligent truncation<TextChunk breakOnWhitespace priority={100}>
{longUserQuery}
</TextChunk>
<TextChunk breakOn=" " priority={80}>
{documentContent}
</TextChunk>Tag for XML-like structured content with attributes<Tag name="attachments" attrs={{ id: variableName, type: "file" }}>
{content}
</Tag><references> for tracking variable usage<meta> for metadata that survives pruning<references value={[new PromptReference({ variableName })]} />
<meta value={new ToolResultMetadata(id, result)} />useKeepWith() for content that should be pruned togetherconst KeepWith = useKeepWith();
return (
<>
<KeepWith priority={2}>
<ToolCallRequest>...</ToolCallRequest>
</KeepWith>
<KeepWith priority={1}>
<ToolCallResponse>...</ToolCallResponse>
</KeepWith>
</>
);PromptSizing parameter for budget-aware content generationasync render(sizing: PromptSizing): Promise<PromptPiece> {
const content = await this.generateContent(sizing.tokenBudget);
return <>{content}</>;
}render methods when possiblerender for all async operations