mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-21 12:00:15 +00:00
Prevent default and stop propagation when clicking artifact pill
This prevents the collapsible header from toggling when the pill is clicked.
This commit is contained in:
parent
8e017db924
commit
9a57aa7e1a
2 changed files with 49 additions and 47 deletions
|
|
@ -3283,23 +3283,6 @@ export const MODELS = {
|
||||||
contextWindow: 32768,
|
contextWindow: 32768,
|
||||||
maxTokens: 4096,
|
maxTokens: 4096,
|
||||||
} satisfies Model<"openai-completions">,
|
} satisfies Model<"openai-completions">,
|
||||||
"cohere/command-r-08-2024": {
|
|
||||||
id: "cohere/command-r-08-2024",
|
|
||||||
name: "Cohere: Command R (08-2024)",
|
|
||||||
api: "openai-completions",
|
|
||||||
provider: "openrouter",
|
|
||||||
baseUrl: "https://openrouter.ai/api/v1",
|
|
||||||
reasoning: false,
|
|
||||||
input: ["text"],
|
|
||||||
cost: {
|
|
||||||
input: 0.15,
|
|
||||||
output: 0.6,
|
|
||||||
cacheRead: 0,
|
|
||||||
cacheWrite: 0,
|
|
||||||
},
|
|
||||||
contextWindow: 128000,
|
|
||||||
maxTokens: 4000,
|
|
||||||
} satisfies Model<"openai-completions">,
|
|
||||||
"cohere/command-r-plus-08-2024": {
|
"cohere/command-r-plus-08-2024": {
|
||||||
id: "cohere/command-r-plus-08-2024",
|
id: "cohere/command-r-plus-08-2024",
|
||||||
name: "Cohere: Command R+ (08-2024)",
|
name: "Cohere: Command R+ (08-2024)",
|
||||||
|
|
@ -3317,6 +3300,23 @@ export const MODELS = {
|
||||||
contextWindow: 128000,
|
contextWindow: 128000,
|
||||||
maxTokens: 4000,
|
maxTokens: 4000,
|
||||||
} satisfies Model<"openai-completions">,
|
} satisfies Model<"openai-completions">,
|
||||||
|
"cohere/command-r-08-2024": {
|
||||||
|
id: "cohere/command-r-08-2024",
|
||||||
|
name: "Cohere: Command R (08-2024)",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "openrouter",
|
||||||
|
baseUrl: "https://openrouter.ai/api/v1",
|
||||||
|
reasoning: false,
|
||||||
|
input: ["text"],
|
||||||
|
cost: {
|
||||||
|
input: 0.15,
|
||||||
|
output: 0.6,
|
||||||
|
cacheRead: 0,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 128000,
|
||||||
|
maxTokens: 4000,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
"microsoft/phi-3.5-mini-128k-instruct": {
|
"microsoft/phi-3.5-mini-128k-instruct": {
|
||||||
id: "microsoft/phi-3.5-mini-128k-instruct",
|
id: "microsoft/phi-3.5-mini-128k-instruct",
|
||||||
name: "Microsoft: Phi-3.5 Mini 128K Instruct",
|
name: "Microsoft: Phi-3.5 Mini 128K Instruct",
|
||||||
|
|
@ -3351,22 +3351,22 @@ export const MODELS = {
|
||||||
contextWindow: 65000,
|
contextWindow: 65000,
|
||||||
maxTokens: 4096,
|
maxTokens: 4096,
|
||||||
} satisfies Model<"openai-completions">,
|
} satisfies Model<"openai-completions">,
|
||||||
"meta-llama/llama-3.1-70b-instruct": {
|
"meta-llama/llama-3.1-8b-instruct": {
|
||||||
id: "meta-llama/llama-3.1-70b-instruct",
|
id: "meta-llama/llama-3.1-8b-instruct",
|
||||||
name: "Meta: Llama 3.1 70B Instruct",
|
name: "Meta: Llama 3.1 8B Instruct",
|
||||||
api: "openai-completions",
|
api: "openai-completions",
|
||||||
provider: "openrouter",
|
provider: "openrouter",
|
||||||
baseUrl: "https://openrouter.ai/api/v1",
|
baseUrl: "https://openrouter.ai/api/v1",
|
||||||
reasoning: false,
|
reasoning: false,
|
||||||
input: ["text"],
|
input: ["text"],
|
||||||
cost: {
|
cost: {
|
||||||
input: 0.39999999999999997,
|
input: 0.02,
|
||||||
output: 0.39999999999999997,
|
output: 0.03,
|
||||||
cacheRead: 0,
|
cacheRead: 0,
|
||||||
cacheWrite: 0,
|
cacheWrite: 0,
|
||||||
},
|
},
|
||||||
contextWindow: 131072,
|
contextWindow: 131072,
|
||||||
maxTokens: 4096,
|
maxTokens: 16384,
|
||||||
} satisfies Model<"openai-completions">,
|
} satisfies Model<"openai-completions">,
|
||||||
"meta-llama/llama-3.1-405b-instruct": {
|
"meta-llama/llama-3.1-405b-instruct": {
|
||||||
id: "meta-llama/llama-3.1-405b-instruct",
|
id: "meta-llama/llama-3.1-405b-instruct",
|
||||||
|
|
@ -3385,22 +3385,22 @@ export const MODELS = {
|
||||||
contextWindow: 32768,
|
contextWindow: 32768,
|
||||||
maxTokens: 16384,
|
maxTokens: 16384,
|
||||||
} satisfies Model<"openai-completions">,
|
} satisfies Model<"openai-completions">,
|
||||||
"meta-llama/llama-3.1-8b-instruct": {
|
"meta-llama/llama-3.1-70b-instruct": {
|
||||||
id: "meta-llama/llama-3.1-8b-instruct",
|
id: "meta-llama/llama-3.1-70b-instruct",
|
||||||
name: "Meta: Llama 3.1 8B Instruct",
|
name: "Meta: Llama 3.1 70B Instruct",
|
||||||
api: "openai-completions",
|
api: "openai-completions",
|
||||||
provider: "openrouter",
|
provider: "openrouter",
|
||||||
baseUrl: "https://openrouter.ai/api/v1",
|
baseUrl: "https://openrouter.ai/api/v1",
|
||||||
reasoning: false,
|
reasoning: false,
|
||||||
input: ["text"],
|
input: ["text"],
|
||||||
cost: {
|
cost: {
|
||||||
input: 0.02,
|
input: 0.39999999999999997,
|
||||||
output: 0.03,
|
output: 0.39999999999999997,
|
||||||
cacheRead: 0,
|
cacheRead: 0,
|
||||||
cacheWrite: 0,
|
cacheWrite: 0,
|
||||||
},
|
},
|
||||||
contextWindow: 131072,
|
contextWindow: 131072,
|
||||||
maxTokens: 16384,
|
maxTokens: 4096,
|
||||||
} satisfies Model<"openai-completions">,
|
} satisfies Model<"openai-completions">,
|
||||||
"mistralai/mistral-nemo": {
|
"mistralai/mistral-nemo": {
|
||||||
id: "mistralai/mistral-nemo",
|
id: "mistralai/mistral-nemo",
|
||||||
|
|
@ -3572,23 +3572,6 @@ export const MODELS = {
|
||||||
contextWindow: 128000,
|
contextWindow: 128000,
|
||||||
maxTokens: 4096,
|
maxTokens: 4096,
|
||||||
} satisfies Model<"openai-completions">,
|
} satisfies Model<"openai-completions">,
|
||||||
"mistralai/mistral-tiny": {
|
|
||||||
id: "mistralai/mistral-tiny",
|
|
||||||
name: "Mistral Tiny",
|
|
||||||
api: "openai-completions",
|
|
||||||
provider: "openrouter",
|
|
||||||
baseUrl: "https://openrouter.ai/api/v1",
|
|
||||||
reasoning: false,
|
|
||||||
input: ["text"],
|
|
||||||
cost: {
|
|
||||||
input: 0.25,
|
|
||||||
output: 0.25,
|
|
||||||
cacheRead: 0,
|
|
||||||
cacheWrite: 0,
|
|
||||||
},
|
|
||||||
contextWindow: 32768,
|
|
||||||
maxTokens: 4096,
|
|
||||||
} satisfies Model<"openai-completions">,
|
|
||||||
"mistralai/mistral-small": {
|
"mistralai/mistral-small": {
|
||||||
id: "mistralai/mistral-small",
|
id: "mistralai/mistral-small",
|
||||||
name: "Mistral Small",
|
name: "Mistral Small",
|
||||||
|
|
@ -3606,6 +3589,23 @@ export const MODELS = {
|
||||||
contextWindow: 32768,
|
contextWindow: 32768,
|
||||||
maxTokens: 4096,
|
maxTokens: 4096,
|
||||||
} satisfies Model<"openai-completions">,
|
} satisfies Model<"openai-completions">,
|
||||||
|
"mistralai/mistral-tiny": {
|
||||||
|
id: "mistralai/mistral-tiny",
|
||||||
|
name: "Mistral Tiny",
|
||||||
|
api: "openai-completions",
|
||||||
|
provider: "openrouter",
|
||||||
|
baseUrl: "https://openrouter.ai/api/v1",
|
||||||
|
reasoning: false,
|
||||||
|
input: ["text"],
|
||||||
|
cost: {
|
||||||
|
input: 0.25,
|
||||||
|
output: 0.25,
|
||||||
|
cacheRead: 0,
|
||||||
|
cacheWrite: 0,
|
||||||
|
},
|
||||||
|
contextWindow: 32768,
|
||||||
|
maxTokens: 4096,
|
||||||
|
} satisfies Model<"openai-completions">,
|
||||||
"mistralai/mixtral-8x7b-instruct": {
|
"mistralai/mixtral-8x7b-instruct": {
|
||||||
id: "mistralai/mixtral-8x7b-instruct",
|
id: "mistralai/mixtral-8x7b-instruct",
|
||||||
name: "Mistral: Mixtral 8x7B Instruct",
|
name: "Mistral: Mixtral 8x7B Instruct",
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,10 @@ import { FileCode2 } from "lucide";
|
||||||
import type { ArtifactsPanel } from "./artifacts.js";
|
import type { ArtifactsPanel } from "./artifacts.js";
|
||||||
|
|
||||||
export function ArtifactPill(filename: string, artifactsPanel?: ArtifactsPanel): TemplateResult {
|
export function ArtifactPill(filename: string, artifactsPanel?: ArtifactsPanel): TemplateResult {
|
||||||
const handleClick = () => {
|
const handleClick = (e: Event) => {
|
||||||
if (!artifactsPanel) return;
|
if (!artifactsPanel) return;
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
// openArtifact will show the artifact and call onOpen() to open the panel if needed
|
// openArtifact will show the artifact and call onOpen() to open the panel if needed
|
||||||
artifactsPanel.openArtifact(filename);
|
artifactsPanel.openArtifact(filename);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue