()
| 605 | } |
| 606 | |
| 607 | func (c *PTYConversation) Text() string { |
| 608 | c.lock.Lock() |
| 609 | defer c.lock.Unlock() |
| 610 | |
| 611 | snapshots := c.snapshotBuffer.GetAll() |
| 612 | if len(snapshots) == 0 { |
| 613 | return "" |
| 614 | } |
| 615 | return snapshots[len(snapshots)-1].screen |
| 616 | } |
| 617 | |
| 618 | func (c *PTYConversation) SaveState() error { |
| 619 | c.lock.Lock() |