@theia/ai-ide 1.71.0-next.8 → 1.71.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/agent-mode-confirmation-service.d.ts.map +1 -1
- package/lib/browser/agent-mode-confirmation-service.js +15 -15
- package/lib/browser/agent-mode-confirmation-service.js.map +1 -1
- package/lib/browser/ai-configuration/agent-configuration-widget.js +2 -2
- package/lib/browser/ai-configuration/agent-configuration-widget.js.map +1 -1
- package/lib/browser/ai-configuration/ai-configuration-view-contribution.js +1 -1
- package/lib/browser/ai-configuration/ai-configuration-view-contribution.js.map +1 -1
- package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.d.ts.map +1 -1
- package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.js +2 -1
- package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.js.map +1 -1
- package/lib/browser/ai-configuration/skills-configuration-widget.d.ts.map +1 -1
- package/lib/browser/ai-configuration/skills-configuration-widget.js +2 -1
- package/lib/browser/ai-configuration/skills-configuration-widget.js.map +1 -1
- package/lib/browser/ai-ide-activation-service.d.ts +10 -1
- package/lib/browser/ai-ide-activation-service.d.ts.map +1 -1
- package/lib/browser/ai-ide-activation-service.js +41 -1
- package/lib/browser/ai-ide-activation-service.js.map +1 -1
- package/lib/browser/ai-workspace-restriction-contribution.d.ts +7 -0
- package/lib/browser/ai-workspace-restriction-contribution.d.ts.map +1 -0
- package/lib/browser/ai-workspace-restriction-contribution.js +42 -0
- package/lib/browser/ai-workspace-restriction-contribution.js.map +1 -0
- package/lib/browser/app-tester-prompt-template.js +1 -1
- package/lib/browser/architect-agent.d.ts +1 -0
- package/lib/browser/architect-agent.d.ts.map +1 -1
- package/lib/browser/architect-agent.js +5 -3
- package/lib/browser/architect-agent.js.map +1 -1
- package/lib/browser/architect-prompt-template.js +3 -3
- package/lib/browser/chat-session-card-action-contribution.js +1 -1
- package/lib/browser/chat-session-card-action-contribution.js.map +1 -1
- package/lib/browser/chat-sessions-welcome-message-provider.d.ts +1 -0
- package/lib/browser/chat-sessions-welcome-message-provider.d.ts.map +1 -1
- package/lib/browser/chat-sessions-welcome-message-provider.js +7 -1
- package/lib/browser/chat-sessions-welcome-message-provider.js.map +1 -1
- package/lib/browser/code-reviewer-agent.d.ts +1 -0
- package/lib/browser/code-reviewer-agent.d.ts.map +1 -1
- package/lib/browser/code-reviewer-agent.js +1 -0
- package/lib/browser/code-reviewer-agent.js.map +1 -1
- package/lib/browser/coder-agent.d.ts +4 -0
- package/lib/browser/coder-agent.d.ts.map +1 -1
- package/lib/browser/coder-agent.js +28 -4
- package/lib/browser/coder-agent.js.map +1 -1
- package/lib/browser/create-skill-agent.d.ts +1 -0
- package/lib/browser/create-skill-agent.d.ts.map +1 -1
- package/lib/browser/create-skill-agent.js +1 -0
- package/lib/browser/create-skill-agent.js.map +1 -1
- package/lib/browser/explore-agent.d.ts +1 -0
- package/lib/browser/explore-agent.d.ts.map +1 -1
- package/lib/browser/explore-agent.js +1 -0
- package/lib/browser/explore-agent.js.map +1 -1
- package/lib/browser/file-changeset-functions.d.ts.map +1 -1
- package/lib/browser/file-changeset-functions.js +17 -9
- package/lib/browser/file-changeset-functions.js.map +1 -1
- package/lib/browser/frontend-module.d.ts.map +1 -1
- package/lib/browser/frontend-module.js +12 -10
- package/lib/browser/frontend-module.js.map +1 -1
- package/lib/browser/github-capability-contribution.js +1 -1
- package/lib/browser/github-capability-contribution.js.map +1 -1
- package/lib/browser/github-prompt-template.js +1 -1
- package/lib/browser/ide-chat-welcome-message-provider.d.ts +4 -0
- package/lib/browser/ide-chat-welcome-message-provider.d.ts.map +1 -1
- package/lib/browser/ide-chat-welcome-message-provider.js +34 -0
- package/lib/browser/ide-chat-welcome-message-provider.js.map +1 -1
- package/lib/browser/project-info-agent.d.ts +1 -0
- package/lib/browser/project-info-agent.d.ts.map +1 -1
- package/lib/browser/project-info-agent.js +1 -0
- package/lib/browser/project-info-agent.js.map +1 -1
- package/lib/browser/{junior-agent.d.ts → review/pr-review-agent.d.ts} +7 -5
- package/lib/browser/review/pr-review-agent.d.ts.map +1 -0
- package/lib/browser/{junior-agent.js → review/pr-review-agent.js} +17 -15
- package/lib/browser/review/pr-review-agent.js.map +1 -0
- package/lib/browser/review/pr-review-prompt-template.d.ts +4 -0
- package/lib/browser/review/pr-review-prompt-template.d.ts.map +1 -0
- package/lib/browser/review/pr-review-prompt-template.js +437 -0
- package/lib/browser/review/pr-review-prompt-template.js.map +1 -0
- package/lib/browser/template-preference-contribution.d.ts +2 -0
- package/lib/browser/template-preference-contribution.d.ts.map +1 -1
- package/lib/browser/template-preference-contribution.js +43 -14
- package/lib/browser/template-preference-contribution.js.map +1 -1
- package/lib/browser/todo-tool-renderer.d.ts +1 -1
- package/lib/browser/todo-tool-renderer.d.ts.map +1 -1
- package/lib/browser/todo-tool-renderer.js +1 -1
- package/lib/browser/todo-tool-renderer.js.map +1 -1
- package/lib/browser/todo-tool.d.ts +0 -1
- package/lib/browser/todo-tool.d.ts.map +1 -1
- package/lib/browser/todo-tool.js +36 -16
- package/lib/browser/todo-tool.js.map +1 -1
- package/lib/browser/todo-tool.spec.d.ts +2 -0
- package/lib/browser/todo-tool.spec.d.ts.map +1 -0
- package/lib/browser/todo-tool.spec.js +44 -0
- package/lib/browser/todo-tool.spec.js.map +1 -0
- package/lib/browser/user-interaction-tool-renderer.d.ts +18 -0
- package/lib/browser/user-interaction-tool-renderer.d.ts.map +1 -0
- package/lib/browser/user-interaction-tool-renderer.js +330 -0
- package/lib/browser/user-interaction-tool-renderer.js.map +1 -0
- package/lib/browser/user-interaction-tool.d.ts +47 -0
- package/lib/browser/user-interaction-tool.d.ts.map +1 -0
- package/lib/browser/user-interaction-tool.js +397 -0
- package/lib/browser/user-interaction-tool.js.map +1 -0
- package/lib/browser/user-interaction-tool.spec.d.ts +2 -0
- package/lib/browser/user-interaction-tool.spec.d.ts.map +1 -0
- package/lib/browser/user-interaction-tool.spec.js +336 -0
- package/lib/browser/user-interaction-tool.spec.js.map +1 -0
- package/lib/browser/workspace-functions.d.ts.map +1 -1
- package/lib/browser/workspace-functions.js +9 -2
- package/lib/browser/workspace-functions.js.map +1 -1
- package/lib/browser/workspace-launch-provider.d.ts.map +1 -1
- package/lib/browser/workspace-launch-provider.js +9 -4
- package/lib/browser/workspace-launch-provider.js.map +1 -1
- package/lib/browser/workspace-launch-provider.spec.js +4 -4
- package/lib/browser/workspace-launch-provider.spec.js.map +1 -1
- package/lib/browser/workspace-task-provider.d.ts.map +1 -1
- package/lib/browser/workspace-task-provider.js +4 -1
- package/lib/browser/workspace-task-provider.js.map +1 -1
- package/lib/browser/workspace-task-provider.spec.js +90 -1
- package/lib/browser/workspace-task-provider.spec.js.map +1 -1
- package/lib/common/ai-ide-preferences.d.ts +1 -1
- package/lib/common/ai-ide-preferences.d.ts.map +1 -1
- package/lib/common/ai-ide-preferences.js +6 -6
- package/lib/common/ai-ide-preferences.js.map +1 -1
- package/lib/common/coder-replace-prompt-template.d.ts.map +1 -1
- package/lib/common/coder-replace-prompt-template.js +133 -17
- package/lib/common/coder-replace-prompt-template.js.map +1 -1
- package/lib/common/command-chat-agents.d.ts +1 -0
- package/lib/common/command-chat-agents.d.ts.map +1 -1
- package/lib/common/command-chat-agents.js +1 -0
- package/lib/common/command-chat-agents.js.map +1 -1
- package/lib/common/command-prompt-template.js +1 -1
- package/lib/common/orchestrator-chat-agent.d.ts.map +1 -1
- package/lib/common/orchestrator-chat-agent.js +2 -2
- package/lib/common/orchestrator-chat-agent.js.map +1 -1
- package/lib/common/universal-chat-agent.d.ts +1 -0
- package/lib/common/universal-chat-agent.d.ts.map +1 -1
- package/lib/common/universal-chat-agent.js +1 -0
- package/lib/common/universal-chat-agent.js.map +1 -1
- package/lib/common/universal-prompt-template.js +1 -1
- package/lib/common/user-interaction-tool.d.ts +53 -0
- package/lib/common/user-interaction-tool.d.ts.map +1 -0
- package/lib/common/user-interaction-tool.js +176 -0
- package/lib/common/user-interaction-tool.js.map +1 -0
- package/lib/common/user-interaction-tool.spec.d.ts +2 -0
- package/lib/common/user-interaction-tool.spec.d.ts.map +1 -0
- package/lib/common/user-interaction-tool.spec.js +216 -0
- package/lib/common/user-interaction-tool.spec.js.map +1 -0
- package/package.json +27 -27
- package/src/browser/agent-mode-confirmation-service.ts +19 -18
- package/src/browser/ai-configuration/agent-configuration-widget.tsx +2 -2
- package/src/browser/ai-configuration/ai-configuration-view-contribution.ts +1 -1
- package/src/browser/ai-configuration/prompt-fragments-configuration-widget.tsx +2 -1
- package/src/browser/ai-configuration/skills-configuration-widget.tsx +2 -1
- package/src/browser/ai-ide-activation-service.ts +43 -3
- package/src/browser/ai-workspace-restriction-contribution.ts +39 -0
- package/src/browser/app-tester-prompt-template.ts +1 -1
- package/src/browser/architect-agent.ts +6 -3
- package/src/browser/architect-prompt-template.ts +3 -3
- package/src/browser/chat-session-card-action-contribution.ts +1 -1
- package/src/browser/chat-sessions-welcome-message-provider.tsx +11 -2
- package/src/browser/code-reviewer-agent.ts +1 -0
- package/src/browser/coder-agent.ts +31 -4
- package/src/browser/create-skill-agent.ts +1 -0
- package/src/browser/explore-agent.ts +1 -0
- package/src/browser/file-changeset-functions.ts +17 -8
- package/src/browser/frontend-module.ts +14 -12
- package/src/browser/github-capability-contribution.ts +1 -1
- package/src/browser/github-prompt-template.ts +1 -1
- package/src/browser/ide-chat-welcome-message-provider.tsx +53 -0
- package/src/browser/project-info-agent.ts +1 -1
- package/src/browser/{context-reviewer-agent.ts → review/pr-review-agent.ts} +13 -11
- package/src/browser/review/pr-review-prompt-template.ts +449 -0
- package/src/browser/style/index.css +299 -0
- package/src/browser/template-preference-contribution.ts +40 -14
- package/src/browser/todo-tool-renderer.tsx +1 -1
- package/src/browser/todo-tool.spec.ts +49 -0
- package/src/browser/todo-tool.ts +35 -14
- package/src/browser/user-interaction-tool-renderer.tsx +531 -0
- package/src/browser/user-interaction-tool.spec.ts +396 -0
- package/src/browser/user-interaction-tool.ts +423 -0
- package/src/browser/workspace-functions.ts +10 -3
- package/src/browser/workspace-launch-provider.spec.ts +4 -4
- package/src/browser/workspace-launch-provider.ts +10 -6
- package/src/browser/workspace-task-provider.spec.ts +119 -1
- package/src/browser/workspace-task-provider.ts +4 -1
- package/src/common/ai-ide-preferences.ts +7 -7
- package/src/common/coder-replace-prompt-template.ts +133 -17
- package/src/common/command-chat-agents.ts +1 -0
- package/src/common/command-prompt-template.ts +1 -1
- package/src/common/orchestrator-chat-agent.ts +2 -2
- package/src/common/universal-chat-agent.ts +1 -0
- package/src/common/universal-prompt-template.ts +1 -1
- package/src/common/user-interaction-tool.spec.ts +241 -0
- package/src/common/user-interaction-tool.ts +237 -0
- package/lib/browser/context-reviewer-agent.d.ts +0 -17
- package/lib/browser/context-reviewer-agent.d.ts.map +0 -1
- package/lib/browser/context-reviewer-agent.js +0 -45
- package/lib/browser/context-reviewer-agent.js.map +0 -1
- package/lib/browser/context-reviewer-prompt-template.d.ts +0 -4
- package/lib/browser/context-reviewer-prompt-template.d.ts.map +0 -1
- package/lib/browser/context-reviewer-prompt-template.js +0 -160
- package/lib/browser/context-reviewer-prompt-template.js.map +0 -1
- package/lib/browser/junior-agent.d.ts.map +0 -1
- package/lib/browser/junior-agent.js.map +0 -1
- package/lib/browser/junior-plan-capability-contribution.d.ts +0 -8
- package/lib/browser/junior-plan-capability-contribution.d.ts.map +0 -1
- package/lib/browser/junior-plan-capability-contribution.js +0 -131
- package/lib/browser/junior-plan-capability-contribution.js.map +0 -1
- package/lib/browser/junior-prompt-template.d.ts +0 -4
- package/lib/browser/junior-prompt-template.d.ts.map +0 -1
- package/lib/browser/junior-prompt-template.js +0 -149
- package/lib/browser/junior-prompt-template.js.map +0 -1
- package/src/browser/context-reviewer-prompt-template.ts +0 -160
- package/src/browser/junior-agent.ts +0 -40
- package/src/browser/junior-plan-capability-contribution.ts +0 -129
- package/src/browser/junior-prompt-template.ts +0 -149
|
@@ -1632,3 +1632,302 @@
|
|
|
1632
1632
|
margin-top: calc(var(--theia-ui-padding) / 2);
|
|
1633
1633
|
margin-bottom: var(--theia-ui-padding);
|
|
1634
1634
|
}
|
|
1635
|
+
|
|
1636
|
+
/* User Interaction Tool Renderer Styles */
|
|
1637
|
+
.user-interaction-tool.title {
|
|
1638
|
+
font-weight: 600;
|
|
1639
|
+
font-family: var(--theia-ui-font-family);
|
|
1640
|
+
font-size: var(--theia-ui-font-size1);
|
|
1641
|
+
flex: 1;
|
|
1642
|
+
}
|
|
1643
|
+
|
|
1644
|
+
.user-interaction-tool.status {
|
|
1645
|
+
display: inline-flex;
|
|
1646
|
+
align-items: center;
|
|
1647
|
+
gap: calc(var(--theia-ui-padding) / 2);
|
|
1648
|
+
font-size: var(--theia-ui-font-size0);
|
|
1649
|
+
margin-left: auto;
|
|
1650
|
+
white-space: nowrap;
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1653
|
+
.user-interaction-tool.status.completed {
|
|
1654
|
+
color: var(--theia-gitDecoration-addedResourceForeground, var(--theia-descriptionForeground));
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
.user-interaction-tool.status.canceled {
|
|
1658
|
+
color: var(--theia-errorForeground);
|
|
1659
|
+
}
|
|
1660
|
+
|
|
1661
|
+
.user-interaction-tool.status.waiting {
|
|
1662
|
+
color: var(--theia-disabledForeground);
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
/* Reuses the dots keyframes defined by ai-chat-ui's chat node header marker.
|
|
1666
|
+
The fixed width reserves space for the longest dots state ("...") so the
|
|
1667
|
+
label doesn't shift horizontally as the dots animate. */
|
|
1668
|
+
.user-interaction-tool.status.waiting::after {
|
|
1669
|
+
content: "";
|
|
1670
|
+
display: inline-block;
|
|
1671
|
+
width: 1.2em;
|
|
1672
|
+
text-align: left;
|
|
1673
|
+
animation: dots 1s steps(1, end) infinite;
|
|
1674
|
+
}
|
|
1675
|
+
|
|
1676
|
+
.user-interaction-tool.progress {
|
|
1677
|
+
display: flex;
|
|
1678
|
+
gap: 4px;
|
|
1679
|
+
padding: 0 calc(var(--theia-ui-padding) * 2) calc(var(--theia-ui-padding) * 2);
|
|
1680
|
+
}
|
|
1681
|
+
|
|
1682
|
+
.user-interaction-tool.progress-dot {
|
|
1683
|
+
position: relative;
|
|
1684
|
+
flex: 1;
|
|
1685
|
+
height: 3px;
|
|
1686
|
+
padding: 0;
|
|
1687
|
+
border: none;
|
|
1688
|
+
border-radius: 2px;
|
|
1689
|
+
background-color: var(--theia-widget-border);
|
|
1690
|
+
cursor: pointer;
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
/* Expands the hit target above and below the slim visible bar so the
|
|
1694
|
+
button is easier to click without changing its visual size. */
|
|
1695
|
+
.user-interaction-tool.progress-dot::after {
|
|
1696
|
+
content: "";
|
|
1697
|
+
position: absolute;
|
|
1698
|
+
inset: -8px -2px;
|
|
1699
|
+
}
|
|
1700
|
+
|
|
1701
|
+
.user-interaction-tool.progress-dot:hover {
|
|
1702
|
+
background-color: var(--theia-button-hoverBackground);
|
|
1703
|
+
}
|
|
1704
|
+
|
|
1705
|
+
.user-interaction-tool.progress-dot:focus-visible {
|
|
1706
|
+
outline: 1px solid var(--theia-focusBorder);
|
|
1707
|
+
outline-offset: 2px;
|
|
1708
|
+
}
|
|
1709
|
+
|
|
1710
|
+
.user-interaction-tool.progress-dot.done {
|
|
1711
|
+
background-color: var(--theia-button-background);
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
.user-interaction-tool.progress-dot.active {
|
|
1715
|
+
background-color: var(--theia-focusBorder);
|
|
1716
|
+
}
|
|
1717
|
+
|
|
1718
|
+
.user-interaction-tool.links {
|
|
1719
|
+
display: flex;
|
|
1720
|
+
flex-wrap: wrap;
|
|
1721
|
+
gap: calc(var(--theia-ui-padding) / 2);
|
|
1722
|
+
padding: 0 calc(var(--theia-ui-padding) * 2) var(--theia-ui-padding);
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
.user-interaction-tool.link-button {
|
|
1726
|
+
display: inline-flex;
|
|
1727
|
+
align-items: center;
|
|
1728
|
+
gap: calc(var(--theia-ui-padding) / 2);
|
|
1729
|
+
padding: calc(var(--theia-ui-padding) / 2) var(--theia-ui-padding);
|
|
1730
|
+
background-color: var(--theia-button-secondaryBackground);
|
|
1731
|
+
color: var(--theia-button-secondaryForeground);
|
|
1732
|
+
border: 1px solid var(--theia-button-border);
|
|
1733
|
+
border-radius: 4px;
|
|
1734
|
+
cursor: pointer;
|
|
1735
|
+
font-size: var(--theia-ui-font-size1);
|
|
1736
|
+
transition: background-color 0.15s;
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1739
|
+
.user-interaction-tool.link-button:hover {
|
|
1740
|
+
background-color: var(--theia-button-secondaryHoverBackground);
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1743
|
+
.user-interaction-tool.message {
|
|
1744
|
+
padding: 0 calc(var(--theia-ui-padding) * 2);
|
|
1745
|
+
color: var(--theia-foreground);
|
|
1746
|
+
line-height: 1.5;
|
|
1747
|
+
/* Allow this flex child to shrink below the intrinsic width of its
|
|
1748
|
+
contents (e.g. wide code blocks) instead of pushing the wizard wider. */
|
|
1749
|
+
min-width: 0;
|
|
1750
|
+
max-width: 100%;
|
|
1751
|
+
box-sizing: border-box;
|
|
1752
|
+
}
|
|
1753
|
+
|
|
1754
|
+
.user-interaction-tool.message p {
|
|
1755
|
+
margin: 0 0 calc(var(--theia-ui-padding) / 2) 0;
|
|
1756
|
+
}
|
|
1757
|
+
|
|
1758
|
+
.user-interaction-tool.message p:last-child {
|
|
1759
|
+
margin-bottom: 0;
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1762
|
+
.user-interaction-tool.message pre {
|
|
1763
|
+
max-width: 100%;
|
|
1764
|
+
overflow-x: auto;
|
|
1765
|
+
}
|
|
1766
|
+
|
|
1767
|
+
.user-interaction-tool.message code {
|
|
1768
|
+
word-break: break-word;
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1771
|
+
.user-interaction-tool.message pre code {
|
|
1772
|
+
word-break: normal;
|
|
1773
|
+
}
|
|
1774
|
+
|
|
1775
|
+
.user-interaction-tool.options {
|
|
1776
|
+
display: flex;
|
|
1777
|
+
flex-wrap: wrap;
|
|
1778
|
+
gap: var(--theia-ui-padding);
|
|
1779
|
+
padding: var(--theia-ui-padding) calc(var(--theia-ui-padding) * 2);
|
|
1780
|
+
}
|
|
1781
|
+
|
|
1782
|
+
.user-interaction-tool.option-button {
|
|
1783
|
+
/* Stack the label and the hidden bold spacer in the same grid cell so the
|
|
1784
|
+
button reserves bold width up-front and does not grow when selected. */
|
|
1785
|
+
display: inline-grid;
|
|
1786
|
+
place-items: center;
|
|
1787
|
+
margin-left: 0;
|
|
1788
|
+
padding: calc(var(--theia-ui-padding) * 1.5) calc(var(--theia-ui-padding) * 4);
|
|
1789
|
+
font-size: var(--theia-ui-font-size1);
|
|
1790
|
+
min-width: 100px;
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1793
|
+
.user-interaction-tool.option-button-label,
|
|
1794
|
+
.user-interaction-tool.option-button-bold-spacer {
|
|
1795
|
+
grid-area: 1 / 1;
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1798
|
+
.user-interaction-tool.option-button-bold-spacer {
|
|
1799
|
+
font-weight: bold;
|
|
1800
|
+
visibility: hidden;
|
|
1801
|
+
pointer-events: none;
|
|
1802
|
+
}
|
|
1803
|
+
|
|
1804
|
+
.user-interaction-tool.option-button.selected .user-interaction-tool.option-button-label {
|
|
1805
|
+
font-weight: bold;
|
|
1806
|
+
}
|
|
1807
|
+
|
|
1808
|
+
.user-interaction-tool.option-button:disabled {
|
|
1809
|
+
opacity: 0.6;
|
|
1810
|
+
cursor: default;
|
|
1811
|
+
}
|
|
1812
|
+
|
|
1813
|
+
.user-interaction-tool.pending-text {
|
|
1814
|
+
color: var(--theia-descriptionForeground);
|
|
1815
|
+
font-style: italic;
|
|
1816
|
+
}
|
|
1817
|
+
|
|
1818
|
+
.user-interaction-tool.comment-section {
|
|
1819
|
+
display: flex;
|
|
1820
|
+
flex-direction: column;
|
|
1821
|
+
gap: calc(var(--theia-ui-padding) / 2);
|
|
1822
|
+
padding: calc(var(--theia-ui-padding) * 2) calc(var(--theia-ui-padding) * 2) var(--theia-ui-padding);
|
|
1823
|
+
}
|
|
1824
|
+
|
|
1825
|
+
.user-interaction-tool.comment-input-row {
|
|
1826
|
+
display: flex;
|
|
1827
|
+
gap: var(--theia-ui-padding);
|
|
1828
|
+
align-items: center;
|
|
1829
|
+
}
|
|
1830
|
+
|
|
1831
|
+
.user-interaction-tool.comment-input-field {
|
|
1832
|
+
flex: 1;
|
|
1833
|
+
box-sizing: border-box;
|
|
1834
|
+
}
|
|
1835
|
+
|
|
1836
|
+
.user-interaction-tool.comment-submit {
|
|
1837
|
+
white-space: nowrap;
|
|
1838
|
+
}
|
|
1839
|
+
|
|
1840
|
+
.user-interaction-tool.comment-list {
|
|
1841
|
+
list-style: none;
|
|
1842
|
+
margin: 0;
|
|
1843
|
+
padding: 0;
|
|
1844
|
+
display: flex;
|
|
1845
|
+
flex-direction: column;
|
|
1846
|
+
gap: calc(var(--theia-ui-padding) / 2);
|
|
1847
|
+
}
|
|
1848
|
+
|
|
1849
|
+
.user-interaction-tool.comment-item {
|
|
1850
|
+
display: flex;
|
|
1851
|
+
align-items: flex-start;
|
|
1852
|
+
justify-content: space-between;
|
|
1853
|
+
gap: var(--theia-ui-padding);
|
|
1854
|
+
padding: calc(var(--theia-ui-padding) / 2) var(--theia-ui-padding);
|
|
1855
|
+
background-color: var(--theia-editorWidget-background);
|
|
1856
|
+
border: 1px solid var(--theia-widget-border);
|
|
1857
|
+
border-radius: 3px;
|
|
1858
|
+
}
|
|
1859
|
+
|
|
1860
|
+
.user-interaction-tool.comment-text {
|
|
1861
|
+
flex: 1;
|
|
1862
|
+
white-space: pre-wrap;
|
|
1863
|
+
word-break: break-word;
|
|
1864
|
+
}
|
|
1865
|
+
|
|
1866
|
+
.user-interaction-tool.comment-remove {
|
|
1867
|
+
background: transparent;
|
|
1868
|
+
border: none;
|
|
1869
|
+
color: var(--theia-icon-foreground);
|
|
1870
|
+
cursor: pointer;
|
|
1871
|
+
padding: 2px;
|
|
1872
|
+
display: inline-flex;
|
|
1873
|
+
align-items: center;
|
|
1874
|
+
border-radius: 3px;
|
|
1875
|
+
}
|
|
1876
|
+
|
|
1877
|
+
.user-interaction-tool.comment-remove:hover {
|
|
1878
|
+
background-color: var(--theia-list-hoverBackground);
|
|
1879
|
+
}
|
|
1880
|
+
|
|
1881
|
+
.user-interaction-tool.advance-row {
|
|
1882
|
+
display: flex;
|
|
1883
|
+
justify-content: space-between;
|
|
1884
|
+
align-items: center;
|
|
1885
|
+
gap: var(--theia-ui-padding);
|
|
1886
|
+
padding: calc(var(--theia-ui-padding) * 1.5) calc(var(--theia-ui-padding) * 2);
|
|
1887
|
+
margin-top: calc(var(--theia-ui-padding) * 1.5);
|
|
1888
|
+
background-color: var(--theia-titleBar-inactiveBackground, var(--theia-editorGroupHeader-tabsBackground));
|
|
1889
|
+
border-top: 2px solid var(--theia-focusBorder);
|
|
1890
|
+
border-bottom-left-radius: inherit;
|
|
1891
|
+
border-bottom-right-radius: inherit;
|
|
1892
|
+
}
|
|
1893
|
+
|
|
1894
|
+
.user-interaction-tool.page-counter {
|
|
1895
|
+
font-family: var(--theia-code-font-family);
|
|
1896
|
+
font-size: var(--theia-ui-font-size1);
|
|
1897
|
+
font-weight: 500;
|
|
1898
|
+
color: var(--theia-descriptionForeground);
|
|
1899
|
+
letter-spacing: 0.05em;
|
|
1900
|
+
flex: 1;
|
|
1901
|
+
text-align: center;
|
|
1902
|
+
}
|
|
1903
|
+
|
|
1904
|
+
.user-interaction-tool.back-button,
|
|
1905
|
+
.user-interaction-tool.advance-button {
|
|
1906
|
+
display: inline-flex;
|
|
1907
|
+
align-items: center;
|
|
1908
|
+
gap: calc(var(--theia-ui-padding) / 2);
|
|
1909
|
+
padding: calc(var(--theia-ui-padding)) calc(var(--theia-ui-padding) * 2.5);
|
|
1910
|
+
font-size: var(--theia-ui-font-size1);
|
|
1911
|
+
min-width: 110px;
|
|
1912
|
+
border-radius: 4px;
|
|
1913
|
+
font-weight: 500;
|
|
1914
|
+
text-transform: uppercase;
|
|
1915
|
+
letter-spacing: 0.05em;
|
|
1916
|
+
}
|
|
1917
|
+
|
|
1918
|
+
.user-interaction-tool.back-button {
|
|
1919
|
+
justify-content: flex-start;
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1922
|
+
.user-interaction-tool.advance-button {
|
|
1923
|
+
justify-content: flex-end;
|
|
1924
|
+
}
|
|
1925
|
+
|
|
1926
|
+
.user-interaction-tool.back-button:disabled {
|
|
1927
|
+
visibility: hidden;
|
|
1928
|
+
}
|
|
1929
|
+
|
|
1930
|
+
.user-interaction-tool.option-button.selected {
|
|
1931
|
+
outline: 2px solid var(--theia-focusBorder);
|
|
1932
|
+
outline-offset: -2px;
|
|
1933
|
+
}
|
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
} from '../common/workspace-preferences';
|
|
25
25
|
import { WorkspaceService } from '@theia/workspace/lib/browser';
|
|
26
26
|
import { Path, PreferenceService } from '@theia/core';
|
|
27
|
+
import { WorkspaceTrustService } from '@theia/workspace/lib/browser/workspace-trust-service';
|
|
27
28
|
|
|
28
29
|
@injectable()
|
|
29
30
|
export class TemplatePreferenceContribution implements FrontendApplicationContribution {
|
|
@@ -37,8 +38,15 @@ export class TemplatePreferenceContribution implements FrontendApplicationContri
|
|
|
37
38
|
@inject(WorkspaceService)
|
|
38
39
|
protected readonly workspaceService: WorkspaceService;
|
|
39
40
|
|
|
41
|
+
@inject(WorkspaceTrustService)
|
|
42
|
+
protected readonly workspaceTrustService: WorkspaceTrustService;
|
|
43
|
+
|
|
40
44
|
onStart(): void {
|
|
41
|
-
Promise.all([
|
|
45
|
+
Promise.all([
|
|
46
|
+
this.preferenceService.ready,
|
|
47
|
+
this.workspaceService.ready,
|
|
48
|
+
this.workspaceTrustService.getWorkspaceTrust()
|
|
49
|
+
]).then(() => {
|
|
42
50
|
// Set initial template configuration from preferences
|
|
43
51
|
this.updateConfiguration();
|
|
44
52
|
|
|
@@ -55,6 +63,11 @@ export class TemplatePreferenceContribution implements FrontendApplicationContri
|
|
|
55
63
|
this.workspaceService.onWorkspaceLocationChanged(() => {
|
|
56
64
|
this.updateConfiguration();
|
|
57
65
|
});
|
|
66
|
+
|
|
67
|
+
// Listen for trust changes to reload/unload workspace templates
|
|
68
|
+
this.workspaceTrustService.onDidChangeWorkspaceTrust(() => {
|
|
69
|
+
this.updateConfiguration();
|
|
70
|
+
});
|
|
58
71
|
});
|
|
59
72
|
}
|
|
60
73
|
|
|
@@ -69,29 +82,42 @@ export class TemplatePreferenceContribution implements FrontendApplicationContri
|
|
|
69
82
|
return;
|
|
70
83
|
}
|
|
71
84
|
|
|
85
|
+
const trusted = await this.workspaceTrustService.getWorkspaceTrust();
|
|
72
86
|
const workspaceRootUri = workspaceRoot.resource;
|
|
73
87
|
const configProperties: PromptFragmentCustomizationProperties = {};
|
|
74
88
|
|
|
75
89
|
if (!changedPreference || changedPreference === PROMPT_TEMPLATE_WORKSPACE_DIRECTORIES_PREF) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
90
|
+
if (trusted) {
|
|
91
|
+
const relativeDirectories = this.preferenceService.get<string[]>(PROMPT_TEMPLATE_WORKSPACE_DIRECTORIES_PREF, []);
|
|
92
|
+
configProperties.directoryPaths = relativeDirectories.map(dir => {
|
|
93
|
+
const path = new Path(dir);
|
|
94
|
+
const uri = workspaceRootUri.resolve(path.toString());
|
|
95
|
+
return uri.path.toString();
|
|
96
|
+
});
|
|
97
|
+
} else {
|
|
98
|
+
configProperties.directoryPaths = [];
|
|
99
|
+
}
|
|
82
100
|
}
|
|
83
101
|
|
|
84
102
|
if (!changedPreference || changedPreference === PROMPT_TEMPLATE_ADDITIONAL_EXTENSIONS_PREF) {
|
|
85
|
-
|
|
103
|
+
if (trusted) {
|
|
104
|
+
configProperties.extensions = this.preferenceService.get<string[]>(PROMPT_TEMPLATE_ADDITIONAL_EXTENSIONS_PREF, []);
|
|
105
|
+
} else {
|
|
106
|
+
configProperties.extensions = [];
|
|
107
|
+
}
|
|
86
108
|
}
|
|
87
109
|
|
|
88
110
|
if (!changedPreference || changedPreference === PROMPT_TEMPLATE_WORKSPACE_FILES_PREF) {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
111
|
+
if (trusted) {
|
|
112
|
+
const relativeFilePaths = this.preferenceService.get<string[]>(PROMPT_TEMPLATE_WORKSPACE_FILES_PREF, []);
|
|
113
|
+
configProperties.filePaths = relativeFilePaths.map(filePath => {
|
|
114
|
+
const path = new Path(filePath);
|
|
115
|
+
const uri = workspaceRootUri.resolve(path.toString());
|
|
116
|
+
return uri.path.toString();
|
|
117
|
+
});
|
|
118
|
+
} else {
|
|
119
|
+
configProperties.filePaths = [];
|
|
120
|
+
}
|
|
95
121
|
}
|
|
96
122
|
|
|
97
123
|
await this.customizationService.updateConfiguration(configProperties);
|
|
@@ -22,7 +22,7 @@ import { ReactNode } from '@theia/core/shared/react';
|
|
|
22
22
|
import * as React from '@theia/core/shared/react';
|
|
23
23
|
import { codicon, ContextMenuRenderer } from '@theia/core/lib/browser';
|
|
24
24
|
import { nls } from '@theia/core';
|
|
25
|
-
import { TODO_WRITE_FUNCTION_ID, TodoItem, isValidTodoItem } from '
|
|
25
|
+
import { TODO_WRITE_FUNCTION_ID, TodoItem, isValidTodoItem } from '../common/todo-tool';
|
|
26
26
|
import { withToolCallConfirmation } from '@theia/ai-chat-ui/lib/browser/chat-response-renderer/tool-confirmation';
|
|
27
27
|
import { ToolConfirmationManager } from '@theia/ai-chat/lib/browser/chat-tool-preference-bindings';
|
|
28
28
|
import { ToolInvocationRegistry } from '@theia/ai-core';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2026 EclipseSource GmbH.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
|
|
17
|
+
import { expect } from 'chai';
|
|
18
|
+
import { isValidTodoItem } from '../common/todo-tool';
|
|
19
|
+
|
|
20
|
+
describe('isValidTodoItem', () => {
|
|
21
|
+
it('should accept a minimal valid item', () => {
|
|
22
|
+
expect(isValidTodoItem({ content: 'Do something', activeForm: 'Doing something', status: 'pending' })).to.be.true;
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
it('should accept all valid statuses', () => {
|
|
26
|
+
expect(isValidTodoItem({ content: 'X', activeForm: 'Xing', status: 'pending' })).to.be.true;
|
|
27
|
+
expect(isValidTodoItem({ content: 'X', activeForm: 'Xing', status: 'in_progress' })).to.be.true;
|
|
28
|
+
expect(isValidTodoItem({ content: 'X', activeForm: 'Xing', status: 'completed' })).to.be.true;
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it('should reject non-object values', () => {
|
|
32
|
+
expect(isValidTodoItem(undefined)).to.be.false;
|
|
33
|
+
expect(isValidTodoItem('string')).to.be.false;
|
|
34
|
+
expect(isValidTodoItem(42)).to.be.false;
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it('should reject items with missing required fields', () => {
|
|
38
|
+
expect(isValidTodoItem({ status: 'pending' })).to.be.false;
|
|
39
|
+
expect(isValidTodoItem({ content: 'X' })).to.be.false;
|
|
40
|
+
expect(isValidTodoItem({ content: 'X', status: 'pending' })).to.be.false;
|
|
41
|
+
expect(isValidTodoItem({ content: 'X', activeForm: 'Xing' })).to.be.false;
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
it('should reject items with invalid status', () => {
|
|
45
|
+
expect(isValidTodoItem({ content: 'X', activeForm: 'Xing', status: 'unknown' })).to.be.false;
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
});
|
|
49
|
+
|
package/src/browser/todo-tool.ts
CHANGED
|
@@ -18,8 +18,6 @@ import { injectable } from '@theia/core/shared/inversify';
|
|
|
18
18
|
import { ToolProvider, ToolRequest } from '@theia/ai-core/lib/common';
|
|
19
19
|
import { TODO_WRITE_FUNCTION_ID, isValidTodoItem } from '../common/todo-tool';
|
|
20
20
|
|
|
21
|
-
export { TODO_WRITE_FUNCTION_ID, TodoItem, isValidTodoItem } from '../common/todo-tool';
|
|
22
|
-
|
|
23
21
|
@injectable()
|
|
24
22
|
export class TodoWriteTool implements ToolProvider {
|
|
25
23
|
static ID = TODO_WRITE_FUNCTION_ID;
|
|
@@ -29,20 +27,43 @@ export class TodoWriteTool implements ToolProvider {
|
|
|
29
27
|
id: TodoWriteTool.ID,
|
|
30
28
|
name: TodoWriteTool.ID,
|
|
31
29
|
providerName: 'ai-ide',
|
|
32
|
-
description: '
|
|
33
|
-
'
|
|
34
|
-
'
|
|
35
|
-
'
|
|
30
|
+
description: 'Create or replace a structured task list for the current session. ' +
|
|
31
|
+
'This helps you track progress, organize complex tasks, and demonstrate thoroughness to the user. ' +
|
|
32
|
+
'It also helps the user understand the progress and overall status of their requests.\n\n' +
|
|
33
|
+
'When to use:\n' +
|
|
34
|
+
'- Tasks requiring 3+ steps or careful planning\n' +
|
|
35
|
+
'- User provides multiple tasks or explicitly requests a todo list\n' +
|
|
36
|
+
'- After receiving new instructions — immediately capture requirements as todos\n' +
|
|
37
|
+
'Skip for single, trivial tasks, conversational or informational requests that need no tracking.\n' +
|
|
38
|
+
'When in doubt, use this tool.\n\n' +
|
|
39
|
+
'Task states:\n' +
|
|
40
|
+
'- pending: Task not yet started\n' +
|
|
41
|
+
'- in_progress: Currently working on (limit to ONE task at a time)\n' +
|
|
42
|
+
'- completed: Task finished successfully\n\n' +
|
|
43
|
+
'Task management:\n' +
|
|
44
|
+
'- Mark a task in_progress BEFORE starting work on it (one at a time)\n' +
|
|
45
|
+
'- Complete the current task before starting new ones\n' +
|
|
46
|
+
'- Mark tasks completed immediately after finishing — do not batch completions\n' +
|
|
47
|
+
'- Only mark completed when fully accomplished (no failing tests, no partial implementation, no unresolved errors)\n' +
|
|
48
|
+
'- If blocked, add a new task describing what needs to be resolved\n' +
|
|
49
|
+
'- Add follow-up tasks discovered during implementation\n' +
|
|
50
|
+
'- Remove tasks that are no longer relevant\n\n' +
|
|
51
|
+
'Task breakdown:\n' +
|
|
52
|
+
'- Create specific, actionable items\n' +
|
|
53
|
+
'- Break complex tasks into smaller, manageable steps\n' +
|
|
54
|
+
'- Use clear, descriptive task names\n\n' +
|
|
55
|
+
'Being proactive with task management demonstrates attentiveness and ensures you complete all requirements successfully.',
|
|
36
56
|
parameters: {
|
|
37
57
|
type: 'object',
|
|
38
58
|
properties: {
|
|
39
59
|
todos: {
|
|
40
60
|
type: 'array',
|
|
61
|
+
description: 'The updated todo list.',
|
|
41
62
|
items: {
|
|
42
63
|
type: 'object',
|
|
43
64
|
properties: {
|
|
44
|
-
content: { type: 'string', description: '
|
|
45
|
-
activeForm: { type: 'string', description: 'Continuous form
|
|
65
|
+
content: { type: 'string', description: 'Clear, actionable task description (e.g., "Extract TokenValidator from AuthService").' },
|
|
66
|
+
activeForm: { type: 'string', description: 'Continuous form shown during execution (e.g., "Extracting TokenValidator from AuthService").' },
|
|
46
67
|
status: { type: 'string', enum: ['pending', 'in_progress', 'completed'] }
|
|
47
68
|
},
|
|
48
69
|
required: ['content', 'activeForm', 'status']
|
|
@@ -59,14 +80,14 @@ export class TodoWriteTool implements ToolProvider {
|
|
|
59
80
|
}
|
|
60
81
|
const validTodos = todos.filter(isValidTodoItem);
|
|
61
82
|
const invalidCount = todos.length - validTodos.length;
|
|
83
|
+
const response: Record<string, unknown> = {
|
|
84
|
+
success: true,
|
|
85
|
+
count: validTodos.length,
|
|
86
|
+
};
|
|
62
87
|
if (invalidCount > 0) {
|
|
63
|
-
|
|
64
|
-
success: true,
|
|
65
|
-
count: validTodos.length,
|
|
66
|
-
warning: `${invalidCount} invalid todo item(s) were filtered out`
|
|
67
|
-
});
|
|
88
|
+
response.warning = `${invalidCount} invalid todo item(s) were filtered out`;
|
|
68
89
|
}
|
|
69
|
-
return JSON.stringify(
|
|
90
|
+
return JSON.stringify(response);
|
|
70
91
|
} catch (error) {
|
|
71
92
|
const message = error instanceof Error ? error.message : String(error);
|
|
72
93
|
return JSON.stringify({ error: `Failed to parse todos: ${message}` });
|