I want to modify the listoftheorems command so that at the end of each chapter, I can give a list of the theorems or definitions within the last chapter, and I want these divided by section (it should look like the ToC with bolded section headers and then theorem/definition listings underneath). I am using amsthm and I want it to look a bit like ToC like list of definitions (using theorem environments) (except with sections instead of chapters, and I want it to be generated at the end of each chapter).
My current setup is,
\documentclass[12pt]{book}
\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}
\usepackage{etoolbox}
\usepackage{amsthm,thmtools}
% defining theorem environment
\declaretheorem[
numberwithin = section,
]{theorem}
\declaretheorem[
sibling=theorem,
]{definition}
\begin{document}
\chapter{TEST}
\section{First Section}
\begin{theorem}
This shouldn't be included in the list of theorems from chapter two
\end{theorem}
\chapter{Test}
\section{test}
\begin{definition}[test definition 1]
Test definition
\end{definition}
\begin{theorem}
Best theorem
\end{theorem}
\section{The next section}
\begin{theorem}
Test 2
\end{theorem}
\begin{theorem}
Test 3
\end{theorem}
Now here I want to add a list of the theorems from the last two sections.
\end{document}
I've tried without success to modify the listoftheorems command and adapt solutions from other threads to my need. Any help is much appreciated!

\documentclassand\begin{document} ... \end{document}with at least a dummy chapter and section.Then it will be easier for people to play with it and help you. – Alan Munn Aug 27 '15 at 23:59