11: Query most recent messages

kappa-view-list has a function called tail(limit, fn) that will watch the last limit messages of the sorted list and run fn as fn(msgs) whenever that window changes, supplying the new last limit messages.

Exercise

Copy your old code back over that lets you read process.stdin for lines of text & writes them to the feed.

Then, modify your code to listen for chat view changes and re-write the last 10 chat messages to the terminal.

Tips

Once you solve this exercise continue to exercise 12