Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added tools support for fireworks.ai #4046

Open
wants to merge 57 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
ee86344
comment out toast
sestinj Feb 5, 2025
4106405
remove unused workspace switcher
sestinj Feb 5, 2025
fc23e41
border-solid on scope select
sestinj Feb 5, 2025
284ad97
remove AboutAssistantDialog
sestinj Feb 5, 2025
c401e18
open control plane links with orgSlug
sestinj Feb 6, 2025
19f0d6b
padding to top of assistant selector
sestinj Feb 6, 2025
d3c9f67
remove "welcome to continue for teams"
sestinj Feb 6, 2025
daa1c0a
adjust padding of assistant select
sestinj Feb 6, 2025
cd5f4a7
color / style updates
sestinj Feb 6, 2025
90a150d
fix timing bug in MCP loading
sestinj Feb 6, 2025
26eb176
always show tools button, but have disabled
sestinj Feb 6, 2025
57b4c14
add tooltip for disabled tools
sestinj Feb 6, 2025
c3acd19
favicon for mcp
sestinj Feb 6, 2025
35584f2
improvements to tool call display
sestinj Feb 6, 2025
dcf6c10
prioritize org over user secrets
sestinj Feb 6, 2025
c6eb626
remove LocalAfterFreeTrial
RomneyDa Feb 6, 2025
4e38172
local onboarding edits
RomneyDa Feb 7, 2025
16d7e0a
fix opt+enter when currentFile ctx provider not configured
sestinj Feb 7, 2025
ecec00b
update config-yaml version
sestinj Feb 7, 2025
d0d9e74
adjust colors
sestinj Feb 7, 2025
d8dac11
focus border
sestinj Feb 7, 2025
85c82cd
get rid of lag from generating session title
sestinj Feb 7, 2025
cacddc5
transition border color
sestinj Feb 7, 2025
62c4daf
Merge branch 'main' into nate/polish-client
sestinj Feb 7, 2025
49cdf13
onboarding style changes
RomneyDa Feb 7, 2025
62be9e6
claude 35 haiku, not 3
sestinj Feb 7, 2025
a92368c
if any docs used, add the docs context provider
sestinj Feb 7, 2025
a016eb4
fix file provider submenu loads
RomneyDa Feb 8, 2025
27820f6
tutorial card updates
RomneyDa Feb 8, 2025
511abbd
update styling to match personal taste
sestinj Feb 8, 2025
71dce41
Merge branch 'main' into nate/polish-client
sestinj Feb 8, 2025
d9ab4d8
bump version
sestinj Feb 8, 2025
55eddab
added tools support for fireworks.ai
2hy6v Feb 8, 2025
cc97512
pin vscode version for e2e tests
sestinj Feb 9, 2025
81b4e4f
Merge pull request #3984 from continuedev/nate/polish-client
sestinj Feb 9, 2025
9537b23
fix release ci
sestinj Feb 9, 2025
3af5690
Merge pull request #4058 from continuedev/nate/fix-ci-release
sestinj Feb 10, 2025
4de76dd
use theme colors for jetbrains inline edit
RomneyDa Feb 10, 2025
5cc1da2
merge main
RomneyDa Feb 10, 2025
4fb0e3f
Add tools support for o3-mini
pczekaj Feb 10, 2025
72a5651
cleanup
RomneyDa Feb 10, 2025
18fd7fb
fix: bump node.js dependencies
bufferoverflow Feb 10, 2025
f494ed8
merge main
RomneyDa Feb 10, 2025
ec0f8fd
Merge branch 'main' of https://github.com/continuedev/continue into d…
RomneyDa Feb 11, 2025
3c05e75
docs indexing not dependent on disableIndexing
RomneyDa Feb 11, 2025
201bfef
failed docs p1
RomneyDa Feb 11, 2025
0613435
remember failed docs index attempts
RomneyDa Feb 11, 2025
6442115
failed docs in global context
RomneyDa Feb 11, 2025
a665b97
skip docs indexing if already failed
RomneyDa Feb 11, 2025
4f4ea97
Merge pull request #4008 from continuedev/dallin/ollama-embedder
sestinj Feb 11, 2025
0ad3ea6
Merge pull request #4023 from continuedev/dallin/file-fallbacks
sestinj Feb 11, 2025
21cfde2
Merge pull request #4026 from continuedev/dallin/jetrains-ui-tweaks
sestinj Feb 11, 2025
62126a7
Merge pull request #4077 from continuedev/dallin/dont-retry-docs
sestinj Feb 11, 2025
a9fb8c4
Merge pull request #4067 from siemens/fix/update-dependencies
sestinj Feb 11, 2025
732eb24
Merge pull request #4062 from pczekaj/o3-mini-tools
sestinj Feb 11, 2025
d4943b3
added tools support for fireworks.ai
2hy6v Feb 8, 2025
0370e4f
Merge remote-tracking branch 'origin/add-tools-support-for-fireworks-…
2hy6v Feb 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ jobs:
runs-on: ubuntu-latest
needs:
- build
if: github.event.inputs.publish_build == 'true'
if: github.event_name != 'workflow_dispatch' || github.event.inputs.publish_build == 'true'
permissions:
contents: write
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ jobs:
runs-on: ubuntu-latest
needs:
- build
if: github.event.inputs.publish_build == 'true'
if: github.event_name != 'workflow_dispatch' || github.event.inputs.publish_build == 'true'
permissions:
contents: write
steps:
Expand Down
27 changes: 15 additions & 12 deletions binary/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions core/config/ConfigHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { localPathToUri } from "../util/pathToUri.js";

