Skip to content

Commit

Permalink
Add info renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
elsmr committed Sep 12, 2024
1 parent 22479a7 commit d750e39
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ describe('inputMethodCompletions', () => {
from: 0,
options: [
{
info: 'Returns the JSON input data to the current node, for the current item. Shorthand for <code>$input.item.json</code>.',
info: expect.any(Function),
label: '$input.item.json',
type: 'variable',
},

{
info: 'Returns any binary input data to the current node, for the current item. Shorthand for <code>$input.item.binary</code>.',
info: expect.any(Function),
label: '$input.item.binary',
type: 'variable',
},
Expand All @@ -29,13 +29,13 @@ describe('inputMethodCompletions', () => {
from: 0,
options: [
{
info: 'Returns the JSON input data to the current node, for the current item. Shorthand for <code>$input.item.json</code>.',
info: expect.any(Function),
label: '$input.first().json',
type: 'variable',
},

{
info: 'Returns any binary input data to the current node, for the current item. Shorthand for <code>$input.item.binary</code>.',
info: expect.any(Function),
label: '$input.first().binary',
type: 'variable',
},
Expand All @@ -49,13 +49,13 @@ describe('inputMethodCompletions', () => {
from: 0,
options: [
{
info: 'Returns the JSON input data to thqe current node, for the current item. Shorthand for <code>$input.item.json</code>.',
info: expect.any(Function),
label: '$input.all()[1].json',
type: 'variable',
},

{
info: 'Returns any binary input data to the current node, for the current item. Shorthand for <code>$input.item.binary</code>.',
info: expect.any(Function),
label: '$input.all()[1].binary',
type: 'variable',
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { addVarType, escape } from '../utils';
import { addInfoRenderer, addVarType, escape } from '../utils';
import type { Completion, CompletionContext, CompletionResult } from '@codemirror/autocomplete';
import { useI18n } from '@/composables/useI18n';

Expand Down Expand Up @@ -94,7 +94,7 @@ export function useItemFieldCompletions(language: 'python' | 'javaScript') {

return {
from: preCursor.from,
options: options.map(addVarType),
options: options.map(addVarType).map(addInfoRenderer),
};
}

Expand Down

0 comments on commit d750e39

Please sign in to comment.