Refactor Knowledge struct into shared package
Moved the Knowledge struct and related types to the shared package, updating all references across the codebase. This improves modularity and enables better reuse of the Knowledge type across different components.
This commit is contained in:
@@ -24,13 +24,13 @@ type ConsoleConfig struct {
|
||||
OnCommandDone func(ctx context.Context, command string, output string, err error) error
|
||||
}
|
||||
|
||||
func (a Agent) Console(ctx context.Context, questions []string, cfg ConsoleConfig) (Knowledge, string, error) {
|
||||
func (a Agent) Console(ctx context.Context, questions []string, cfg ConsoleConfig) (shared.Knowledge, string, error) {
|
||||
|
||||
if cfg.MaxCommands <= 0 {
|
||||
cfg.MaxCommands = 10000
|
||||
}
|
||||
|
||||
var resKnowledge = Knowledge{
|
||||
var resKnowledge = shared.Knowledge{
|
||||
OriginalQuestions: questions,
|
||||
RemainingQuestions: questions,
|
||||
}
|
||||
|
Reference in New Issue
Block a user