@contractspec/module.ai-chat 4.3.5 → 4.3.7

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.
Files changed (46) hide show
  1. package/README.md +62 -370
  2. package/dist/adapters/ai-sdk-bundle-adapter.d.ts +1 -1
  3. package/dist/adapters/index.d.ts +1 -1
  4. package/dist/browser/context/index.js +93 -93
  5. package/dist/browser/core/index.js +308 -307
  6. package/dist/browser/index.js +3803 -3801
  7. package/dist/browser/presentation/components/index.js +2617 -2618
  8. package/dist/browser/presentation/hooks/index.js +476 -476
  9. package/dist/browser/presentation/index.js +2474 -2475
  10. package/dist/browser/providers/index.js +7 -7
  11. package/dist/context/index.d.ts +1 -1
  12. package/dist/context/index.js +93 -93
  13. package/dist/core/agent-tools-adapter.d.ts +1 -1
  14. package/dist/core/chat-service.d.ts +4 -4
  15. package/dist/core/create-chat-route.d.ts +1 -1
  16. package/dist/core/create-completion-route.d.ts +15 -0
  17. package/dist/core/export-formatters.d.ts +1 -1
  18. package/dist/core/index.d.ts +6 -6
  19. package/dist/core/index.js +308 -307
  20. package/dist/core/local-storage-conversation-store.d.ts +1 -1
  21. package/dist/core/surface-planner-tools.d.ts +2 -2
  22. package/dist/core/workflow-tools.d.ts +1 -1
  23. package/dist/index.d.ts +8 -8
  24. package/dist/index.js +3803 -3801
  25. package/dist/node/context/index.js +93 -93
  26. package/dist/node/core/index.js +308 -307
  27. package/dist/node/index.js +3803 -3801
  28. package/dist/node/presentation/components/index.js +2617 -2618
  29. package/dist/node/presentation/hooks/index.js +476 -476
  30. package/dist/node/presentation/index.js +2474 -2475
  31. package/dist/node/providers/index.js +7 -7
  32. package/dist/presentation/components/ChainOfThought.d.ts +1 -1
  33. package/dist/presentation/components/ChatExportToolbar.d.ts +1 -1
  34. package/dist/presentation/components/ChatSidebar.d.ts +1 -1
  35. package/dist/presentation/components/ChatWithExport.d.ts +1 -1
  36. package/dist/presentation/components/index.d.ts +11 -11
  37. package/dist/presentation/components/index.js +2617 -2618
  38. package/dist/presentation/hooks/index.d.ts +4 -4
  39. package/dist/presentation/hooks/index.js +476 -476
  40. package/dist/presentation/hooks/useChat.d.ts +6 -6
  41. package/dist/presentation/hooks/useConversations.d.ts +1 -1
  42. package/dist/presentation/hooks/useProviders.d.ts +1 -1
  43. package/dist/presentation/index.js +2474 -2475
  44. package/dist/providers/index.d.ts +2 -2
  45. package/dist/providers/index.js +7 -7
  46. package/package.json +15 -15
@@ -5,18 +5,18 @@ var __require = /* @__PURE__ */ createRequire(import.meta.url);
5
5
  import {
6
6
  createProvider,
7
7
  createProviderFromEnv,
8
- getAvailableProviders,
9
8
  DEFAULT_MODELS,
10
- MODELS,
11
- getModelsForProvider,
9
+ getAvailableProviders,
10
+ getDefaultModel,
11
+ getEnvVarName,
12
12
  getModelInfo,
13
+ getModelsForProvider,
13
14
  getRecommendedModels,
14
- getDefaultModel,
15
- validateProvider,
16
15
  hasCredentials,
17
- getEnvVarName,
18
16
  isOllamaRunning,
19
- listOllamaModels
17
+ listOllamaModels,
18
+ MODELS,
19
+ validateProvider
20
20
  } from "@contractspec/lib.ai-providers";
21
21
 
