@kirosnn/mosaic 0.71.0 → 0.73.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/README.md +1 -5
- package/package.json +4 -2
- package/src/agent/Agent.ts +353 -131
- package/src/agent/context.ts +4 -4
- package/src/agent/prompts/systemPrompt.ts +15 -6
- package/src/agent/prompts/toolsPrompt.ts +75 -10
- package/src/agent/provider/anthropic.ts +100 -100
- package/src/agent/provider/google.ts +102 -102
- package/src/agent/provider/mistral.ts +95 -95
- package/src/agent/provider/ollama.ts +77 -60
- package/src/agent/provider/openai.ts +42 -38
- package/src/agent/provider/rateLimit.ts +178 -0
- package/src/agent/provider/xai.ts +99 -99
- package/src/agent/tools/definitions.ts +19 -9
- package/src/agent/tools/executor.ts +95 -85
- package/src/agent/tools/exploreExecutor.ts +8 -10
- package/src/agent/tools/grep.ts +30 -29
- package/src/agent/tools/question.ts +7 -1
- package/src/agent/types.ts +9 -8
- package/src/components/App.tsx +45 -45
- package/src/components/CustomInput.tsx +214 -36
- package/src/components/Main.tsx +1146 -954
- package/src/components/Setup.tsx +1 -1
- package/src/components/Welcome.tsx +1 -1
- package/src/components/main/ApprovalPanel.tsx +4 -3
- package/src/components/main/ChatPage.tsx +858 -675
- package/src/components/main/HomePage.tsx +53 -38
- package/src/components/main/QuestionPanel.tsx +52 -7
- package/src/components/main/ThinkingIndicator.tsx +2 -1
- package/src/index.tsx +50 -20
- package/src/mcp/approvalPolicy.ts +148 -0
- package/src/mcp/cli/add.ts +185 -0
- package/src/mcp/cli/doctor.ts +77 -0
- package/src/mcp/cli/index.ts +85 -0
- package/src/mcp/cli/list.ts +50 -0
- package/src/mcp/cli/logs.ts +24 -0
- package/src/mcp/cli/manage.ts +99 -0
- package/src/mcp/cli/show.ts +53 -0
- package/src/mcp/cli/tools.ts +77 -0
- package/src/mcp/config.ts +223 -0
- package/src/mcp/index.ts +80 -0
- package/src/mcp/processManager.ts +299 -0
- package/src/mcp/rateLimiter.ts +50 -0
- package/src/mcp/registry.ts +151 -0
- package/src/mcp/schemaConverter.ts +100 -0
- package/src/mcp/servers/navigation.ts +854 -0
- package/src/mcp/toolCatalog.ts +169 -0
- package/src/mcp/types.ts +95 -0
- package/src/utils/approvalBridge.ts +17 -5
- package/src/utils/commands/compact.ts +30 -0
- package/src/utils/commands/echo.ts +1 -1
- package/src/utils/commands/index.ts +4 -6
- package/src/utils/commands/new.ts +15 -0
- package/src/utils/commands/types.ts +3 -0
- package/src/utils/config.ts +3 -1
- package/src/utils/diffRendering.tsx +1 -3
- package/src/utils/exploreBridge.ts +10 -0
- package/src/utils/markdown.tsx +163 -99
- package/src/utils/models.ts +31 -9
- package/src/utils/questionBridge.ts +36 -1
- package/src/utils/tokenEstimator.ts +32 -0
- package/src/utils/toolFormatting.ts +268 -7
- package/src/web/app.tsx +72 -72
- package/src/web/components/HomePage.tsx +7 -7
- package/src/web/components/MessageItem.tsx +22 -22
- package/src/web/components/QuestionPanel.tsx +72 -12
- package/src/web/components/Sidebar.tsx +0 -2
- package/src/web/components/ThinkingIndicator.tsx +1 -0
- package/src/web/server.tsx +767 -683
- package/src/utils/commands/redo.ts +0 -74
- package/src/utils/commands/sessions.ts +0 -129
- package/src/utils/commands/undo.ts +0 -75
- package/src/utils/undoRedo.ts +0 -429
- package/src/utils/undoRedoBridge.ts +0 -45
- package/src/utils/undoRedoDb.ts +0 -338
package/src/components/Setup.tsx
CHANGED
|
@@ -30,7 +30,7 @@ type SetupStep =
|
|
|
30
30
|
| 'apikey'
|
|
31
31
|
| 'confirm';
|
|
32
32
|
|
|
33
|
-
export function Setup({ onComplete, pasteRequestId = 0, shortcutsOpen = false, commandsOpen = false }: SetupProps) {
|
|
33
|
+
export function Setup({ onComplete, pasteRequestId = 0, shortcutsOpen = false, commandsOpen: _commandsOpen = false }: SetupProps) {
|
|
34
34
|
const [step, setStep] = useState<SetupStep>('provider');
|
|
35
35
|
const [selectedProvider, setSelectedProvider] = useState<string>('');
|
|
36
36
|
const [selectedModel, setSelectedModel] = useState<string>('');
|
|
@@ -9,7 +9,7 @@ interface WelcomeProps {
|
|
|
9
9
|
commandsOpen?: boolean;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export function Welcome({ onComplete, isFirstRun, shortcutsOpen = false, commandsOpen = false }: WelcomeProps) {
|
|
12
|
+
export function Welcome({ onComplete, isFirstRun, shortcutsOpen = false, commandsOpen: _commandsOpen = false }: WelcomeProps) {
|
|
13
13
|
useKeyboard((key) => {
|
|
14
14
|
if (shortcutsOpen) return;
|
|
15
15
|
if (key.name === 'return') {
|
|
@@ -9,9 +9,10 @@ interface ApprovalPanelProps {
|
|
|
9
9
|
request: ApprovalRequest;
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
onRespond: (approved: boolean, customResponse?: string) => void;
|
|
12
|
+
maxWidth?: number;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
|
-
export function ApprovalPanel({ request, disabled = false, onRespond }: ApprovalPanelProps) {
|
|
15
|
+
export function ApprovalPanel({ request, disabled = false, onRespond, maxWidth }: ApprovalPanelProps) {
|
|
15
16
|
const [selectedIndex, setSelectedIndex] = useState(0);
|
|
16
17
|
const [scrollOffset, setScrollOffset] = useState(0);
|
|
17
18
|
const allOptions = ['Yes', 'No'];
|
|
@@ -127,8 +128,8 @@ export function ApprovalPanel({ request, disabled = false, onRespond }: Approval
|
|
|
127
128
|
</box>
|
|
128
129
|
|
|
129
130
|
<box flexDirection="row" paddingLeft={1} >
|
|
130
|
-
<CustomInput onSubmit={handleCustomSubmit} placeholder="> Tell Mosaic what to do instead and press Enter" focused={!disabled} disableHistory={true} />
|
|
131
|
+
<CustomInput onSubmit={handleCustomSubmit} placeholder="> Tell Mosaic what to do instead and press Enter" focused={!disabled} disableHistory={true} maxWidth={maxWidth} />
|
|
131
132
|
</box>
|
|
132
133
|
</box>
|
|
133
134
|
);
|
|
134
|
-
}
|
|
135
|
+
}
|