Class NoneProvider
- All Implemented Interfaces:
ProcessProvider
ProcessProvider that performs no AI processing.
Every method is a deliberate no-op: prompts, instructions, tools,
prompt/resource registration, project directory, error handling, and
enabled-tool configuration are all accepted and silently ignored, and
perform() always returns null.
This provider is typically used as a placeholder or "disabled" AI provider — for example, to run Ghostwriter without configuring a real GenAI provider/model, to skip AI calls during testing, or as a safe default when no provider has been selected.
When initialized with the "log" model, initialization, prompt,
instruction, tool, project-directory, error-handling, clear, and perform
calls log an INFO-level message so callers can verify that this no-op
provider is active. Prompt and resource registration remain silent. All other
model values leave diagnostic logging disabled.
- Since:
- 1.3.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPrompts(FunctionTools tools) Does nothing; no prompt tools are registered.voidaddResources(FunctionTools tools) Does nothing; no resource tools are registered.voidaddTools(FunctionTools tools, String[] enabledTools) Does nothing; no function tools are registered.voidclear()Does nothing because this provider does not retain prompts or other request state.Returns the empty tool-name list because this provider never registers tools.voidinit(String model, Configurator conf) Does nothing; the given model and configurator are discarded.voidinstructions(String instructions) Does nothing; the given instructions are discarded.perform()Performs no AI processing.voidDoes nothing; the given prompt text is discarded.voidsetErrorHandling(boolean errorHandling) Does nothing; the given error-handling flag is discarded.voidsetProjectDir(File projectDir) Does nothing; the given project directory is discarded.
-
Field Details
-
logger
private static final org.slf4j.Logger loggerLogger used when diagnostic logging is enabled with thelogmodel. -
loggingOn
private boolean loggingOnWhether provider calls should be logged at INFO level.
-
-
Constructor Details
-
NoneProvider
public NoneProvider()
-
-
Method Details
-
init
Does nothing; the given model and configurator are discarded.- Specified by:
initin interfaceProcessProvider- Parameters:
model- model/provider identifier; ignoredconf- configuration source; ignored
-
prompt
Does nothing; the given prompt text is discarded.- Specified by:
promptin interfaceProcessProvider- Parameters:
text- prompt text; ignored
-
clear
public void clear()Does nothing because this provider does not retain prompts or other request state.- Specified by:
clearin interfaceProcessProvider
-
instructions
Does nothing; the given instructions are discarded.- Specified by:
instructionsin interfaceProcessProvider- Parameters:
instructions- system-level instructions; ignored
-
perform
Performs no AI processing.- Specified by:
performin interfaceProcessProvider- Returns:
- always
null
-
addTools
Does nothing; no function tools are registered.- Specified by:
addToolsin interfaceProcessProvider- Parameters:
tools- function tools to register; ignoredenabledTools- names of enabled tools; ignored
-
addPrompts
Does nothing; no prompt tools are registered.- Specified by:
addPromptsin interfaceProcessProvider- Parameters:
tools- prompt definitions to register; ignored
-
addResources
Does nothing; no resource tools are registered.- Specified by:
addResourcesin interfaceProcessProvider- Parameters:
tools- resource definitions to register; ignored
-
setProjectDir
Does nothing; the given project directory is discarded.- Specified by:
setProjectDirin interfaceProcessProvider- Parameters:
projectDir- project root directory; ignored
-
setErrorHandling
public void setErrorHandling(boolean errorHandling) Does nothing; the given error-handling flag is discarded.- Specified by:
setErrorHandlingin interfaceProcessProvider- Parameters:
errorHandling- whether error handling should be enabled; ignored
-
getToolNames
Returns the empty tool-name list because this provider never registers tools.- Specified by:
getToolNamesin interfaceProcessProvider- Returns:
- an immutable empty list
-