Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Stevenic/codepilot
/ functions
Functions
96 in github.com/Stevenic/codepilot
⨍
Functions
96
◇
Types & classes
29
↓ 19 callers
Method
output
* Renders the given text as general output text. * @param output Text to render. * @param quote Optional. Quote to use for strings. Defaults
lib/internals/Colorize.js:42
↓ 19 callers
Method
output
* Renders the given text as general output text. * @param output Text to render. * @param quote Optional. Quote to use for strings. Defaults
src/internals/Colorize.ts:42
↓ 11 callers
Method
isCreated
* Returns true if the index has been created.
lib/CodeIndex.js:175
↓ 11 callers
Method
isCreated
* Returns true if the index has been created.
src/CodeIndex.ts:224
↓ 7 callers
Method
hasKeys
* Returns whether a `vectra.keys` file exists for the index.
lib/CodeIndex.js:167
↓ 7 callers
Method
hasKeys
* Returns whether a `vectra.keys` file exists for the index.
src/CodeIndex.ts:217
↓ 5 callers
Method
load
* Loads the current code index.
lib/CodeIndex.js:184
↓ 5 callers
Method
load
* Loads the current code index.
src/CodeIndex.ts:233
↓ 4 callers
Method
title
* Renders the given text as a title. * @param title Title text to render.
lib/internals/Colorize.js:80
↓ 4 callers
Method
title
* Renders the given text as a title. * @param title Title text to render.
src/internals/Colorize.ts:79
↓ 3 callers
Method
error
* Renders the given text as error text. * @param error Error text to render.
lib/internals/Colorize.js:21
↓ 3 callers
Method
error
* Renders the given text as error text. * @param error Error text to render.
src/internals/Colorize.ts:20
↓ 3 callers
Function
step
(result)
lib/CodeIndex.js:30
↓ 3 callers
Function
step
(result)
lib/SourceCodeSection.js:7
↓ 3 callers
Function
step
(result)
lib/Codepilot.js:30
↓ 3 callers
Function
step
(result)
lib/codepilot-cli.js:7
↓ 3 callers
Function
step
(result)
lib/functions/createFile.js:30
↓ 2 callers
Function
getOptimalConfig
(model, sources, extensions)
lib/codepilot-cli.js:271
↓ 2 callers
Function
getOptimalConfig
(model: string, sources: string[], extensions: string[])
src/codepilot-cli.ts:265
↓ 2 callers
Method
rebuild
* Rebuilds the code index.
lib/CodeIndex.js:229
↓ 2 callers
Method
rebuild
* Rebuilds the code index.
src/CodeIndex.ts:282
↓ 2 callers
Method
upsertDocument
* Adds a document to the index. * @param path Path to the document to add.
lib/CodeIndex.js:348
↓ 2 callers
Method
upsertDocument
* Adds a document to the index. * @param path Path to the document to add.
src/CodeIndex.ts:413
↓ 1 callers
Method
add
* Adds sources and extensions to the index. * @param config The configuration containing the sources and extensions to add.
lib/CodeIndex.js:80
↓ 1 callers
Method
add
* Adds sources and extensions to the index. * @param config The configuration containing the sources and extensions to add.
src/CodeIndex.ts:121
↓ 1 callers
Function
addCreateFile
(codepilot: Codepilot)
src/functions/createFile.ts:32
↓ 1 callers
Method
addFunction
* Registers a new function to be used in the chat completion. * @remarks * This is used to add new capabilities to Codepilot's chat feature
lib/Codepilot.js:67
↓ 1 callers
Method
addFunction
* Registers a new function to be used in the chat completion. * @remarks * This is used to add new capabilities to Codepilot's chat feature
src/Codepilot.ts:38
↓ 1 callers
Function
adopt
(value)
lib/CodeIndex.js:26
↓ 1 callers
Function
adopt
(value)
lib/SourceCodeSection.js:3
↓ 1 callers
Function
adopt
(value)
lib/Codepilot.js:26
↓ 1 callers
Function
adopt
(value)
lib/codepilot-cli.js:3
↓ 1 callers
Function
adopt
(value)
lib/functions/createFile.js:26
↓ 1 callers
Method
chat
* Starts the chat session and listens for user input.
lib/Codepilot.js:74
↓ 1 callers
Method
chat
* Starts the chat session and listens for user input.
src/Codepilot.ts:46
↓ 1 callers
Method
create
* Creates a new code index. * @param keys OpenAI keys to use. * @param config Source code index configuration.
lib/CodeIndex.js:122
↓ 1 callers
Method
create
* Creates a new code index. * @param keys OpenAI keys to use. * @param config Source code index configuration.
src/CodeIndex.ts:168
↓ 1 callers
Method
createModel
()
lib/Codepilot.js:157
↓ 1 callers
Method
createModel
()
src/Codepilot.ts:126
↓ 1 callers
Method
delete
* Deletes the current code index.
lib/CodeIndex.js:155
↓ 1 callers
Method
delete
* Deletes the current code index.
src/CodeIndex.ts:205
↓ 1 callers
Method
getSectionOptions
(maxTokens)
lib/SourceCodeSection.js:68
↓ 1 callers
Method
getSectionOptions
(maxTokens: number)
src/SourceCodeSection.ts:65
↓ 1 callers
Method
highlight
* Renders the given text with a highlight to call attention. * @param message Text to highlight.
lib/internals/Colorize.js:33
↓ 1 callers
Method
highlight
* Renders the given text with a highlight to call attention. * @param message Text to highlight.
src/internals/Colorize.ts:32
↓ 1 callers
Method
progress
* Renders the given text as progress text. * @param message Progress text to render.
lib/internals/Colorize.js:73
↓ 1 callers
Method
progress
* Renders the given text as progress text. * @param message Progress text to render.
src/internals/Colorize.ts:71
↓ 1 callers
Method
query
* Queries the code index. * @param query Text to query the index with. * @param options Optional. Options to use when querying the index.
lib/CodeIndex.js:212
↓ 1 callers
Method
query
* Queries the code index. * @param query Text to query the index with. * @param options Optional. Options to use when querying the index.
src/CodeIndex.ts:264
↓ 1 callers
Function
registerFunctions
(codepilot: Codepilot)
src/functions/index.ts:7
↓ 1 callers
Method
remove
* Removes sources and extensions from the index. * @param config The configuration containing the sources and extensions to remove.
lib/CodeIndex.js:268
↓ 1 callers
Method
remove
* Removes sources and extensions from the index. * @param config The configuration containing the sources and extensions to remove.
src/CodeIndex.ts:325
↓ 1 callers
Method
setConfig
* Updates the code index configuration. * @param config Settings to update.
lib/CodeIndex.js:313
↓ 1 callers
Method
setConfig
* Updates the code index configuration. * @param config Settings to update.
src/CodeIndex.ts:374
↓ 1 callers
Method
setKeys
* Updates the OpenAI keys for the index. * @param keys Keys to use.
lib/CodeIndex.js:299
↓ 1 callers
Method
setKeys
* Updates the OpenAI keys for the index. * @param keys Keys to use.
src/CodeIndex.ts:360
Function
addCreateFile
* Adds the createFile function to the codepilot instance.
lib/functions/createFile.js:63
Method
completePrompt
(input)
lib/Codepilot.js:99
Method
completePrompt
(input: string)
src/Codepilot.ts:71
Method
config
* Gets the current code index configuration.
lib/CodeIndex.js:60
Method
config
* Gets the current code index configuration.
src/CodeIndex.ts:97
Method
constructor
* Creates a new 'CodeIndex' instance. * @param folderPath Optional. The path to the folder containing the index. Defaults to '.codepilot'.
lib/CodeIndex.js:54
Method
constructor
* Creates a new 'SourceCodeSection' instance. * @param index Code index to use. * @param tokens Optional. Sizing strategy for this section.
lib/SourceCodeSection.js:24
Method
constructor
* Creates a new `Codepilot` instance. * @param index The code index to use.
lib/Codepilot.js:49
Method
constructor
* Creates a new `Codepilot` instance. * @param index The code index to use.
src/Codepilot.ts:19
Method
constructor
* Creates a new 'SourceCodeSection' instance. * @param index Code index to use. * @param tokens Optional. Sizing strategy for this section.
src/SourceCodeSection.ts:16
Method
constructor
* Creates a new 'CodeIndex' instance. * @param folderPath Optional. The path to the folder containing the index. Defaults to '.codepilot'.
src/CodeIndex.ts:90
Method
folderPath
* Gets the path to the folder containing the index.
lib/CodeIndex.js:66
Method
folderPath
* Gets the path to the folder containing the index.
src/CodeIndex.ts:104
Function
fulfilled
(value)
lib/CodeIndex.js:28
Function
fulfilled
(value)
lib/SourceCodeSection.js:5
Function
fulfilled
(value)
lib/Codepilot.js:28
Function
fulfilled
(value)
lib/codepilot-cli.js:5
Function
fulfilled
(value)
lib/functions/createFile.js:28
Method
index
* Gets the code index.
lib/Codepilot.js:56
Method
index
* Gets the code index.
src/Codepilot.ts:26
Method
keys
* Gets the current OpenAI keys.
lib/CodeIndex.js:72
Method
keys
* Gets the current OpenAI keys.
src/CodeIndex.ts:111
Function
registerFunctions
* Registers all functions with the codepilot instance.
lib/functions/index.js:8
Function
rejected
(value)
lib/CodeIndex.js:29
Function
rejected
(value)
lib/SourceCodeSection.js:6
Function
rejected
(value)
lib/Codepilot.js:29
Function
rejected
(value)
lib/codepilot-cli.js:6
Function
rejected
(value)
lib/functions/createFile.js:29
Method
renderAsMessages
(memory, functions, tokenizer, maxTokens)
lib/SourceCodeSection.js:28
Method
renderAsMessages
(memory: PromptMemory, functions: PromptFunctions, tokenizer: Tokenizer, maxTokens: number)
src/SourceCodeSection.ts:21
Method
replaceLine
* Replaces the current line with the given text. * @param text The text to replace the current line with.
lib/internals/Colorize.js:14
Method
replaceLine
* Replaces the current line with the given text. * @param text The text to replace the current line with.
src/internals/Colorize.ts:12
Method
respond
(botMessage)
lib/Codepilot.js:97
Method
respond
(botMessage: string)
src/Codepilot.ts:70
Function
run
* Defines the commands supported by the Codepilot CLI.
lib/codepilot-cli.js:25
Function
run
()
src/codepilot-cli.ts:12
Method
value
* Renders the given text as a value. * @param field Field name to render. * @param value Value to render. * @param units Optional. Unit
lib/internals/Colorize.js:89
Method
value
* Renders the given text as a value. * @param field Field name to render. * @param value Value to render. * @param units Optional. Unit
src/internals/Colorize.ts:89
Method
warning
* Renders the given text as a warning. * @param warning Warning text to render.
lib/internals/Colorize.js:96
Method
warning
* Renders the given text as a warning. * @param warning Warning text to render.
src/internals/Colorize.ts:97