22
22
  // src/providers/chat-utilities.ts
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
1
  import { type LucideIcon } from 'lucide-react';
2
+ import * as React from 'react';
3
3
  export type ChainOfThoughtStepStatus = 'complete' | 'active' | 'pending';
4
4
  export interface ChainOfThoughtProps {
5
5
  children: React.ReactNode;
@@ -1,4 +1,4 @@
1
- import type { ChatMessage, ChatConversation } from '../../core/message-types';
1
+ import type { ChatConversation, ChatMessage } from '../../core/message-types';
2
2
  export type ExportFormat = 'markdown' | 'txt' | 'json';
3
3
  export interface ChatExportToolbarProps {
4
4
  messages: ChatMessage[];
@@ -1,5 +1,5 @@
1
- import type { ChatConversation } from '../../core/message-types';
2
1
  import type { ConversationStore } from '../../core/conversation-store';
2
+ import type { ChatConversation } from '../../core/message-types';
3
3
  export interface ChatSidebarProps {
4
4
  store: ConversationStore;
5
5
  selectedConversationId: string | null;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import type { ChatMessage as ChatMessageType, ChatConversation } from '../../core/message-types';
2
+ import type { ChatConversation, ChatMessage as ChatMessageType } from '../../core/message-types';
3
3
  import type { ThinkingLevel } from '../../core/thinking-levels';
4
4
  import type { ChatMessageComponents, SuggestionComponents } from './component-types';
5
5
  export interface ChatWithExportProps {
@@ -1,20 +1,20 @@
1
1
  /**
2
2
  * React components for AI Chat UI
3
3
  */
4
+ export { ChainOfThought, ChainOfThoughtContent, ChainOfThoughtHeader, ChainOfThoughtStep, } from './ChainOfThought';
4
5
  export { ChatContainer } from './ChatContainer';
5
- export { ChatMessage } from './ChatMessage';
6
- export { ChatInput } from './ChatInput';
7
6
  export { ChatExportToolbar } from './ChatExportToolbar';
8
- export { ChatWithExport } from './ChatWithExport';
7
+ export { ChatInput } from './ChatInput';
8
+ export { ChatMessage } from './ChatMessage';
9
9
  export { ChatSidebar } from './ChatSidebar';
10
+ export { ChatWithExport } from './ChatWithExport';
10
11
  export { ChatWithSidebar } from './ChatWithSidebar';
11
- export { ModelPicker } from './ModelPicker';
12
- export { ThinkingLevelPicker } from './ThinkingLevelPicker';
13
- export { ContextIndicator } from './ContextIndicator';
14
12
  export { CodePreview } from './CodePreview';
15
- export { Reasoning, ReasoningTrigger, ReasoningContent } from './Reasoning';
16
- export { Sources, SourcesTrigger, SourcesContent, Source } from './Sources';
17
- export { Suggestions, Suggestion } from './Suggestion';
18
- export { ChainOfThought, ChainOfThoughtHeader, ChainOfThoughtStep, ChainOfThoughtContent, } from './ChainOfThought';
13
+ export { ContextIndicator } from './ContextIndicator';
19
14
  export type { ChatMessageComponents, SuggestionComponents, } from './component-types';
20
- export { ToolResultRenderer, isPresentationToolResult, isFormToolResult, isDataViewToolResult, type PresentationToolResult, type FormToolResult, type DataViewToolResult, } from './ToolResultRenderer';
15
+ export { ModelPicker } from './ModelPicker';
16
+ export { Reasoning, ReasoningContent, ReasoningTrigger } from './Reasoning';
17
+ export { Source, Sources, SourcesContent, SourcesTrigger } from './Sources';
18
+ export { Suggestion, Suggestions } from './Suggestion';
19
+ export { ThinkingLevelPicker } from './ThinkingLevelPicker';
20
+ export { type DataViewToolResult, type FormToolResult, isDataViewToolResult, isFormToolResult, isPresentationToolResult, type PresentationToolResult, ToolResultRenderer, } from './ToolResultRenderer';