• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kshard / thinker / 14181687602

31 Mar 2025 09:19PM UTC coverage: 61.033% (-4.9%) from 65.921%
14181687602

Pull #11

github

fogfish
add unit test for memory purge
Pull Request #11: enhance framework with composable primitives

7 of 81 new or added lines in 9 files covered. (8.64%)

390 of 639 relevant lines covered (61.03%)

0.65 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/memory/void.go
1
//
2
// Copyright (C) 2025 Dmitry Kolesnikov
3
//
4
// This file may be modified and distributed under the terms
5
// of the MIT license.  See the LICENSE file for details.
6
// https://github.com/kshard/thinker
7
//
8

9
package memory
10

11
import (
12
        "fmt"
13

14
        "github.com/kshard/chatter"
15
        "github.com/kshard/thinker"
16
)
17

18
// The void memory does not retain any observations.
19
type Void struct {
20
        stratum chatter.Stratum
21
}
22

23
// Create the void memory that does not retain any observations.
24
func NewVoid(stratum chatter.Stratum) *Void {
×
25
        return &Void{stratum: stratum}
×
26
}
×
27

28
// intentional the loss of memories, including facts, information and experiences
NEW
29
func (s *Void) Purge() {}
×
30

31
// Commit new observation into memory.
32
func (s *Void) Commit(e *thinker.Observation) {}
×
33

34
// Builds the context window for LLM using incoming prompt.
35
func (s *Void) Context(prompt chatter.Prompt) []fmt.Stringer {
×
36
        if len(s.stratum) == 0 {
×
37
                return prompt.ToSeq()
×
38
        }
×
39

40
        return []fmt.Stringer{s.stratum, prompt}
×
41
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc