mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-25 02:41:07 +01:00
Add prompt() plugin API (#121)
This commit is contained in:
@@ -13,7 +13,7 @@ export type TwigCompletionOptionNamespace = {
|
||||
|
||||
export type TwigCompletionOptionFunction = {
|
||||
args: { name: string }[];
|
||||
aliases: string[];
|
||||
aliases?: string[];
|
||||
type: 'function';
|
||||
};
|
||||
|
||||
@@ -65,7 +65,7 @@ export function twigCompletion({ options }: TwigCompletionConfig) {
|
||||
if (matchSegments.length < optionSegments.length) {
|
||||
return [
|
||||
{
|
||||
label: optionSegments.slice(0, matchSegments.length).join('.'),
|
||||
label: optionSegments.slice(0, matchSegments.length).join('.') + '…',
|
||||
apply: optionSegments.slice(0, matchSegments.length).join('.'),
|
||||
type: 'namespace',
|
||||
},
|
||||
|
||||
@@ -24,7 +24,7 @@ export type InputProps = Omit<
|
||||
| 'onKeyDown'
|
||||
| 'readOnly'
|
||||
> & {
|
||||
name: string;
|
||||
name?: string;
|
||||
type?: 'text' | 'password';
|
||||
label: string;
|
||||
hideLabel?: boolean;
|
||||
@@ -41,7 +41,7 @@ export type InputProps = Omit<
|
||||
rightSlot?: ReactNode;
|
||||
size?: 'xs' | 'sm' | 'md' | 'auto';
|
||||
className?: string;
|
||||
placeholder: string;
|
||||
placeholder?: string;
|
||||
validate?: boolean | ((v: string) => boolean);
|
||||
require?: boolean;
|
||||
wrapLines?: boolean;
|
||||
|
||||
@@ -519,8 +519,7 @@ function PairEditorRow({
|
||||
label: 'Content-Type',
|
||||
placeholder: 'text/plain',
|
||||
defaultValue: pairContainer.pair.contentType ?? '',
|
||||
name: 'content-type',
|
||||
confirmLabel: 'Set',
|
||||
confirmText: 'Set',
|
||||
description: 'Leave blank to auto-detect',
|
||||
});
|
||||
handleChangeValueContentType(v);
|
||||
|
||||
Reference in New Issue
Block a user