Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"preview": true,
"activationEvents": [
"onFileSystem:azureResourceGroups",
"onStartupFinished",
"workspaceContains:**/.azure/project-plan.md",
"workspaceContains:**/.azure/requirements.json",
"workspaceContains:**/.azure/vscode-debug-plan.md"
Expand Down
6 changes: 5 additions & 1 deletion src/commands/registerCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,11 @@ export function registerCommands(): void {
message: l10n.t('Copilot is gathering requirements and preparing your project plan.'),
}));
registerCommand('azureResourceGroups.startProjectIntegrate', (_context: IActionContext, prompt?: string) =>
openChatWithAgent('azure-project-integrate', prompt ?? 'The project has been scaffolded. Read `.azure/integration-plan.md`, then integrate the project: create the SQL/PostgreSQL schema migrations (no seed data), smoke-test the backend so every endpoint responds, wire the frontend to live data (remove all mock data), and run the frontend and backend together end-to-end.'));
openChatWithAgent('azure-project-integrate', prompt ?? 'The project has been scaffolded. Read `.azure/integration-plan.md`, then integrate the project: create the SQL/PostgreSQL schema migrations (no seed data), smoke-test the backend so every endpoint responds, wire the frontend to live data (remove all mock data), and run the frontend and backend together end-to-end.', {
stage: 0,
title: l10n.t('Integrating your frontend…'),
message: l10n.t('Copilot is wiring the frontend to your backend services. For progress please view the Copilot chat.'),
}));
registerCommand('azureResourceGroups.startLocalDevelopment', (_context: IActionContext, prompt?: string) =>
openChatWithAgent('azure-debug-plan', prompt ?? 'The project has been scaffolded. Now set up the local debugging environment so the user can start building and testing.', {
stage: 1,
Expand Down
2 changes: 1 addition & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ async function isWorkspaceEmpty(): Promise<boolean> {
}

// Entries that don't count as "real" project content.
const ignored = new Set(['.git', '.vscode', '.azure', '.github', '.agents']);
const ignored = new Set(['.git', '.vscode', '.azure', '.github', '.agents', '.DS_Store']);

let readableFolderCount = 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import { WebviewController } from "@microsoft/vscode-azext-webview";
import * as vscode from "vscode";
import { ViewColumn } from "vscode";
import { ensureCopilotChatReady } from "../../../../commands/copilotOnRails/openChatWithAgent";
import { ext } from "../../../../extensionVariables";
import { getCopilotOnRailsBundleLocation } from "../copilotOnRailsBundleLocation";

Expand Down Expand Up @@ -35,14 +34,11 @@ export class ScaffoldNextStepsViewController extends WebviewController<Record<st
private async handleAction(action: ScaffoldAction): Promise<void> {
switch (action) {
case 'setupLocal':
if (!(await ensureCopilotChatReady())) {
return;
}
this.panel.dispose();
await vscode.commands.executeCommand('workbench.action.chat.open', {
mode: 'azure-debug-plan',
query: vscode.l10n.t('The project has been scaffolded. Now set up the local debugging environment so I can start building and testing.'),
});
await vscode.commands.executeCommand(
'azureResourceGroups.startLocalDevelopment',
vscode.l10n.t('The project has been scaffolded. Now set up the local debugging environment so I can start building and testing.'),
);
return;
case 'deploy':
this.panel.dispose();
Expand Down
6 changes: 4 additions & 2 deletions src/webviews/copilotOnRails/views/RequirementsView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -410,9 +410,10 @@ const QuestionRow = ({
const isMissing = isAnswerEmpty(draft);
const heading = question.header ?? question.question;
const showSubtext = question.header !== undefined && question.question && question.question !== question.header;
const isFreeform = inputType === 'text';

return (
<li className={`questionRow ${isMissing ? 'questionRow--missing' : ''}`}>
<li className={`questionRow ${isMissing ? 'questionRow--missing' : ''} ${isFreeform ? 'questionRow--fill' : ''}`}>
{!hideHeader && (
<div className='questionMeta'>
<span className='questionText'>{heading}</span>
Expand Down Expand Up @@ -503,14 +504,15 @@ const AnswerInput = ({
const useTextarea = text.length > 60;

if (useTextarea) {
const rows = Math.max(3, Math.min(12, Math.ceil(text.length / 40)));
return (
<Textarea
size='small'
value={text}
onChange={(_, data) => onChange(data.value)}
resize='vertical'
className='answerInput answerInput--textarea'
rows={3}
rows={rows}
/>
);
}
Expand Down
6 changes: 5 additions & 1 deletion src/webviews/copilotOnRails/views/ScaffoldPlanView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,11 @@ export const ScaffoldPlanView = (): JSX.Element => {

const isAlreadyApproved = useMemo(() => {
const s = plan?.status?.trim().toLowerCase();
return s === 'approved';
if (!s) {
return false;
}
const approvedOrLater = ['approved', 'in progress', 'awaiting integration', 'integrated', 'executing', 'implemented'];
return approvedOrLater.includes(s);
}, [plan?.status]);

const editedCells = useMemo(() => {
Expand Down
22 changes: 22 additions & 0 deletions src/webviews/copilotOnRails/views/styles/requirementsView.scss
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@
border-radius: 6px;
background: transparent;
overflow: hidden;
display: flex;
flex-direction: column;

.categoryHeader {
padding: 12px 16px;
Expand Down Expand Up @@ -194,6 +196,9 @@
list-style: none;
margin: 0;
padding: 0;
flex: 1 1 auto;
display: flex;
flex-direction: column;
}

.questionRow {
Expand All @@ -207,6 +212,23 @@
border-bottom: none;
}

&--fill {
flex: 1 1 auto;

.questionInput {
flex: 1 1 auto;
align-items: stretch;
}

.answerInput--textarea {
height: 100%;

textarea {
height: 100%;
}
}
}

.questionMeta {
display: flex;
align-items: center;
Expand Down
Loading