
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
Given the function $f(x)=a^{2}e^{x}-3ax+2\sin x-1$, where $a\in \mathbb{R}$.  
$(1)$ When $0 \lt a \lt 1$, find the maximum area of the triangle formed by the tangent line to the curve $y=f(x)$ at the point $(0,f(0))$ and the two coordinate axes.  
$(2)$ When $x=0$, the function $f(x)$ reaches an extremum. Find the value of $a$.

Present the answer in LaTex format: \boxed{Your answer}
user