import {
LOCAL_ONBOARDING_CHAT_MODEL,
ONBOARDING_LOCAL_MODEL_TITLE,
LOCAL_ONBOARDING_PROVIDER_TITLE,
} from "./onboarding.js";
import ControlPlaneProfileLoader from "./profile/ControlPlaneProfileLoader.js";
import LocalProfileLoader from "./profile/LocalProfileLoader.js";
Expand Down Expand Up @@ -401,7 +401,7 @@ export class ConfigHandler {
const { config } = await this.loadConfig();
const model = config?.models.find((m) => m.title === title);
if (!model) {
if (title === ONBOARDING_LOCAL_MODEL_TITLE) {
if (title === LOCAL_ONBOARDING_PROVIDER_TITLE) {
// Special case, make calls to Ollama before we have it in the config
const ollama = new Ollama({
model: LOCAL_ONBOARDING_CHAT_MODEL,
Expand Down
1 change: 1 addition & 0 deletions core/config/ProfileLifecycleManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export interface OrganizationDescription {
id: string;
iconUrl: string;
name: string;
slug: string | undefined; // TODO: This doesn't need to be undefined, just doing while transitioning the backend
}

export class ProfileLifecycleManager {
Expand Down
6 changes: 4 additions & 2 deletions core/config/load.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ import {
} from "../util/paths";

import { ConfigResult, ConfigValidationError } from "@continuedev/config-yaml";
import { useHub } from "../control-plane/env";
import { localPathToUri } from "../util/pathToUri";
import {
defaultContextProvidersJetBrains,
defaultContextProvidersVsCode,
defaultSlashCommandsJetBrains,
defaultSlashCommandsVscode,
} from "./default";
import { getSystemPromptDotFile } from "./getSystemPromptDotFile";
import { useHub } from "../control-plane/env";
import { localPathToUri } from "../util/pathToUri";
import { modifyContinueConfigWithSharedConfig } from "./sharedConfig";
import { validateConfig } from "./validation.js";

Expand Down Expand Up @@ -517,6 +517,8 @@ async function intermediateToFinalConfig(
continueConfig,
mcpId,
abortController.signal,
"MCP Server",
server.faviconUrl,
);
if (mcpError) {
errors.push(mcpError);
Expand Down
18 changes: 7 additions & 11 deletions core/config/migrateSharedConfig.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import * as fs from "fs";

import * as JSONC from "comment-json";

import { IDE, SerializedContinueConfig } from "..";
import { SharedConfigSchema } from "./sharedConfig";
import { IDE } from "..";
import { deduplicateArray } from "../util";
import { GlobalContext } from "../util/GlobalContext";
import { editConfigJson } from "../util/paths";
import { resolveSerializedConfig } from "./load";
import { deduplicateArray } from "../util";
import { SharedConfigSchema } from "./sharedConfig";

/*
This migration function eliminates deprecated values from the json file
Expand Down Expand Up @@ -201,10 +197,10 @@ export function migrateJsonSharedConfig(filepath: string, ide: IDE): void {
if (effected) {
new GlobalContext().updateSharedConfig(shareConfigUpdates);
editConfigJson(() => config);
void ide.showToast(
"warning",
"Migrated deprecated Continue JSON settings. Edit in the Settings Page",
);
// void ide.showToast(
// "warning",
// "Migrated deprecated Continue JSON settings. Edit in the Settings Page",
// );
}
} catch (e) {
throw new Error(`Migration: Failed to parse config.json: ${e}`);
Expand Down
29 changes: 5 additions & 24 deletions core/config/onboarding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ import { SerializedContinueConfig } from "../";
import { FREE_TRIAL_MODELS } from "./default";

export const TRIAL_FIM_MODEL = "codestral-latest";
export const ONBOARDING_LOCAL_MODEL_TITLE = "Ollama";
export const LOCAL_ONBOARDING_PROVIDER_TITLE = "Ollama";
export const LOCAL_ONBOARDING_FIM_MODEL = "qwen2.5-coder:1.5b-base";
export const LOCAL_ONBOARDING_FIM_TITLE = "Qwen2.5-Coder 1.5B";
export const LOCAL_ONBOARDING_CHAT_MODEL = "llama3.1:8b";
export const LOCAL_ONBOARDING_CHAT_TITLE = "Llama 3.1 8B";
export const LOCAL_ONBOARDING_EMBEDDINGS_MODEL = "nomic-embed-text:latest";

/**
* We set the "best" chat + autocopmlete models by default
Expand Down Expand Up @@ -35,13 +37,13 @@ export function setupLocalConfig(
...config.models.filter((model) => model.provider !== "free-trial"),
],
tabAutocompleteModel: {
title: "Qwen2.5-Coder 1.5B",
title: LOCAL_ONBOARDING_FIM_TITLE,
provider: "ollama",
model: LOCAL_ONBOARDING_FIM_MODEL,
},
embeddingsProvider: {
provider: "ollama",
model: "nomic-embed-text",
model: LOCAL_ONBOARDING_EMBEDDINGS_MODEL,
},
};
}
Expand All @@ -68,24 +70,3 @@ export function setupQuickstartConfig(
},
};
}

export function setupLocalConfigAfterFreeTrial(
config: SerializedContinueConfig,
): SerializedContinueConfig {
return {
...config,
models: [
{
title: LOCAL_ONBOARDING_CHAT_TITLE,
provider: "ollama",
model: LOCAL_ONBOARDING_CHAT_MODEL,
},
{
title: ONBOARDING_LOCAL_MODEL_TITLE,
provider: "ollama",
model: "AUTODETECT",
},
...config.models.filter((model) => model.provider !== "free-trial"),
],
};
}
89 changes: 56 additions & 33 deletions core/config/yaml/loadYaml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import fs from "node:fs";
import {
AssistantUnrolled,
ConfigResult,
ConfigValidationError,
parseAssistantUnrolled,
validateConfigYaml,
} from "@continuedev/config-yaml";
Expand Down Expand Up @@ -34,6 +35,7 @@ import { getSystemPromptDotFile } from "../getSystemPromptDotFile";
import { PlatformConfigMetadata } from "../profile/PlatformProfileLoader";

import { slashFromCustomCommand } from "../../commands";
import DocsContextProvider from "../../context/providers/DocsContextProvider";
import { allTools } from "../../tools";
import { GlobalContext } from "../../util/GlobalContext";
import { modifyContinueConfigWithSharedConfig } from "../sharedConfig";
Expand Down Expand Up @@ -100,7 +102,8 @@ async function configYamlToContinueConfig(
workOsAccessToken: string | undefined,
platformConfigMetadata: PlatformConfigMetadata | undefined,
allowFreeTrial: boolean = true,
): Promise<ContinueConfig> {
): Promise<{ config: ContinueConfig; errors: ConfigValidationError[] }> {
const errors: ConfigValidationError[] = [];
const continueConfig: ContinueConfig = {
slashCommands: [
...(await slashCommandsFromV1PromptFiles(ide)),
Expand Down Expand Up @@ -214,6 +217,15 @@ async function configYamlToContinueConfig(
.filter((p) => !!p) ?? []) as IContextProvider[];
continueConfig.contextProviders.push(...DEFAULT_CONTEXT_PROVIDERS);

if (
continueConfig.docs?.length &&
!continueConfig.contextProviders?.some(
(cp) => cp.description.title === "docs",
)
) {
continueConfig.contextProviders.push(new DocsContextProvider({}));
}

// Embeddings Provider
const embedConfig = config.models?.find((model) =>
model.roles?.includes("embed"),
Expand Down Expand Up @@ -259,40 +271,51 @@ async function configYamlToContinueConfig(

// Apply MCP if specified
const mcpManager = MCPManagerSingleton.getInstance();
config.mcpServers?.forEach(async (server) => {
const mcpId = server.name;
const mcpConnection = mcpManager.createConnection(mcpId, {
transport: {
type: "stdio",
args: [],
...server,
},
});
if (!mcpConnection) {
return;
}

const abortController = new AbortController();
const mcpConnectionTimeout = setTimeout(
() => abortController.abort(),
2000,
);
await Promise.all(
config.mcpServers?.map(async (server) => {
const mcpId = server.name;
const mcpConnection = mcpManager.createConnection(mcpId, {
transport: {
type: "stdio",
args: [],
...server,
},
});
if (!mcpConnection) {
return;
}

try {
await mcpConnection.modifyConfig(
continueConfig,
mcpId,
abortController.signal,
const abortController = new AbortController();
const mcpConnectionTimeout = setTimeout(
() => abortController.abort(),
5000,
);
} catch (e: any) {
if (e.name !== "AbortError") {
throw e;

try {
const mcpError = await mcpConnection.modifyConfig(
continueConfig,
mcpId,
abortController.signal,
server.name,
server.faviconUrl,
);
if (mcpError) {
errors.push(mcpError);
}
} catch (e: any) {
errors.push({
fatal: false,
message: `Failed to load MCP server: ${e.message}`,
});
if (e.name !== "AbortError") {
throw e;
}
}
}
clearTimeout(mcpConnectionTimeout);
});
clearTimeout(mcpConnectionTimeout);
}) ?? [],
);

return continueConfig;
return { config: continueConfig, errors };
}

export async function loadContinueConfigFromYaml(
Expand Down Expand Up @@ -328,7 +351,7 @@ export async function loadContinueConfigFromYaml(
};
}

const continueConfig = await configYamlToContinueConfig(
const { config: continueConfig, errors } = await configYamlToContinueConfig(
configYamlResult.config,
ide,
ideSettings,
Expand Down Expand Up @@ -357,7 +380,7 @@ export async function loadContinueConfigFromYaml(

return {
config: withShared,
errors: configYamlResult.errors,
errors: [...(configYamlResult.errors ?? []), ...errors],
configLoadInterrupted: false,
};
}
Expand Down
Loading
Loading