kb_search
Search the code of the project folders the user added ("alarm handler", "FB_Valve", "CONCAT"): unit, kind, file and the matching declaration/code excerpts, best first. Names and identifiers count as their words (FB_AlarmList: alarm, list).
Instructions
Search the code of the project folders the user added ("alarm handler", "FB_Valve", "CONCAT"): unit, kind,
file and the matching declaration/code excerpts, best first. Names and identifiers count as their words
(FB_AlarmList: alarm, list). Units with EVERY word first, then every word as a prefix ('CounterMod' finds
FB_CounterModule); a unit whose code holds the words before one that has them only in comments
(match_in='comments'); only when none has them all, units with some words
(match='some words', with the words each unit holds; words on no unit or on most units are not used and
are listed). A unit that declares the name (variable, constant, member, enum value, its own name) comes first
(declares). Stop words ('how', 'to', 'the') and, in a query of several words, single characters are not
searched; a query of stop words only is refused. There are no query operators: OR / AND / NOT / NEAR, '-',
'^', '*' are not read as such (operators_note). A copy name (PRG_X_9) that no unit has falls back to the
name it was copied from. "quoted text" is a phrase; tokens joined by punctuation ('STRING(40)', 'fbTimer(IN:=')
are searched as one sequence (searched_as_sequence), a qualified name ('GVL_X.nY') as its names. A unit whose
own name holds the words comes before its members. kinds (checked): PROGRAM, FUNCTION_BLOCK/FB, FUNCTION,
POU (= those three), METHOD, PROPERTY, ACTION, INTERFACE, STRUCT, ENUM, GVL, DUT (= every data type) …; with
kinds, a member is answered as its owner of those kinds (via_member: 'Execute' kinds=[INTERFACE] → I_Module);
no hit names the units of other kinds that have the words. words_not_in_code: the words a hit has only in
comments / string literals. project = the folder (any spelling) or its label; limit 1–200. stale: folders
changed, renamed or deleted since they were indexed — their hits are those of the last indexing (kb_reindex);
changed_files / added_files / removed_files name them. An error message — a code in
a notation that says so (ADSError 1861, pyads' 'ADSError: … (1861)', ADS error 1861, error 1861, nErrId :=
1861, 0x98110745, ADSERR_CLIENT_SYNCTIMEOUT), a compiler message (C0046: …), or a 0x number alone; not the
word 'error', a decimal / 16# literal alone, a hex number anywhere or an ERR_… identifier of the code — gets the plugin's note
in known_error (ADS return codes 6, 7, 1793, 1796, 1797, 1799, 1808, 1861 with code and symbol, license, XAE
busy / dialog / disconnected, logged in, compiler: identifier not defined, cannot convert type, unknown type;
null + known_errors_covered when it has none) and is searched only for the names of the code it holds
(quoted, or identifiers such as fbCounter, FB_Valve, MAIN.fbX).
Beckhoff documentation is not here: the twincat-docs skill.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kinds | No | ||
| limit | No | ||
| query | Yes | ||
| project | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||